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
This commit is contained in:
rvelices
2011-12-29 05:48:16 +00:00
parent 5331c7f940
commit 1e1b71c6f6
14 changed files with 94 additions and 39 deletions

View File

@@ -110,9 +110,9 @@ include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
defined('PWG_LOCAL_DIR') or define('PWG_LOCAL_DIR', 'local/');
// download database config file if exists
if (!empty($_GET['dl']) && file_exists($conf['local_data_dir'].'/pwg_'.$_GET['dl']))
if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
{
$filename = $conf['local_data_dir'].'/pwg_'.$_GET['dl'];
$filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');
header('Content-Disposition: attachment; filename="database.inc.php"');
@@ -281,7 +281,7 @@ define(\'DB_COLLATE\', \'\');
if ( !($fp = @fopen( $config_file, 'w' )))
{
$tmp_filename = md5(uniqid(time()));
$fh = @fopen( $conf['local_data_dir'] . '/pwg_' . $tmp_filename, 'w' );
$fh = @fopen( PHPWG_ROOT_PATH.$conf['data_location'] . 'pwg_' . $tmp_filename, 'w' );
@fputs($fh, $file_content, strlen($file_content));
@fclose($fh);