зеркало из https://github.com/mozilla/gecko-dev.git
Fix sorting on admin pages and show more future parties and fewer past ones via iCal. [p=ryan@ryanflint.com]
This commit is contained in:
Родитель
cadb9deffe
Коммит
3f5dac9f88
|
@ -48,15 +48,15 @@ class AdminController extends AppController {
|
||||||
}
|
}
|
||||||
|
|
||||||
function index() {
|
function index() {
|
||||||
$this->set('parties', $this->Party->findAll());
|
$this->set('parties', $this->Party->findAll(null, null, "id ASC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function users() {
|
function users() {
|
||||||
$this->set('users', $this->User->findAll());
|
$this->set('users', $this->User->findAll(null, null, "id ASC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function comments() {
|
function comments() {
|
||||||
$this->set('comments', $this->Comment->findAll());
|
$this->set('comments', $this->Comment->findAll(null, null, "id ASC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
function edit($type, $id) {
|
function edit($type, $id) {
|
||||||
|
|
|
@ -99,8 +99,8 @@ class FeedsController extends AppController {
|
||||||
$this->layout = 'ajax';
|
$this->layout = 'ajax';
|
||||||
header('Content-type: text/calendar');
|
header('Content-type: text/calendar');
|
||||||
header("Content-Disposition: inline; filename=partylist.ics");
|
header("Content-Disposition: inline; filename=partylist.ics");
|
||||||
$weekago = time() - 604800;
|
$back = time() - 172800;
|
||||||
$events = $this->Feed->findAll('WHERE date > '. $weekago, '', 'date ASC', 50, 1);
|
$events = $this->Feed->findAll('WHERE date > '. $back, '', 'date ASC', null, 1);
|
||||||
|
|
||||||
$cal = array();
|
$cal = array();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче