X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fevents.php;h=3025862afed3fe4d217c0bb4e16bceadd42f019a;hb=12500b65c6acefa4976e69865255ef3a049f1c91;hp=12ac4859161d1ebaacebf349eb7f5f6938d9646e;hpb=7b642046b0dbaf122f12beeb565879f3b3dd8171;p=platal.git diff --git a/modules/events.php b/modules/events.php index 12ac485..3025862 100644 --- a/modules/events.php +++ b/modules/events.php @@ -81,7 +81,7 @@ class EventsModule extends PLModule return $res->fetchOneAssoc(); } - private function upload_image(PlatalPage &$page, PlUpload &$upload) + private function upload_image(PlPage &$page, PlUpload &$upload) { if (@!$_FILES['image']['tmp_name'] && !Env::v('image_url')) { return true; @@ -144,7 +144,7 @@ class EventsModule extends PLModule // cache les evenements lus et raffiche les evenements a relire if ($action == 'read' && $eid) { - XDB::execute('DELETE evenements_vus.* + XDB::execute('DELETE ev.* FROM evenements_vus AS ev INNER JOIN evenements AS e ON e.id = ev.evt_id WHERE peremption < NOW()'); @@ -272,8 +272,8 @@ class EventsModule extends PLModule $page->changeTpl('events/submit.tpl'); $page->addJsLink('ajax.js'); - require_once('wiki.inc.php'); - wiki_require_page('Xorg.Annonce'); + $wp = new PlWikiPage('Xorg.Annonce'); + $wp->buildCache(); $titre = Post::v('titre'); $texte = Post::v('texte'); @@ -329,7 +329,7 @@ class EventsModule extends PLModule function handler_admin_tips(&$page, $action = 'list', $id = null) { - $page->assign('xorg_title', 'Polytechnique.org - Administration - Astuces'); + $page->setTitle('Administration - Astuces'); $page->assign('title', 'Gestion des Astuces'); $table_editor = new PLTableEditor('admin/tips', 'tips', 'id'); $table_editor->describe('peremption', 'date de péremption', true); @@ -350,7 +350,7 @@ class EventsModule extends PLModule { $page->changeTpl('events/admin.tpl'); $page->addJsLink('ajax.js'); - $page->assign('xorg_title','Polytechnique.org - Administration - Evenements'); + $page->setTitle('Administration - Evenements'); $page->register_modifier('hde', 'html_entity_decode'); $arch = $action == 'archives'; @@ -382,7 +382,7 @@ class EventsModule extends PLModule $action = 'edit'; } else { $res = XDB::query('SELECT flags FROM evenements WHERE id = {?}', $eid); - $flags = new FlagSet($res->fetchOneCell()); + $flags = new PlFlagSet($res->fetchOneCell()); $flags->addFlag('wiki'); if (Post::v('important')) { $flags->addFlag('important');