mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user