|
From: Benjamin C. <bc...@us...> - 2002-04-08 15:19:40
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13106
Modified Files:
config-dist.php config.php include.php install.php
Log Message:
Make it easier to get smarty included
Index: config-dist.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- config-dist.php 3 Apr 2002 01:01:38 -0000 1.12
+++ config-dist.php 8 Apr 2002 15:19:33 -0000 1.13
@@ -28,6 +28,9 @@
define ('DB_USER', '{db_user}'); // username for database connection
define ('DB_PASSWORD', '{db_pass}'); // password for database connection
+// Smarty templates location (leave blank if Smarty is in include path)
+define ('SMARTY_PATH', '{smarty_path}');
+
// Database Table Config
// you can change either the prefix of the table names or each table name individually
define ('TBL_PREFIX', '{tbl_prefix}'); // the prefix for all tables, leave empty to use the old style
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- config.php 29 Mar 2002 18:25:37 -0000 1.27
+++ config.php 8 Apr 2002 15:19:33 -0000 1.28
@@ -31,6 +31,9 @@
define ('DB_USER', 'root');
define ('DB_PASSWORD', '');
+// Smarty templates location (leave blank if Smarty is in include path)
+define ('SMARTY_PATH', '');
+
// Database Table Config
// you can change either the prefix of the table names or each table name individually
define ('TBL_PREFIX', ''); // the prefix for all tables, leave empty to use the old style
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- include.php 3 Apr 2002 18:54:08 -0000 1.108
+++ include.php 8 Apr 2002 15:19:33 -0000 1.109
@@ -95,7 +95,7 @@
$default_db_fields = array('bug_id', 'title', 'reporter', 'owner',
'severity_name', 'priority', 'status_name', 'resolution_name');
-require('Smarty.class.php'); // Template class
+require(SMARTY_PATH . 'Smarty.class.php'); // Template class
// Template class
class extSmarty extends Smarty {
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- install.php 4 Apr 2002 23:30:42 -0000 1.22
+++ install.php 8 Apr 2002 15:19:33 -0000 1.23
@@ -26,9 +26,9 @@
define ('INSTALL_PATH', dirname(__FILE__));
// Location of smarty templates class
- define ('SMARTY_PATH','');
- // Example if smarty is installed within the phpBugTracker tree.
- //define ('SMARTY_PATH','./inc/smarty/');
+define ('SMARTY_PATH','');
+// Example if smarty is installed within the phpBugTracker tree.
+//define ('SMARTY_PATH','./inc/smarty/');
if (!@include(SMARTY_PATH . 'Smarty.class.php')) { // Template class
die('<br><br>
@@ -147,6 +147,10 @@
$patterns[] = '{'.$key.'}';
$replacements[] = $val;
}
+ // Smarty
+ $patterns[] = '{smarty_path}';
+ $replacements[] = SMARTY_PATH;
+
$contents = join('', file('config-dist.php'));
return str_replace($patterns, $replacements, $contents);
|