Changeset 12802 for trunk/admin/include
- Timestamp:
- Dec 29, 2011, 6:48:16 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/updates.class.php
r12261 r12802 317 317 include(PHPWG_ROOT_PATH.'admin/include/mysqldump.php'); 318 318 319 $path = $conf['local_data_dir'].'/update';319 $path = PHPWG_ROOT_PATH.$conf['data_location'].'update'; 320 320 321 321 if (@mkgetdir($path) … … 351 351 352 352 @readfile($backupFile); 353 self::deltree( $conf['local_data_dir'].'/update');353 self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update'); 354 354 exit(); 355 355 } … … 387 387 if (empty($page['errors'])) 388 388 { 389 $path = $conf['local_data_dir'].'/update';389 $path = PHPWG_ROOT_PATH.$conf['data_location'].'update'; 390 390 $filename = $path.'/'.$code.'.zip'; 391 391 @mkgetdir($path); … … 450 450 { 451 451 self::process_obsolete_list($obsolete_list); 452 self::deltree( $conf['local_data_dir'].'/update');452 self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update'); 453 453 invalidate_user_cache(true); 454 454 $template->delete_compiled_templates(); … … 466 466 else 467 467 { 468 file_put_contents($conf['local_data_dir'].'/update/log_error.txt', $error); 469 $relative_path = trim(str_replace(dirname(dirname(dirname(dirname(__FILE__)))), '', $conf['local_data_dir']), '/\\'); 468 file_put_contents(PHPWG_ROOT_PATH.$conf['data_location'].'update/log_error.txt', $error); 470 469 array_push( 471 470 $page['errors'], 472 471 sprintf( 473 472 l10n('An error has occured during extract. Please check files permissions of your piwigo installation.<br><a href="%s">Click here to show log error</a>.'), 474 PHPWG_ROOT_PATH.$relative_path.'/update/log_error.txt'473 get_root_url().$conf['data_location'].'update/log_error.txt' 475 474 ) 476 475 ); … … 479 478 else 480 479 { 481 self::deltree( $conf['local_data_dir'].'/update');480 self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update'); 482 481 array_push($page['errors'], l10n('An error has occured during upgrade.')); 483 482 }
Note: See TracChangeset
for help on using the changeset viewer.