From e489faf7d04bc45fc61f6159a5a5c90a379ac6a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Mon, 7 Jun 2010 16:03:00 +0200 Subject: [PATCH] Proposes empty rank for corps by default (Closes #1071). MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- modules/profile/jobs.inc.php | 3 ++- upgrade/newdirectory-0.0.1/07_corps.sql | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) 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; -- 2.1.4