From 1e1b71c6f6102de04e5654ee04596a0dea616d32 Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 29 Dec 2011 05:48:16 +0000 Subject: fetaure 2542 replace $conf['local_data_dir'] with $conf['data_location'] and move combined files and image derivatives from local to _data git-svn-id: http://piwigo.org/svn/trunk@12802 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/include/updates.class.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'admin/include') diff --git a/admin/include/updates.class.php b/admin/include/updates.class.php index 71ce1ca5a..0e3831d52 100644 --- a/admin/include/updates.class.php +++ b/admin/include/updates.class.php @@ -316,7 +316,7 @@ class updates include(PHPWG_ROOT_PATH.'admin/include/mysqldump.php'); - $path = $conf['local_data_dir'].'/update'; + $path = PHPWG_ROOT_PATH.$conf['data_location'].'update'; if (@mkgetdir($path) and ($backupFile = tempnam($path, 'sql')) @@ -350,7 +350,7 @@ class updates } @readfile($backupFile); - self::deltree($conf['local_data_dir'].'/update'); + self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update'); exit(); } else @@ -386,7 +386,7 @@ class updates if (empty($page['errors'])) { - $path = $conf['local_data_dir'].'/update'; + $path = PHPWG_ROOT_PATH.$conf['data_location'].'update'; $filename = $path.'/'.$code.'.zip'; @mkgetdir($path); @@ -449,7 +449,7 @@ class updates if (empty($error)) { self::process_obsolete_list($obsolete_list); - self::deltree($conf['local_data_dir'].'/update'); + self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update'); invalidate_user_cache(true); $template->delete_compiled_templates(); unset($_SESSION['need_update']); @@ -465,20 +465,19 @@ class updates } else { - file_put_contents($conf['local_data_dir'].'/update/log_error.txt', $error); - $relative_path = trim(str_replace(dirname(dirname(dirname(dirname(__FILE__)))), '', $conf['local_data_dir']), '/\\'); + file_put_contents(PHPWG_ROOT_PATH.$conf['data_location'].'update/log_error.txt', $error); array_push( $page['errors'], sprintf( l10n('An error has occured during extract. Please check files permissions of your piwigo installation.
Click here to show log error.'), - PHPWG_ROOT_PATH.$relative_path.'/update/log_error.txt' + get_root_url().$conf['data_location'].'update/log_error.txt' ) ); } } else { - self::deltree($conf['local_data_dir'].'/update'); + self::deltree(PHPWG_ROOT_PATH.$conf['data_location'].'update'); array_push($page['errors'], l10n('An error has occured during upgrade.')); } } -- cgit v1.2.3