diff --git a/mozilla/webtools/addons/public/htdocs/.htaccess b/mozilla/webtools/addons/public/htdocs/.htaccess index 2db29fa2f7e..6d89f69e2c8 100644 --- a/mozilla/webtools/addons/public/htdocs/.htaccess +++ b/mozilla/webtools/addons/public/htdocs/.htaccess @@ -1,6 +1,6 @@ # You MUST define [your path]/inc as an include_path! # Going to have to change this, bub. -php_value include_path /home/morgamic/public_html/v2/inc:.:/usr/share/pear:/home/morgamic/public_html/v2/lib +php_value include_path /home/morgamic/public_html/v2/public/inc:.:/usr/share/pear:/home/morgamic/public_html/v2/shared/lib # Init script to set up required libraries. php_value auto_prepend_file init.php diff --git a/mozilla/webtools/addons/public/htdocs/index.php b/mozilla/webtools/addons/public/htdocs/index.php index cb61d26c441..38a69594cce 100644 --- a/mozilla/webtools/addons/public/htdocs/index.php +++ b/mozilla/webtools/addons/public/htdocs/index.php @@ -11,7 +11,7 @@ startProcessing('index.tpl', 'nonav'); -// init the stuff we need to generate content +// Init only the stuff we need to generate content. require_once('includes.php'); // Arrays to store clean inputs. diff --git a/mozilla/webtools/addons/public/inc/config-dist.php b/mozilla/webtools/addons/public/inc/config-dist.php index b39ceb9ae93..938c1b0f597 100644 --- a/mozilla/webtools/addons/public/inc/config-dist.php +++ b/mozilla/webtools/addons/public/inc/config-dist.php @@ -11,25 +11,33 @@ define('DISPLAY_ERRORS',1); define('ERROR_REPORTING',2047); -define('ROOT_PATH','/home/morgamic/public_html/v2'); -define('WEB_PATH','/~morgamic/v2'); +// This is the root directory for public. +define('ROOT_PATH','/home/morgamic/public_html/v2/public'); + +// This is the web path from the hostname. +// In production, it's typically just "". +define('WEB_PATH','/~morgamic/v2/public/htdocs'); // The repository directory is the place to store all addons binaries. -// This directory should be writable by the webserver (apache:apache). define('REPO_DIR',ROOT_PATH.'/files'); -define('LIB',ROOT_PATH.'/lib'); +// Shared library directory contains all class definitions and central code. +define('LIB','/home/morgamic/public_html/v2/shared/lib'); +// Smarty configuration. +define('SMARTY_BASEDIR','/usr/local/lib/php/Smarty'); define('TEMPLATE_DIR',ROOT_PATH.'/tpl'); -define('COMPILE_DIR',LIB.'/smarty/templates_c'); -define('CACHE_DIR',LIB.'/smarty/cache'); -define('CONFIG_DIR',LIB.'/smarty/configs'); +define('COMPILE_DIR',ROOT_PATH.'/templates_c'); +define('CACHE_DIR',ROOT_PATH.'/cache'); +define('CONFIG_DIR',ROOT_PATH.'/configs'); -define('DB_USER','username'); -define('DB_PASS','password'); -define('DB_HOST','localhost'); -define('DB_NAME','database'); -define('DB_PORT', '3306'); +// Database information. +define('DB_USER',''); +define('DB_PASS',''); +define('DB_HOST',''); +define('DB_NAME',''); +define('DB_PORT', ''); -define('USE_DB_SESSIONS', TRUE); +// When set to true, db sessions are available. +define('USE_DB_SESSIONS', true); ?> diff --git a/mozilla/webtools/addons/public/inc/init.php b/mozilla/webtools/addons/public/inc/init.php index 1a362ebbc28..dcd0cd8f4fd 100644 --- a/mozilla/webtools/addons/public/inc/init.php +++ b/mozilla/webtools/addons/public/inc/init.php @@ -8,7 +8,7 @@ */ // Include config file. require_once('config.php'); -require_once('/usr/local/lib/php/Smarty/Smarty.class.php'); // Smarty +require_once(SMARTY_BASEDIR.'/Smarty.class.php'); // Smarty // Set runtime options. ini_set('display_errors',DISPLAY_ERRORS); @@ -46,8 +46,8 @@ function startProcessing($aTplName, $aPageType) $tpl = new AMO_Smarty(); if ($tpl->is_cached($aTplName)) { - include ("finish.php"); - exit; + require_once('finish.php'); + exit; } }