Permalink
Browse files

Resolved issue 0000794: Avoid to change create_listing_file.php on ea…

…ch 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
  • Loading branch information...
rub
rub committed Jan 27, 2008
1 parent c1448de commit 48220bdf7bf9a244cc5c8eef8c88dc4cda3c2c80
Showing with 29 additions and 6 deletions.
  1. +15 −6 tools/create_listing_file.php
  2. +14 −0 tools/create_listing_file_local.inc.php
@@ -35,7 +35,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 @@
// ****** 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 @@
// 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['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;
@@ -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;
+
+?>

0 comments on commit 48220bd

Please sign in to comment.