aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2008-01-27 08:37:59 +0000
committerrub <rub@piwigo.org>2008-01-27 08:37:59 +0000
commit48220bdf7bf9a244cc5c8eef8c88dc4cda3c2c80 (patch)
treed3076126c7eec2d1a501a140150841bcd698a148
parentc1448de29e1c9700c58524021c075a023f6b9a6b (diff)
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
Diffstat (limited to '')
-rw-r--r--tools/create_listing_file.php21
-rw-r--r--tools/create_listing_file_local.inc.php14
2 files changed, 29 insertions, 6 deletions
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'] = '<?php header("Location: '.$conf['gallery'].'") ?>';
-
// 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 .= ' <code class="success">Success -</code> index.php created in directory <a href="'.$dir.'">'.$dir."</a><br />\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 @@
+<?php
+// this file is provided as an example.
+// Move it to "create_listing_file.php"
+// directory if you want to modify default configuration.
+
+// URL of main gallery
+// Example : http://www.my.domain/my/directory
+$conf['gallery'] = 'http://demo.piwigo.net/';
+
+$conf['file_ext'] = array_merge($conf['file_ext'], array('flv', 'FLV'));
+
+$conf['force_refresh_method'] = true;
+
+?> \ No newline at end of file