From 8a69743ef1dee8057e248246558527b3495bd515 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Sun, 17 Feb 2008 01:03:12 +0000 Subject: Removing local config.php --- config.php | 86 --------------------------------------------------------- config.php-dist | 8 +++--- 2 files changed, 4 insertions(+), 90 deletions(-) delete mode 100644 config.php diff --git a/config.php b/config.php deleted file mode 100644 index 0a1a2d6..0000000 --- a/config.php +++ /dev/null @@ -1,86 +0,0 @@ -_rootDir = "/var/www/nutridb.org/trunk"; # root directory -$config->_rootUri = "http://localhost/nutridb.org/trunk"; # root uri -$config->_imgUri = "{$config->_rootUri}/images"; # where images live -$config->_cssUri = "{$config->_rootUri}/css"; # where css files live -$config->_jsUri = "{$config->_rootUri}/js"; # where javascript files live -$config->_smarty = "{$config->_rootDir}/smarty"; # where smarty files live -$config->_recordsPerPage = "30"; # number of results per page on food_search.php -$config->_thisScript = basename($_SERVER['PHP_SELF']); - -# in some cases we might want to send the user back to the page -# they came from, but HTTP_REFERER won't always be set for -# various reason, so if it isn't then just sent them back to the -# root URI. -if ( isset($_SERVER['HTTP_REFERER']) ) { - $config->_previousUri = $_SERVER['HTTP_REFERER']; -} else { - $config->_previousUri = "{$config->_rootUri}/"; -} - -# include the necessary libraries and classes -require("lib/site.lib.php"); # functions specific to this site -require("lib/standard.lib.php"); # standard functions useful for any site -require("lib/database.class.php"); # database class -require("lib/xajax_0.2.4/xajax.inc.php"); # Ajax class - xajaxproject.org -require(SMARTYDIR . "/Smarty.class.php"); # Smarty templates - -# start a session. we may not need it but start it anyway -session_start(); - -# instantiate the database object -$db = new Database(); - -# instantiate and configure XAJAX -$xajax = new xajax(); -$xajax->registerFunction("removeCurrentMealItem"); -$xajax->registerFunction("clearCurrentMeal"); -$xajax->registerFunction("removeMealItem"); -$xajax->registerFunction("removeDiaryItem"); -$xajax->registerFunction("loadMealToEdit"); -$xajax->registerFunction("loadFoodToEdit"); -$xajax->registerFunction("usernameExists"); -$xajax->processRequests(); - - -# instantiate and configure Smarty -$smarty = new Smarty(); -#$smarty->caching = true; # turn on smarty template caching -$smarty->template_dir = "{$config->_rootDir}/templates"; -$smarty->compile_dir = "{$config->_smarty}/templates_c"; -$smarty->cache_dir = "{$config->_smarty}/cache"; -$smarty->config_dir = "{$config->_smarty}/configs"; - -# go ahead and register our $config object with smarty -$smarty->assign("config", $config); - -?> diff --git a/config.php-dist b/config.php-dist index cbf01e7..7725397 100644 --- a/config.php-dist +++ b/config.php-dist @@ -10,9 +10,9 @@ error_reporting(E_ALL); # show all errors # site constants that don't need to be interpolated in strings and/or # are more sensitive will be setup as constants define("DBHOST", "localhost"); # database host -define("DBNAME", "nutridb_sr19"); # database name +define("DBNAME", "nutridb"); # database name define("DBUSER", "nutridb"); # database user -define("DBPASS", "Nutr1dbAdm1n"); # database password +define("DBPASS", ""); # database password define("ADODBDIR", "/usr/share/php/adodb"); # adodb db abastractions libs - adodb.sourceforge.net define("SMARTYDIR", "/usr/share/php/smarty/libs"); # Smarty templates dir - smarty.php.net @@ -28,8 +28,8 @@ $config = new siteConfig; # variables that need to be interpolated inside strings and HEREDOCs # will go in the siteConfig object -$config->_rootDir = "/var/www/nutridb/devel"; # root directory -$config->_rootUri = "http://localhost/nutridb/devel"; # root uri +$config->_rootDir = "/var/www/nutridb.org"; # root directory +$config->_rootUri = "http://nutridb.org"; # root uri $config->_imgUri = "{$config->_rootUri}/images"; # where images live $config->_cssUri = "{$config->_rootUri}/css"; # where css files live $config->_jsUri = "{$config->_rootUri}/js"; # where javascript files live -- cgit v1.2.3