Changeset 856 in ExiteCMS
- Timestamp:
- 09/29/07 16:59:23 (4 years ago)
- File:
-
- 1 edited
-
trunk/administration/upgrade/rev00850.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/administration/upgrade/rev00850.php
r855 r856 30 30 // rename panel_content to panel_code and add a new panel_template field 31 31 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##panels CHANGE panel_content panel_code TEXT NOT NULL"); 32 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##panels ADD panel_ code TEXT NOT NULL AFTER panel_code");32 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##panels ADD panel_template TEXT NOT NULL AFTER panel_code"); 33 33 34 34 // add a timestamp to the panels table, to track updates to dynamic panels, and give it a default value 35 35 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##panels ADD panel_datestamp INT(10) UNSIGNED NOT NULL"); 36 $commands[] = array('type' => 'db', 'value' => "UPDATE TABLE##PREFIX##panels SET panel_datestamp = '".time()."'");36 $commands[] = array('type' => 'db', 'value' => "UPDATE ##PREFIX##panels SET panel_datestamp = '".time()."'"); 37 37 38 38 // add the language settings admin module to the admin table and give all webmasters access 39 $commands[] = array('type' => 'db', 'value' => "INSERT INTO TABLE ##PREFIX## panels(admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S7', 'settings_lang.gif', 'Language Setiings', 'settings_language.php', '3')");40 $commands[] = array('type' => 'db', 'value' => "UPDATE TABLE ##PREFIX##users SET user_rights = CONCAT(user_rights, '.S7') WHERE user_level = 103");39 $commands[] = array('type' => 'db', 'value' => "INSERT INTO TABLE ##PREFIX##admin (admin_rights, admin_image, admin_title, admin_link, admin_page) VALUES ('S7', 'settings_lang.gif', 'Language Setiings', 'settings_language.php', '3')"); 40 $commands[] = array('type' => 'db', 'value' => "UPDATE ##PREFIX##users SET user_rights = CONCAT(user_rights, ".S7") WHERE user_level = 103"); 41 41 42 42 // add module identification to user_groups, so they can be removed when uninstalling a module 43 43 $commands[] = array('type' => 'db', 'value' => "ALTER TABLE ##PREFIX##user_groups ADD group_ident CHAR(4) NOT NULL AFTER group_id"); 44 45 // check if we have a usergroup called sponsors, if so, add the group_ident. If not, add the user_group 46 $commands[] = array('type' => 'function', 'value' => "sponsor_group"); 47 48 /*---------------------------------------------------+ 49 | functions required for part of the upgrade process | 50 +----------------------------------------------------*/ 51 52 function sponsor_group() { 53 global $db_prefix; 54 55 $result = dbquery("SELECT * FROM ".$db_prefix."user_groups WHERE group_name = 'Sponsors'"); 56 if ($result) { 57 $data = dbarray($result); 58 $result = dbquery("UPDATE ".$db_prefix."user_groups SET group_ident = 'wE01' WHERE group_id = '".$data['group_id']."'"); 59 } else { 60 $result = dbquery("INSERT INTO ".$db_prefix."user_groups (group_ident, group_name, group_description, group_visible) VALUES ('wE01', 'Sponsors', 'Website Sponsors', '0'"); 61 } 62 } 44 63 ?>
Note: See TracChangeset
for help on using the changeset viewer.
