|
From: Benjamin C. <bc...@us...> - 2002-04-09 21:08:15
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv26402
Modified Files:
config-dist.php config.php include.php
Log Message:
Fun with paths
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- config-dist.php 8 Apr 2002 15:19:33 -0000 1.13
+++ config-dist.php 9 Apr 2002 20:53:07 -0000 1.14
@@ -29,6 +29,7 @@
define ('DB_PASSWORD', '{db_pass}'); // password for database connection
// Smarty templates location (leave blank if Smarty is in include path)
+// If not blank, make sure the trailing slash is present.
define ('SMARTY_PATH', '{smarty_path}');
// Database Table Config
@@ -65,8 +66,8 @@
define ('ONEDAY', 86400);
-require_once (INSTALL_PATH.'/inc/db/'.DB_TYPE.'.php');
-require_once (INSTALL_PATH.'/inc/auth.php');
-require_once (INSTALL_PATH.'/inc/template.php');
+require_once ('inc/db/'.DB_TYPE.'.php');
+require_once ('inc/auth.php');
+require_once ('inc/template.php');
?>
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- config.php 8 Apr 2002 15:19:33 -0000 1.28
+++ config.php 9 Apr 2002 20:53:07 -0000 1.29
@@ -32,6 +32,7 @@
define ('DB_PASSWORD', '');
// Smarty templates location (leave blank if Smarty is in include path)
+// If not blank, make sure the trailing slash is present.
define ('SMARTY_PATH', '');
// Database Table Config
@@ -67,8 +68,8 @@
define ('ONEDAY', 86400);
-require_once (INSTALL_PATH.'/inc/db/'.DB_TYPE.'.php');
-require_once (INSTALL_PATH.'/inc/auth.php');
-require_once (INSTALL_PATH.'/inc/template.php');
+require_once ('inc/db/'.DB_TYPE.'.php');
+require_once ('inc/auth.php');
+require_once ('inc/template.php');
?>
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- include.php 8 Apr 2002 21:25:31 -0000 1.111
+++ include.php 9 Apr 2002 20:53:07 -0000 1.112
@@ -25,9 +25,9 @@
ini_set("magic_quotes_runtime", 0);
// Where are we?
-define ('INSTALL_PATH', dirname(__FILE__));
+#define ('INSTALL_PATH', dirname(__FILE__));
-if (!@include (INSTALL_PATH.'/config.php')) {
+if (!@include('config.php')) {
header("Location: install.php");
exit();
}
@@ -37,7 +37,7 @@
}
// Grab the global functions
-include (INSTALL_PATH.'/inc/functions.php');
+include ('inc/functions.php');
// PEAR::DB
require_once('DB.php');
@@ -60,7 +60,7 @@
}
// Localization - include the file with the desired language
-include INSTALL_PATH.'/languages/'.LANGUAGE.'.php';
+include 'languages/'.LANGUAGE.'.php';
$me = $HTTP_SERVER_VARS['PHP_SELF'];
$me2 = !empty($HTTP_SERVER_VARS['REQUEST_URI']) ? $HTTP_SERVER_VARS['REQUEST_URI'] :
@@ -97,7 +97,7 @@
// Template class
-if (!@include((SMARTY_PATH==''?'':(INSTALL_PATH . '/')) . SMARTY_PATH . 'Smarty.class.php')) {
+if (!@include(SMARTY_PATH . 'Smarty.class.php')) {
include('templates/default/base/smartymissing.html');
exit;
}
@@ -111,8 +111,8 @@
}
$t = new extSmarty;
-$t->template_dir = INSTALL_PATH.'/templates/'.THEME.'/';
-$t->compile_dir = INSTALL_PATH.'/c_templates';
+$t->template_dir = 'templates/'.THEME.'/';
+$t->compile_dir = 'c_templates';
$t->config_dir = '.';
$t->register_function('build_select', 'build_select');
$t->register_function('project_js', 'build_project_js');
@@ -194,7 +194,7 @@
}
if (defined('FORCE_LOGIN') and FORCE_LOGIN and !$u and !defined('NO_AUTH')) {
- include(INSTALL_PATH.'/templates/'.THEME.'/login.html');
+ include('templates/'.THEME.'/login.html');
exit;
}
|