]> git.pld-linux.org Git - packages/coppermine-gallery.git/commitdiff
- use /etc/webapps
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 1 May 2006 17:34:13 +0000 (17:34 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    coppermine-gallery-pld.patch -> 1.1

coppermine-gallery-pld.patch [new file with mode: 0644]

diff --git a/coppermine-gallery-pld.patch b/coppermine-gallery-pld.patch
new file mode 100644 (file)
index 0000000..eb63d78
--- /dev/null
@@ -0,0 +1,67 @@
+--- cpg145/install.php 2006-05-01 13:05:17.582794094 +0300
++++ cpg145/install.php 2006-05-01 13:29:35.775346224 +0300
+@@ -339,14 +339,14 @@
+           <td width="40%" class="tableb"><b>MySQL Database Name</b>
+           </td>
+           <td width="60%" class="tableb">
+-                  <input type="text" class="textinput" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
++                  <input type="text" class="textinput" name="dbname" value="<?php echo ($_POST['dbname'] ? $_POST['dbname'] : 'cpg') ?>" />
+           </td>
+          </tr>
+          <tr>
+           <td width="40%" class="tableb"><b>MySQL Username</b>
+           </td>
+           <td width="60%" class="tableb">
+-                  <input type="text" class="textinput" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
++                  <input type="text" class="textinput" name="dbuser" value="<?php echo ($_POST['dbuser'] ? $_POST['dbuser'] : 'cpg') ?>" />
+           </td>
+          </tr>
+          <tr>
+@@ -360,7 +360,7 @@
+           <td width="40%" class="tableb"><b>MySQL table prefix</b><br />(default value is OK; do not use dots!)
+           </td>
+           <td width="60%" class="tableb" valign="top">
+-                  <input type="text" class="textinput" name="table_prefix" value="<?php echo ($_POST['table_prefix'] ? $_POST['table_prefix'] : 'cpg145_') ?>" />
++                  <input type="text" class="textinput" name="table_prefix" value="<?php echo ($_POST['table_prefix'] ? $_POST['table_prefix'] : '') ?>" />
+           </td>
+          </tr>
+          <tr>
+@@ -376,7 +376,7 @@
+           <td width="40%" class="tableb"><b>ImageMagick path</b>
+           </td>
+           <td width="60%" class="tableb" valign="top">
+-                  <input type="text" class="textinput" name="impath" value="<?php echo $_POST['impath'] ?>" />
++                  <input type="text" class="textinput" name="impath" value="<?php echo (isset($_POST['impath']) ? $_POST['impath'] : '/usr/bin') ?>" />
+           </td>
+          </tr>
+          <tr>
+@@ -536,10 +536,12 @@
+ set_magic_quotes_runtime(0);
+ // The defaults values
+ $table_prefix = $_POST['table_prefix'];
+-$DFLT = array('cfg_d' => 'include', // The config file dir
+-    'lck_f' => 'include/install.lock', // Name of install lock file
+-    'cfg_f' => 'include/config.inc.php', // The config file name
+-    'alb_d' => 'albums', // The album dir
++$webapps_dir = '/etc/webapps/coppermine-gallery';
++$var_dir = '/var/lib/coppermine-gallery';
++$DFLT = array('cfg_d' => $webapps_dir, // The config file dir
++    'lck_f' => "$webapps_dir/install.lock", // Name of install lock file
++    'cfg_f' => "$webapps_dir/config.inc.php", // The config file name
++    'alb_d' => "$var_dir/albums", // The album dir
+     'upl_d' => 'userpics', // The uploaded pic dir
+     'edit_d' => 'edit',
+     'sql_d' => 'sql'
+--- cpg145/include/init.inc.php        2006-05-01 13:37:00.735274303 +0300
++++ cpg145/include/init.inc.php        2006-05-01 13:54:20.578477527 +0300
+@@ -147,8 +147,8 @@
+ define('CRITICAL_ERROR', 3);
+ // Include config and functions files
+-if(file_exists('include/config.inc.php')){
+-  require_once 'include/config.inc.php';
++if (file_exists('/etc/webapps/coppermine-gallery/config.inc.php') and filesize('/etc/webapps/coppermine-gallery/config.inc.php') > 0) {
++  require_once '/etc/webapps/coppermine-gallery/config.inc.php';
+ } else {
+   // error handling: if the config file doesn't exist go to install
+   die('<html>
This page took 0.067522 seconds and 4 git commands to generate.