Changeset 2768 for trunk/upgrade.php
- Timestamp:
- Oct 17, 2008, 10:39:30 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/upgrade.php
r2747 r2768 197 197 } 198 198 } 199 else if (!in_array('md5sum', $columns_of[PREFIX_TABLE.'images'])) 200 { 201 $current_release = '1.7.0'; 202 } 199 203 else 200 204 { … … 218 222 else 219 223 { 220 if (in_array( PREFIX_TABLE.'history_summary', $tables))224 if (in_array('md5sum', $columns_of[PREFIX_TABLE.'images'])) 221 225 { 222 226 die('No database upgrade required, do not refresh the page'); … … 230 234 $conf['die_on_sql_error'] = false; 231 235 include($upgrade_file); 232 233 // Available upgrades must be ignored after a fresh installation. To234 // make PWG avoid upgrading, we must tell it upgrades have already been235 // made.236 list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));237 define('CURRENT_DATE', $dbnow);238 $datas = array();239 foreach (get_available_upgrade_ids() as $upgrade_id)240 {241 array_push(242 $datas,243 array(244 'id' => $upgrade_id,245 'applied' => CURRENT_DATE,246 'description' => 'upgrade included in migration',247 )248 );249 }250 mass_inserts(251 UPGRADE_TABLE,252 array_keys($datas[0]),253 $datas254 );255 236 256 237 // Create empty local files to avoid log errors … … 299 280 $template->assign('infos', $page['infos']); 300 281 301 $query = ' 302 UPDATE '.USER_CACHE_TABLE.' 303 SET need_update = \'true\' 304 ;'; 305 306 pwg_query($query); 307 $query = ' 308 REPLACE INTO '.PLUGINS_TABLE.' 309 (id, state) 310 VALUES (\'c13y_upgrade\', \'active\') 311 ;'; 312 pwg_query($query); 282 invalidate_user_cache(); 313 283 } 314 284 else
Note: See TracChangeset
for help on using the changeset viewer.