|
From: Benjamin C. <bc...@us...> - 2002-01-26 16:46:57
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16449
Modified Files:
config-dist.php config.php include.php install.php
Log Message:
Changes for INSTALL_PATH
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- config-dist.php 2002/01/26 16:11:26 1.6
+++ config-dist.php 2002/01/26 16:46:52 1.7
@@ -60,8 +60,8 @@
define ('ONEDAY', 86400);
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/db/'.DB_TYPE.'.php');
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/auth.php');
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/template.php');
+require_once (INSTALL_PATH.'/inc/db/'.DB_TYPE.'.php');
+require_once (INSTALL_PATH.'/inc/auth.php');
+require_once (INSTALL_PATH.'/inc/template.php');
?>
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- config.php 2002/01/26 16:11:26 1.22
+++ config.php 2002/01/26 16:46:52 1.23
@@ -62,8 +62,8 @@
define ('ONEDAY', 86400);
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/db/'.DB_TYPE.'.php');
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/auth.php');
-require_once (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/template.php');
+require_once (INSTALL_PATH.'/inc/db/'.DB_TYPE.'.php');
+require_once (INSTALL_PATH.'/inc/auth.php');
+require_once (INSTALL_PATH.'/inc/template.php');
?>
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -r1.92 -r1.93
--- include.php 2002/01/26 14:48:29 1.92
+++ include.php 2002/01/26 16:46:52 1.93
@@ -25,12 +25,7 @@
// Where are we?
define ('INSTALL_PATH', dirname(__FILE__));
-// Handle being included from admin files
-if (!defined('INCLUDE_PATH')) {
- define('INCLUDE_PATH', '');
-}
-
-if (!@include (INSTALL_PATH.'/'.INCLUDE_PATH.'config.php')) {
+if (!@include (INSTALL_PATH.'/config.php')) {
header("Location: install.php");
exit();
}
@@ -40,7 +35,7 @@
}
// Grab the global functions
-include (INSTALL_PATH.'/'.INCLUDE_PATH.'inc/functions.php');
+include (INSTALL_PATH.'/inc/functions.php');
class dbclass extends DB_Sql {
var $classname = 'dbclass';
@@ -116,10 +111,6 @@
$q = new dbclass;
-//include INSTALL_PATH.'/'.INCLUDE_PATH.'inc/adodb/adodb.inc.php';
-//$db =& ADONewConnection(DB_TYPE);
-//$db->PConnect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
-
// Set up the configuration variables
$q->query('select varname, varvalue from '.TBL_CONFIGURATION);
while (list($k, $v) = $q->grab()) {
@@ -127,7 +118,7 @@
}
// Localization - include the file with the desired language
-include INSTALL_PATH.'/'.INCLUDE_PATH.'languages/'.LANGUAGE.'.php';
+include INSTALL_PATH.'/languages/'.LANGUAGE.'.php';
$me = $HTTP_SERVER_VARS['PHP_SELF'];
$me2 = $HTTP_SERVER_VARS['REQUEST_URI'];
@@ -203,10 +194,12 @@
}
}
-if (INCLUDE_PATH == '../') {
- $t = new templateclass(INCLUDE_PATH.'templates/'.THEME.'/admin', 'keep');
+if (defined('TEMPLATE_PATH')) {
+ $t = new templateclass(INSTALL_PATH.'/templates/'.THEME.'/'.TEMPLATE_PATH, 'keep');
+ $t->set_var('template_path', '../templates/'.THEME.'/'.TEMPLATE_PATH);
} else {
- $t = new templateclass('templates/'.THEME.'/', 'keep');
+ $t = new templateclass(INSTALL_PATH.'/templates/'.THEME, 'keep');
+ $t->set_var('template_path', 'templates/'.THEME);
}
$t->set_var(array(
@@ -214,8 +207,7 @@
'me' => $me,
'me2' => $me2,
'error' => '',
- 'loginerror' => '',
- 'template_path' => INCLUDE_PATH.'templates/'.THEME));
+ 'loginerror' => ''));
// End classes -- Begin page
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- install.php 2002/01/26 14:48:29 1.10
+++ install.php 2002/01/26 16:46:52 1.11
@@ -25,11 +25,7 @@
define ('INSTALL_PATH', dirname(__FILE__));
-if (!defined('INCLUDE_PATH')) {
- define('INCLUDE_PATH', '');
-}
-
-include (INSTALL_PATH.'/'.INCLUDE_PATH.'/inc/template.php');
+include (INSTALL_PATH.'/inc/template.php');
$t = new Template('templates/default', 'keep');
$t->set_var('me', $HTTP_SERVER_VARS['PHP_SELF']);
$_gv =& $HTTP_GET_VARS;
|