Changeset 15680 for trunk/admin
- Timestamp:
- Jun 14, 2012, 11:46:47 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/updates.class.php
r13467 r15680 360 360 } 361 361 362 function upgrade_to($upgrade_to, &$step )362 function upgrade_to($upgrade_to, &$step, $check_current_version=true) 363 363 { 364 364 global $page, $conf, $template; 365 365 366 if ( !version_compare($_POST['upgrade_to'], PHPWG_VERSION, '>'))366 if ($check_current_version and !version_compare($upgrade_to, PHPWG_VERSION, '>')) 367 367 { 368 368 redirect(get_root_url().'admin.php?page=plugin-'.basename(dirname(__FILE__))); … … 372 372 { 373 373 preg_match('/(\d+\.\d+)\.(\d+)/', PHPWG_VERSION, $matches); 374 $code = $matches[1].'.x_to_'.$ _POST['upgrade_to'];374 $code = $matches[1].'.x_to_'.$upgrade_to; 375 375 $dl_code = str_replace(array('.', '_'), '', $code); 376 376 $remove_path = $code; … … 379 379 else 380 380 { 381 $code = $ _POST['upgrade_to'];381 $code = $upgrade_to; 382 382 $dl_code = $code; 383 383 $remove_path = version_compare($code, '2.0.8', '>=') ? 'piwigo' : 'piwigo-'.$code;
Note: See TracChangeset
for help on using the changeset viewer.