Changeset 953
- Timestamp:
- Nov 24, 2005, 10:37:29 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r879 r953 132 132 mysql_select_db( $cfgBase ) 133 133 or die ( "Could not connect to database" ); 134 134 135 if ($conf['check_upgrade_feed']) 136 { 137 define('PREFIX_TABLE', $prefixeTable); 138 define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db'); 139 140 // retrieve already applied upgrades 141 $query = ' 142 SELECT id 143 FROM '.PREFIX_TABLE.'upgrade 144 ;'; 145 $applied = array_from_query($query, 'id'); 146 147 // retrieve existing upgrades 148 $existing = array(); 149 150 if ($contents = opendir(UPGRADES_PATH)) 151 { 152 while (($node = readdir($contents)) !== false) 153 { 154 if (is_file(UPGRADES_PATH.'/'.$node) 155 and preg_match('/^(.*?)-database\.php$/', $node, $match)) 156 { 157 array_push($existing, $match[1]); 158 } 159 } 160 } 161 natcasesort($existing); 162 163 // which upgrades need to be applied? 164 if (count(array_diff($existing, $applied)) > 0) 165 { 166 echo 167 '<p>' 168 .'Some database upgrades are missing, ' 169 .'<a href="'.PHPWG_ROOT_PATH.'upgrade_feed.php">upgrade now</a>' 170 .'</p>' 171 ; 172 } 173 } 174 135 175 // 136 176 // Setup gallery wide options, if this fails then we output a CRITICAL_ERROR -
trunk/include/config_default.inc.php
r937 r953 183 183 $conf['mail_options'] = false; 184 184 185 // check_upgrade_feed: check if there are database upgrade required. Set to 186 // true, a message will strongly encourage you to upgrade your database if 187 // needed. 188 // 189 // This configuration parameter is set to true in BSF branch and to false 190 // elsewhere. 191 $conf['check_upgrade_feed'] = true; 192 185 193 // +-----------------------------------------------------------------------+ 186 194 // | metadata | -
trunk/include/constants.php
r879 r953 60 60 define('USER_CACHE_TABLE', $prefixeTable.'user_cache'); 61 61 define('CADDIE_TABLE', $prefixeTable.'caddie'); 62 define('UPGRADE_TABLE', $prefixeTable.'upgrade'); 62 63 ?> -
trunk/install/phpwebgallery_structure.sql
r860 r953 202 202 203 203 -- 204 -- Table structure for table `phpwebgallery_upgrade` 205 -- 206 207 DROP TABLE IF EXISTS `phpwebgallery_upgrade`; 208 CREATE TABLE `phpwebgallery_upgrade` ( 209 `id` varchar(20) NOT NULL default '', 210 `applied` datetime NOT NULL default '0000-00-00 00:00:00', 211 `description` varchar(255) default NULL, 212 PRIMARY KEY (`id`) 213 ) TYPE=MyISAM; 214 215 -- 204 216 -- Table structure for table `phpwebgallery_user_access` 205 217 --
Note: See TracChangeset
for help on using the changeset viewer.