From: Stéphane Jacob Date: Mon, 7 Jun 2010 14:03:00 +0000 (+0200) Subject: Proposes empty rank for corps by default (Closes #1071). X-Git-Tag: xorg/1.0.0~157 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=e489faf7d04bc45fc61f6159a5a5c90a379ac6a1;p=platal.git Proposes empty rank for corps by default (Closes #1071). Signed-off-by: Stéphane Jacob --- diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index 7a48ceb..14f1051 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -493,7 +493,8 @@ class ProfileSettingJobs extends ProfilePage $page->assign('current_corps', $res->fetchAllAssoc()); $res = XDB::iterator("SELECT id, name - FROM profile_corps_rank_enum"); + FROM profile_corps_rank_enum + ORDER BY id = 1 DESC, name"); $page->assign('corps_rank', $res->fetchAllAssoc()); } } diff --git a/upgrade/newdirectory-0.0.1/07_corps.sql b/upgrade/newdirectory-0.0.1/07_corps.sql index 2fff115..80f80bc 100644 --- a/upgrade/newdirectory-0.0.1/07_corps.sql +++ b/upgrade/newdirectory-0.0.1/07_corps.sql @@ -4,9 +4,9 @@ DROP TABLE IF EXISTS profile_corps_rank_enum; CREATE TABLE profile_corps ( pid INT(11) NOT NULL, - original_corpsid INT(4) UNSIGNED NOT NULL DEFAULT 0, - current_corpsid INT(4) UNSIGNED NOT NULL DEFAULT 0, - rankid INT(4) UNSIGNED NOT NULL DEFAULT 0, + original_corpsid INT(4) UNSIGNED NOT NULL DEFAULT 1, + current_corpsid INT(4) UNSIGNED NOT NULL DEFAULT 1, + rankid INT(4) UNSIGNED NOT NULL DEFAULT 1, corps_pub ENUM('private', 'ax', 'public') NOT NULL DEFAULT 'private', PRIMARY KEY(pid) ) ENGINE=InnoDB, CHARSET=utf8;