<?php
/***************************************************************************
- * Copyright (C) 2003-2013 Polytechnique.org *
+ * Copyright (C) 2003-2014 Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
if (Post::i('del_profile', 0) != 0) {
XDB::execute('DELETE FROM account_profiles
WHERE uid = {?} AND pid = {?}',
- $user->id(), Post::i('del_profile'));
+ $user->id(), Post::i('del_profile'));
+ XDB::execute('DELETE FROM profiles
+ WHERE pid = {?}',
+ Post::i('del_profile'));
} else if (!Post::blank('new_profile')) {
$profile = Profile::get(Post::t('new_profile'));
if (!$profile) {
VALUES (100, {?}, {?}, {?}, {?}, {?}, {?}, \'primary\')',
$pid, $eduSchools[Profile::EDU_X], $degreeid, $entry_year, $grad_year, $promotion);
XDB::execute('INSERT INTO accounts (hruid, type, is_admin, state, full_name, directory_name,
- display_name, sort_name, lastname, firstname, sex, best_domain)
+ sort_name, display_name, lastname, firstname, sex, best_domain)
VALUES ({?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?}, {?})',
$infos['hrid'], $type, 0, 'pending', $fullName, $directoryName, $sortName,
$firstname, $lastname, $firstname, $sex, $best_domain);
$r = XDB::iterator('SHOW COLUMNS FROM requests_answers');
while (($a = $r->next()) && $a['Field'] != 'category');
- $page->assign('categories', $categories = explode(',', str_replace("'", '', substr($a['Type'], 5, -1))));
+ $categories = explode(',', str_replace("'", '', substr($a['Type'], 5, -1)));
+ sort($categories);
+ $page->assign('categories', $categories);
$hidden = array();
$res = XDB::query('SELECT hidden_requests
}
}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker fenc=utf-8:
?>