aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/updates.class.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-12-29 05:48:16 +0000
committerrvelices <rv-github@modusoptimus.com>2011-12-29 05:48:16 +0000
commit1e1b71c6f6102de04e5654ee04596a0dea616d32 (patch)
tree1145317096610e5d5039b11d955b43c662636351 /admin/include/updates.class.php
parent5331c7f9401ee96fcf8f7aee6cb74c03fb5cdcb5 (diff)
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
Diffstat (limited to '')
-rw-r--r--admin/include/updates.class.php15
1 files changed, 7 insertions, 8 deletions
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.<br><a href="%s">Click here to show log error</a>.'),
- 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.'));
}
}