From 48220bdf7bf9a244cc5c8eef8c88dc4cda3c2c80 Mon Sep 17 00:00:00 2001 From: rub Date: Sun, 27 Jan 2008 08:37:59 +0000 Subject: Resolved issue 0000794: Avoid to change create_listing_file.php on each version Resolved issue 0000795: In create_listing_file.php, it's not safe mode but set_time_limit is disabled Merge branch-1_7 2197:2198 into BSF git-svn-id: http://piwigo.org/svn/trunk@2199 68402e56-0260-453c-a942-63ccdbb3a9ee --- tools/create_listing_file.php | 21 +++++++++++++++------ tools/create_listing_file_local.inc.php | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 tools/create_listing_file_local.inc.php (limited to 'tools') diff --git a/tools/create_listing_file.php b/tools/create_listing_file.php index 12827faf5..ad9409fc3 100644 --- a/tools/create_listing_file.php +++ b/tools/create_listing_file.php @@ -35,7 +35,7 @@ $conf['version'] = 'branch 1.7'; // URL of main gallery // Example : http://www.my.domain/my/directory -$conf['gallery'] = 'http://'; +$conf['gallery'] = 'http://demo.phpwebgallery.net/'; // prefix for thumbnails in "thumbnail" sub directories $conf['prefix_thumbnail'] = 'TN-'; @@ -54,6 +54,11 @@ $conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG', // ****** Time limitation functionality ****** // // max execution time before refresh in seconds $conf['max_execution_time'] = (5*ini_get('max_execution_time'))/6; // 25 seconds with default PHP configuration +// force the use of refresh method +// in order to have live informations +// or +// to fix system witch are not safe mode but not autorized set_time_limit +$conf['force_refresh_method'] = true; // refresh delay is seconds $conf['refresh_delay'] = 0; @@ -87,9 +92,6 @@ $conf['use_iptc_mapping'] = array( // Define if directories have to be protected if they are not $conf['protect'] = false; -// index.php content for command 'protect' -$conf['protect_content'] = ''; - // true/false : show/hide warnings $conf['protect_warnings'] = true; @@ -123,6 +125,13 @@ $conf['thumbs'] = 'thumbnail'; // thumbnails $conf['high'] = 'pwg_high'; // high resolution $conf['represent'] = 'pwg_representative'; // non pictures representative files + +// +-----------------------------------------------------------------------+ +// | Overload configurations | +// +-----------------------------------------------------------------------+ +@include(dirname(__FILE__).'/'.basename(__FILE__, '.php').'_local.inc.php'); + + // +-----------------------------------------------------------------------+ // | Advanced script configuration | // +-----------------------------------------------------------------------+ @@ -877,7 +886,7 @@ function pwg_protect_directories($directory) $file = @fopen($dir.'/index.php', 'w'); if ($file != false) { - fwrite($file, $conf['protect_content']); // the return code should be verified + fwrite($file, $pwg_conf['protect_content']); // the return code should be verified $error_log .= ' Success - index.php created in directory '.$dir."
\n"; } else @@ -1385,7 +1394,7 @@ function pwg_continue() } else { - if ($pwg_conf['safe_mode']) + if ($pwg_conf['safe_mode'] or $conf['force_refresh_method']) { // can not reset the time $time_elapsed = pwg_get_moment() - $start_time; diff --git a/tools/create_listing_file_local.inc.php b/tools/create_listing_file_local.inc.php new file mode 100644 index 000000000..8d914cf88 --- /dev/null +++ b/tools/create_listing_file_local.inc.php @@ -0,0 +1,14 @@ + \ No newline at end of file -- cgit v1.2.3