diff --git a/www/configs/config.inc b/www/configs/config.inc index 57b2687d..4e862b9b 100644 --- a/www/configs/config.inc +++ b/www/configs/config.inc @@ -19,14 +19,19 @@ DEFINE('DEFAULT_ENCODING', "UTF-8"); /************* PATHS *********************/ - // path to document root of file called - DEFINE('ROOT', getcwd()."/"); + // ** NEW/BETTER DIR DECLARATIONS ** // path to original file (if symlink) DEFINE('DIR', __DIR__."/"); // libs base path based on DIR DEFINE('LIBDIR', DIR.'libs/'); // SMARTY path based on DIR DEFINE('SMARTYDIR', DIR.'Smarty/'); + // table arrays for Class Form + DEFINE('TABLEARRAYDIR', DIR.'table_arrays/'); + + // ** OLD DIR DECLARATIONS ** + // path to document root of file called + DEFINE('ROOT', getcwd()."/"); // libs path DEFINE('LIBS', "libs/"); // includes (strings, arrays for stati, etc) @@ -255,6 +260,7 @@ $dirs = array ( LIBDIR, SMARTYDIR, + TABLEARRAYDIR, '', LIBS, SMARTY, diff --git a/www/libs/Class.DB.IO.inc b/www/libs/Class.DB.IO.inc index c778f39e..685a85ae 100644 --- a/www/libs/Class.DB.IO.inc +++ b/www/libs/Class.DB.IO.inc @@ -353,7 +353,7 @@ $this->db_debug = $GLOBALS['DB_DEBUG']; // includes sub class for db type - include_once(LIBS.$this->db_type.'.inc'); + _spl_autoload($this->db_type.'.inc'); $this->db_functions = new $this->db_type(); // connect to DB diff --git a/www/libs/Class.Form.Generate.inc b/www/libs/Class.Form.Generate.inc index ef6f8c70..d68037d9 100644 --- a/www/libs/Class.Form.Generate.inc +++ b/www/libs/Class.Form.Generate.inc @@ -259,7 +259,7 @@ $this->l = new l10n($lang); // load config array // get table array definitions for current page name - include(TABLE_ARRAYS."array_".$this->my_page_name.".inc"); + _spl_autoload('array_'.$this->my_page_name.'.inc'); $config_array = ${$this->my_page_name};