X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fadmin.php;h=9b1ce0931297978947489b45d70d11bfd6f492c6;hb=90343d1e08d47d1ee21e82eac14dc5910ece17ec;hp=567895a3e5a7807a198e0655fe0b2051a17b1726;hpb=c8ab90e7934e9621b4c84b37e047855b9cab72d2;p=platal.git diff --git a/modules/admin.php b/modules/admin.php index 567895a..9b1ce09 100644 --- a/modules/admin.php +++ b/modules/admin.php @@ -127,23 +127,6 @@ class AdminModule extends PLModule $page->assign_by_ref('mails', $sql); } - function handler_postfix_regexpsbounces(&$page, $new = null) { - $page->changeTpl('admin/emails_bounces_re.tpl'); - $page->setTitle('Administration - Postfix : Regexps Bounces'); - $page->assign('new', $new); - - if (Post::has('submit')) { - foreach (Env::v('lvl') as $id=>$val) { - XDB::query( - "REPLACE INTO emails_bounces_re (id,pos,lvl,re,text) VALUES ({?}, {?}, {?}, {?}, {?})", - $id, $_POST['pos'][$id], $_POST['lvl'][$id], $_POST['re'][$id], $_POST['text'][$id] - ); - } - } - - $page->assign('bre', XDB::iterator("SELECT * FROM emails_bounces_re ORDER BY pos")); - } - // {{{ logger view /** Retrieves the available days for a given year and month. @@ -691,6 +674,7 @@ class AdminModule extends PLModule $page->addJsLink('jquery.ui.core.js'); + $page->addJsLink('jquery.ui.widget.js'); $page->addJsLink('jquery.ui.tabs.js'); $page->addJsLink('password.js'); @@ -756,7 +740,7 @@ class AdminModule extends PLModule return false; } - array_map('trim', $infos); + $infos = array_map('trim', $infos); $hrid = self::getHrid($infos[1], $infos[0], $promo); $res1 = XDB::query('SELECT COUNT(*) FROM accounts @@ -787,7 +771,9 @@ class AdminModule extends PLModule private static function formatBirthDate($birthDate) { - return date("Y-m-d", strtotime($birthDate)); + // strtotime believes dd/mm/yyyy to be an US date (i.e mm/dd/yyyy), and + // dd-mm-yyyy to be a normal date (i.e dd-mm-yyyy)... + return date("Y-m-d", strtotime(str_replace('/', '-', $birthDate))); } function handler_add_accounts(&$page, $action = null, $promo = null) @@ -876,7 +862,7 @@ class AdminModule extends PLModule XDB::execute('INSERT INTO account_profiles (uid, pid, perms) VALUES ({?}, {?}, {?})', $uid, $pid, 'owner'); - Profile::rebuildSearchTokens($pid); + Profile::rebuildSearchTokens($pid, false); } } } @@ -1072,7 +1058,6 @@ class AdminModule extends PLModule $page->changeTpl('admin/validation.tpl'); $page->setTitle('Administration - Valider une demande'); $page->addCssLink('nl.css'); - $page->addJsLink('ajax.js'); if ($action == 'edit' && !is_null($id)) { $page->assign('preview_id', $id);