|
From: Benjamin C. <bc...@us...> - 2002-10-21 20:02:12
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv32520/admin
Modified Files:
configure.php
Log Message:
Append a / to JPGRAPH_PATH if it doesn't end with one.
Index: configure.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/configure.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- configure.php 18 May 2002 03:00:00 -0000 1.9
+++ configure.php 21 Oct 2002 20:02:08 -0000 1.10
@@ -30,14 +30,17 @@
if (isset($_pv['submit'])) {
foreach ($_pv as $k => $v) {
+ // Check the jpgraph path to make sure it has a trailing /
+ if ($k == 'JPGRAPH_PATH' and substr($v, -1) != '/') $v .= '/';
+
$db->query('update '.TBL_CONFIGURATION." set varvalue = '$v' where varname = '$k'");
-
+
// Refresh the template variable now instead of waiting for the next page load.
if ($k == 'STYLE') {
$t->assign('STYLE', $v);
}
}
-}
+}
$t->assign('vars', $db->getAll('select * from '.TBL_CONFIGURATION));
$t->wrap('admin/configure.html', 'configuration');
|