From f795023f8ffe592a5b9bd4425802121d8205c851 Mon Sep 17 00:00:00 2001 From: seek3r Date: Thu, 21 Dec 2000 09:16:30 +0000 Subject: [PATCH] hopefully settled the directory structure once and for all --- addressbook/preferences.php | 2 +- admin/navbar-create.php | 2 +- calendar/preferences.php | 2 +- doc/sgml/index.sgml | 19 ++------ doc/sgml/trouble.sgml | 2 +- header.inc.php.template | 5 ++- index.php | 5 +-- login.php | 2 +- phpgwapi/{ => inc}/footer.inc.php | 5 ++- phpgwapi/{ => inc}/phpgw.inc.php | 44 +++++++++---------- .../{ => inc}/phpgw_accounts_ldap.inc.php | 0 .../{ => inc}/phpgw_accounts_shared.inc.php | 0 phpgwapi/{ => inc}/phpgw_accounts_sql.inc.php | 0 phpgwapi/{ => inc}/phpgw_addressbook.inc.php | 0 phpgwapi/{ => inc}/phpgw_auth_http.inc.php | 0 phpgwapi/{ => inc}/phpgw_auth_ldap.inc.php | 0 phpgwapi/{ => inc}/phpgw_auth_mail.inc.php | 0 phpgwapi/{ => inc}/phpgw_auth_sql.inc.php | 0 phpgwapi/{ => inc}/phpgw_calendar.inc.php | 0 phpgwapi/{ => inc}/phpgw_categories.inc.php | 0 phpgwapi/{ => inc}/phpgw_common.inc.php | 38 +++++++++++++++- phpgwapi/{ => inc}/phpgw_crypto.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_msql.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_mssql.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_mysql.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_odbc.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_oracle.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_pgsql.inc.php | 0 phpgwapi/{ => inc}/phpgw_db_sybase.inc.php | 0 phpgwapi/{ => inc}/phpgw_info.inc.php | 8 ++-- phpgwapi/{ => inc}/phpgw_lang_sql.inc.php | 0 phpgwapi/{ => inc}/phpgw_mime.types | 0 phpgwapi/{ => inc}/phpgw_network.inc.php | 0 phpgwapi/{ => inc}/phpgw_nextmatchs.inc.php | 0 phpgwapi/{ => inc}/phpgw_send.inc.php | 0 phpgwapi/{ => inc}/phpgw_session.inc.php | 0 phpgwapi/{ => inc}/phpgw_template.inc.php | 0 phpgwapi/{ => inc}/phpgw_todo.inc.php | 0 phpgwapi/{ => inc}/phpgw_utilities.inc.php | 12 ++--- .../phpgw_utilities_clientsniffer.inc.php | 0 .../{ => inc}/phpgw_utilities_http.inc.php | 0 .../phpgw_utilities_matrixview.inc.php | 0 .../phpgw_utilities_menutree.inc.php | 0 .../phpgw_utilities_rssparse.inc.php | 0 .../{ => inc}/phpgw_utilities_sbox.inc.php | 0 phpgwapi/{ => inc}/phpgw_vfs.inc.php | 0 preferences/changetheme.php | 2 +- setup/createheader.php | 12 ++--- setup/inc/functions.inc.php | 6 +-- setup/ldap.php | 8 ++-- version.inc.php | 2 +- 51 files changed, 101 insertions(+), 75 deletions(-) rename phpgwapi/{ => inc}/footer.inc.php (92%) rename phpgwapi/{ => inc}/phpgw.inc.php (91%) rename phpgwapi/{ => inc}/phpgw_accounts_ldap.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_accounts_shared.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_accounts_sql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_addressbook.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_auth_http.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_auth_ldap.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_auth_mail.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_auth_sql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_calendar.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_categories.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_common.inc.php (97%) rename phpgwapi/{ => inc}/phpgw_crypto.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_msql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_mssql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_mysql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_odbc.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_oracle.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_pgsql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_db_sybase.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_info.inc.php (93%) rename phpgwapi/{ => inc}/phpgw_lang_sql.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_mime.types (100%) rename phpgwapi/{ => inc}/phpgw_network.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_nextmatchs.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_send.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_session.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_template.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_todo.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_utilities.inc.php (79%) rename phpgwapi/{ => inc}/phpgw_utilities_clientsniffer.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_utilities_http.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_utilities_matrixview.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_utilities_menutree.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_utilities_rssparse.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_utilities_sbox.inc.php (100%) rename phpgwapi/{ => inc}/phpgw_vfs.inc.php (100%) diff --git a/addressbook/preferences.php b/addressbook/preferences.php index c0329635c8..50ed6bd11a 100644 --- a/addressbook/preferences.php +++ b/addressbook/preferences.php @@ -98,5 +98,5 @@ diff --git a/admin/navbar-create.php b/admin/navbar-create.php index f0c6d3a4ce..73f63ed734 100644 --- a/admin/navbar-create.php +++ b/admin/navbar-create.php @@ -28,5 +28,5 @@ The instructions are as follows: echo $phpgw_info["apps"][$key]["title"]."
"; } - include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/footer.inc.php"); ?> diff --git a/calendar/preferences.php b/calendar/preferences.php index d55817306d..37ffb4a26a 100644 --- a/calendar/preferences.php +++ b/calendar/preferences.php @@ -152,4 +152,4 @@ - + diff --git a/doc/sgml/index.sgml b/doc/sgml/index.sgml index 54ad15f8c1..caf5e76f38 100644 --- a/doc/sgml/index.sgml +++ b/doc/sgml/index.sgml @@ -1,21 +1,11 @@ + - - - - - - - - - - - - + ]> phpGroupWare Docs V0.05 @@ -33,7 +23,7 @@ <dan@kuykendall.org> - the active developer of phpGroupWare + the phpGroupWare project leader @@ -48,7 +38,6 @@ &installation; &using; &admins; -&devdocs; +$troubleshoot; &about; - diff --git a/doc/sgml/trouble.sgml b/doc/sgml/trouble.sgml index 7a8a508be1..c47ae5b5db 100644 --- a/doc/sgml/trouble.sgml +++ b/doc/sgml/trouble.sgml @@ -1,4 +1,4 @@ - + Trouble Shooting diff --git a/header.inc.php.template b/header.inc.php.template index 6113fca7a1..66db5c49ad 100644 --- a/header.inc.php.template +++ b/header.inc.php.template @@ -29,7 +29,7 @@ \**************************************************************************/ $phpgw_info["server"]["server_root"] = "__SERVER_ROOT__"; - $phpgw_info["server"]["api_dir"] = "__API_DIR__"; + $phpgw_info["server"]["include_root"] = "__INCLUDE_ROOT__"; $phpgw_domain["default"] = array ( "db_host" => "__DB_HOST__", @@ -78,8 +78,9 @@ /**************************************************************************\ * Do not edit these lines * \**************************************************************************/ + $phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi/inc"; include($phpgw_info["server"]["server_root"]."/version.inc.php"); - $phpgw_info["server"]["header_version"] = "1.6"; + $phpgw_info["server"]["header_version"] = "1.7"; // This is a fix for NT if (!isset($phpgw_info["flags"]["noapi"]) || !$phpgw_info["flags"]["noapi"] == True){ diff --git a/index.php b/index.php index a0c8a6c8c0..b424530595 100755 --- a/index.php +++ b/index.php @@ -169,6 +169,5 @@ - + include($phpgw_info["server"]["api_inc"] . "/footer.inc.php"); +?> \ No newline at end of file diff --git a/login.php b/login.php index 134ae8d2bc..71b59c3d0e 100755 --- a/login.php +++ b/login.php @@ -34,7 +34,7 @@ } */ - $phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["api_dir"]."/templates/default"; + $phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi/templates/default"; $tmpl = new Template($phpgw_info["server"]["template_dir"]); if (! $deny_login && ! $phpgw_info["server"]["show_domain_selectbox"]) { diff --git a/phpgwapi/footer.inc.php b/phpgwapi/inc/footer.inc.php similarity index 92% rename from phpgwapi/footer.inc.php rename to phpgwapi/inc/footer.inc.php index 2a3496d0ff..095f10d37e 100644 --- a/phpgwapi/footer.inc.php +++ b/phpgwapi/inc/footer.inc.php @@ -21,7 +21,10 @@ /**************************************************************************\ * Include the apps footer files if it exists * \**************************************************************************/ - if (file_exists ($phpgw_info["server"]["app_inc"]."/footer.inc.php")){ + if (file_exists ($phpgw_info["server"]["app_inc"]."/footer.inc.php") + && $phpgw_info["flags"]["currentapp"] != "home" + && $phpgw_info["flags"]["currentapp"] != "login" + && $phpgw_info["flags"]["currentapp"] != "logout"){ include($phpgw_info["server"]["app_inc"]."/footer.inc.php"); } diff --git a/phpgwapi/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php similarity index 91% rename from phpgwapi/phpgw.inc.php rename to phpgwapi/inc/phpgw.inc.php index 32a65006eb..d7f04d5718 100644 --- a/phpgwapi/phpgw.inc.php +++ b/phpgwapi/inc/phpgw.inc.php @@ -12,7 +12,7 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3)); $d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3)); if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") { echo "Failed attempt to break in via an old Security Hole!
\n"; @@ -31,24 +31,24 @@ /**************************************************************************\ * Load up all the base files * \**************************************************************************/ - include($phpgw_info["server"]["api_dir"] . "/phpgw_info.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_info.inc.php"); /**************************************************************************\ * Required classes * \**************************************************************************/ /* Load selected database class */ if (empty($phpgw_info["server"]["db_type"])){$phpgw_info["server"]["db_type"] = "mysql";} - include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_info["server"]["db_type"].".inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_db_".$phpgw_info["server"]["db_type"].".inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_session.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_session.inc.php"); /* Load selected translation class */ if (empty($phpgw_info["server"]["translation_system"])){$phpgw_info["server"]["translation_system"] = "sql";} - include($phpgw_info["server"]["api_dir"] . "/phpgw_lang_".$phpgw_info["server"]["translation_system"].".inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_lang_".$phpgw_info["server"]["translation_system"].".inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_crypto.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_template.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_common.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_crypto.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_template.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_common.inc.php"); /**************************************************************************\ * Optional classes, which can be disabled for performance increases * @@ -65,47 +65,47 @@ $phpgw->crypto = new crypto($phpgw->common->key,$phpgw->common->iv); if ($phpgw_info["flags"]["enable_categories_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_categories.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_categories.inc.php"); $phpgw->categories = new categories; } if ($phpgw_info["flags"]["enable_network_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_network.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_network.inc.php"); $phpgw->network = new network; } if ($phpgw_info["flags"]["enable_send_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_send.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_send.inc.php"); $phpgw->send = new send; } if ($phpgw_info["flags"]["enable_nextmatchs_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_nextmatchs.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_nextmatchs.inc.php"); $phpgw->nextmatchs = new nextmatchs; } if ($phpgw_info["flags"]["enable_utilities_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities.inc.php"); $phpgw->utilities = new utilities; } if ($phpgw_info["flags"]["enable_vfs_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_vfs.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_vfs.inc.php"); $phpgw->vfs = new vfs; } if ($phpgw_info["flags"]["enable_todo_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_todo.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_todo.inc.php"); $phpgw->todo = new todo; } if ($phpgw_info["flags"]["enable_calendar_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_calendar.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_calendar.inc.php"); $phpgw->calendar = new calendar; } if ($phpgw_info["flags"]["enable_addressbook_class"]) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_addressbook.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_addressbook.inc.php"); $phpgw->addressbook = new addressbook; } @@ -170,12 +170,12 @@ /* Load selected authentication class */ if (empty($phpgw_info["server"]["auth_type"])){$phpgw_info["server"]["auth_type"] = "sql";} - include($phpgw_info["server"]["api_dir"] . "/phpgw_auth_".$phpgw_info["server"]["auth_type"].".inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_auth_".$phpgw_info["server"]["auth_type"].".inc.php"); /* Load selected accounts class */ if (empty($phpgw_info["server"]["account_repository"])){$phpgw_info["server"]["account_repository"] = $phpgw_info["server"]["auth_type"];} - include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_".$phpgw_info["server"]["account_repository"].".inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_shared.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_".$phpgw_info["server"]["account_repository"].".inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_shared.inc.php"); /**************************************************************************\ * Continue adding the classes * @@ -363,13 +363,13 @@ /**************************************************************************\ * These lines load up the themes * \**************************************************************************/ - include($phpgw_info["server"]["api_dir"] . "/themes/" . + include($phpgw_info["server"]["server_root"] . "/phpgwapi/themes/" . $phpgw_info["user"]["preferences"]["common"]["theme"] . ".theme"); if ($phpgw_info["theme"]["bg_color"] == "") { /* Looks like there was a problem finding that theme. Try the default */ echo "Warning: error locating selected theme"; - include ($phpgw_info["server"]["api_dir"] . "/themes/default.theme"); + include ($phpgw_info["server"]["server_root"] . "/phpgwapi/themes/default.theme"); if ($phpgw_info["theme"]["bg_color"] == "") { // Hope we don't get to this point. Better then the user seeing a // complety back screen and not know whats going on diff --git a/phpgwapi/phpgw_accounts_ldap.inc.php b/phpgwapi/inc/phpgw_accounts_ldap.inc.php similarity index 100% rename from phpgwapi/phpgw_accounts_ldap.inc.php rename to phpgwapi/inc/phpgw_accounts_ldap.inc.php diff --git a/phpgwapi/phpgw_accounts_shared.inc.php b/phpgwapi/inc/phpgw_accounts_shared.inc.php similarity index 100% rename from phpgwapi/phpgw_accounts_shared.inc.php rename to phpgwapi/inc/phpgw_accounts_shared.inc.php diff --git a/phpgwapi/phpgw_accounts_sql.inc.php b/phpgwapi/inc/phpgw_accounts_sql.inc.php similarity index 100% rename from phpgwapi/phpgw_accounts_sql.inc.php rename to phpgwapi/inc/phpgw_accounts_sql.inc.php diff --git a/phpgwapi/phpgw_addressbook.inc.php b/phpgwapi/inc/phpgw_addressbook.inc.php similarity index 100% rename from phpgwapi/phpgw_addressbook.inc.php rename to phpgwapi/inc/phpgw_addressbook.inc.php diff --git a/phpgwapi/phpgw_auth_http.inc.php b/phpgwapi/inc/phpgw_auth_http.inc.php similarity index 100% rename from phpgwapi/phpgw_auth_http.inc.php rename to phpgwapi/inc/phpgw_auth_http.inc.php diff --git a/phpgwapi/phpgw_auth_ldap.inc.php b/phpgwapi/inc/phpgw_auth_ldap.inc.php similarity index 100% rename from phpgwapi/phpgw_auth_ldap.inc.php rename to phpgwapi/inc/phpgw_auth_ldap.inc.php diff --git a/phpgwapi/phpgw_auth_mail.inc.php b/phpgwapi/inc/phpgw_auth_mail.inc.php similarity index 100% rename from phpgwapi/phpgw_auth_mail.inc.php rename to phpgwapi/inc/phpgw_auth_mail.inc.php diff --git a/phpgwapi/phpgw_auth_sql.inc.php b/phpgwapi/inc/phpgw_auth_sql.inc.php similarity index 100% rename from phpgwapi/phpgw_auth_sql.inc.php rename to phpgwapi/inc/phpgw_auth_sql.inc.php diff --git a/phpgwapi/phpgw_calendar.inc.php b/phpgwapi/inc/phpgw_calendar.inc.php similarity index 100% rename from phpgwapi/phpgw_calendar.inc.php rename to phpgwapi/inc/phpgw_calendar.inc.php diff --git a/phpgwapi/phpgw_categories.inc.php b/phpgwapi/inc/phpgw_categories.inc.php similarity index 100% rename from phpgwapi/phpgw_categories.inc.php rename to phpgwapi/inc/phpgw_categories.inc.php diff --git a/phpgwapi/phpgw_common.inc.php b/phpgwapi/inc/phpgw_common.inc.php similarity index 97% rename from phpgwapi/phpgw_common.inc.php rename to phpgwapi/inc/phpgw_common.inc.php index 0d744444af..18308a010e 100644 --- a/phpgwapi/phpgw_common.inc.php +++ b/phpgwapi/inc/phpgw_common.inc.php @@ -11,7 +11,7 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3)); $d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3)); if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") { echo "Failed attempt to break in via an old Security Hole!
\n"; @@ -224,6 +224,40 @@ return $output_text; } + function get_app_dir($appname = ""){ + global $phpgw_info; + if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];} + if ($appname == "home" || $appname == "logout" || $appname == "login"){$appname = "phpgwapi";} + + $appdir = $phpgw_info["server"]["include_root"]."/".$appname; + $appdir_default = $phpgw_info["server"]["server_root"]."/".$appname; + + if (is_dir ($appdir)){ + return $appdir; + }elseif (is_dir ($appdir_default)){ + return $appdir_default; + }else{ + return False; + } + } + + function get_inc_dir($appname = ""){ + global $phpgw_info; + if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];} + if ($appname == "home" || $appname == "logout" || $appname == "login"){$appname = "phpgwapi";} + + $incdir = $phpgw_info["server"]["include_root"]."/".$appname."/inc"; + $incdir_default = $phpgw_info["server"]["server_root"]."/".$appname."/inc"; + + if (is_dir ($incdir)){ + return $incdir; + }elseif (is_dir ($incdir_default)){ + return $incdir_default; + }else{ + return False; + } + } + function get_tpl_dir($appname = ""){ global $phpgw_info; if ($appname == ""){$appname = $phpgw_info["flags"]["currentapp"];} @@ -554,7 +588,7 @@ function phpgw_footer() { global $phpgw, $phpgw_info, $HTMLCOMPLAINT; - include($phpgw_info["server"]["api_dir"] . "/footer.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/footer.inc.php"); // Clean up mcrypt if (is_object($this->crypto)) { diff --git a/phpgwapi/phpgw_crypto.inc.php b/phpgwapi/inc/phpgw_crypto.inc.php similarity index 100% rename from phpgwapi/phpgw_crypto.inc.php rename to phpgwapi/inc/phpgw_crypto.inc.php diff --git a/phpgwapi/phpgw_db_msql.inc.php b/phpgwapi/inc/phpgw_db_msql.inc.php similarity index 100% rename from phpgwapi/phpgw_db_msql.inc.php rename to phpgwapi/inc/phpgw_db_msql.inc.php diff --git a/phpgwapi/phpgw_db_mssql.inc.php b/phpgwapi/inc/phpgw_db_mssql.inc.php similarity index 100% rename from phpgwapi/phpgw_db_mssql.inc.php rename to phpgwapi/inc/phpgw_db_mssql.inc.php diff --git a/phpgwapi/phpgw_db_mysql.inc.php b/phpgwapi/inc/phpgw_db_mysql.inc.php similarity index 100% rename from phpgwapi/phpgw_db_mysql.inc.php rename to phpgwapi/inc/phpgw_db_mysql.inc.php diff --git a/phpgwapi/phpgw_db_odbc.inc.php b/phpgwapi/inc/phpgw_db_odbc.inc.php similarity index 100% rename from phpgwapi/phpgw_db_odbc.inc.php rename to phpgwapi/inc/phpgw_db_odbc.inc.php diff --git a/phpgwapi/phpgw_db_oracle.inc.php b/phpgwapi/inc/phpgw_db_oracle.inc.php similarity index 100% rename from phpgwapi/phpgw_db_oracle.inc.php rename to phpgwapi/inc/phpgw_db_oracle.inc.php diff --git a/phpgwapi/phpgw_db_pgsql.inc.php b/phpgwapi/inc/phpgw_db_pgsql.inc.php similarity index 100% rename from phpgwapi/phpgw_db_pgsql.inc.php rename to phpgwapi/inc/phpgw_db_pgsql.inc.php diff --git a/phpgwapi/phpgw_db_sybase.inc.php b/phpgwapi/inc/phpgw_db_sybase.inc.php similarity index 100% rename from phpgwapi/phpgw_db_sybase.inc.php rename to phpgwapi/inc/phpgw_db_sybase.inc.php diff --git a/phpgwapi/phpgw_info.inc.php b/phpgwapi/inc/phpgw_info.inc.php similarity index 93% rename from phpgwapi/phpgw_info.inc.php rename to phpgwapi/inc/phpgw_info.inc.php index c68b924337..6437f1f037 100644 --- a/phpgwapi/phpgw_info.inc.php +++ b/phpgwapi/inc/phpgw_info.inc.php @@ -12,7 +12,7 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3)); $d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3)); if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") { echo "Failed attempt to break in via an old Security Hole!
\n"; @@ -98,8 +98,8 @@ $phpgw_info["server"]["images_dir"] = $phpgw->common->get_image_path("phpgwapi"); // } - $phpgw_info["server"]["app_root"] = $phpgw_info["server"]["server_root"]."/".$phpgw_info["flags"]["currentapp"]; - $phpgw_info["server"]["app_inc"] = $phpgw_info["server"]["app_root"]."/inc"; + $phpgw_info["server"]["app_root"] = $phpgw->common->get_app_dir(); + $phpgw_info["server"]["app_inc"] = $phpgw->common->get_inc_dir(); $phpgw_info["server"]["app_images"] = $phpgw->common->get_image_path(); $phpgw_info["server"]["app_tpl"] = $phpgw->common->get_tpl_dir(); @@ -107,8 +107,6 @@ $phpgw_info["user"]["private_dir"] = $phpgw_info["server"]["files_dir"] . "/users/" . $phpgw_info["user"]["userid"]; - $phpgw_info["server"]["my_include_dir"] = $phpgw_info["server"]["app_inc"]; - // This shouldn't happen, but if it does get ride of the warnings it will spit out if (gettype($phpgw_info["user"]["preferences"]) != "array") { $phpgw_info["user"]["preferences"] = array(); diff --git a/phpgwapi/phpgw_lang_sql.inc.php b/phpgwapi/inc/phpgw_lang_sql.inc.php similarity index 100% rename from phpgwapi/phpgw_lang_sql.inc.php rename to phpgwapi/inc/phpgw_lang_sql.inc.php diff --git a/phpgwapi/phpgw_mime.types b/phpgwapi/inc/phpgw_mime.types similarity index 100% rename from phpgwapi/phpgw_mime.types rename to phpgwapi/inc/phpgw_mime.types diff --git a/phpgwapi/phpgw_network.inc.php b/phpgwapi/inc/phpgw_network.inc.php similarity index 100% rename from phpgwapi/phpgw_network.inc.php rename to phpgwapi/inc/phpgw_network.inc.php diff --git a/phpgwapi/phpgw_nextmatchs.inc.php b/phpgwapi/inc/phpgw_nextmatchs.inc.php similarity index 100% rename from phpgwapi/phpgw_nextmatchs.inc.php rename to phpgwapi/inc/phpgw_nextmatchs.inc.php diff --git a/phpgwapi/phpgw_send.inc.php b/phpgwapi/inc/phpgw_send.inc.php similarity index 100% rename from phpgwapi/phpgw_send.inc.php rename to phpgwapi/inc/phpgw_send.inc.php diff --git a/phpgwapi/phpgw_session.inc.php b/phpgwapi/inc/phpgw_session.inc.php similarity index 100% rename from phpgwapi/phpgw_session.inc.php rename to phpgwapi/inc/phpgw_session.inc.php diff --git a/phpgwapi/phpgw_template.inc.php b/phpgwapi/inc/phpgw_template.inc.php similarity index 100% rename from phpgwapi/phpgw_template.inc.php rename to phpgwapi/inc/phpgw_template.inc.php diff --git a/phpgwapi/phpgw_todo.inc.php b/phpgwapi/inc/phpgw_todo.inc.php similarity index 100% rename from phpgwapi/phpgw_todo.inc.php rename to phpgwapi/inc/phpgw_todo.inc.php diff --git a/phpgwapi/phpgw_utilities.inc.php b/phpgwapi/inc/phpgw_utilities.inc.php similarity index 79% rename from phpgwapi/phpgw_utilities.inc.php rename to phpgwapi/inc/phpgw_utilities.inc.php index 8b392acbca..936537aa32 100644 --- a/phpgwapi/phpgw_utilities.inc.php +++ b/phpgwapi/inc/phpgw_utilities.inc.php @@ -12,17 +12,17 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_inc"],0,3)); if($d1 == "htt" || $d1 == "ftp") { echo "Failed attempt to break in via an old Security Hole!
\n"; exit; } unset($d1); - include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_rssparse.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_clientsniffer.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_http.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_matrixview.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_utilities_menutree.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_rssparse.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_clientsniffer.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_http.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_matrixview.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_utilities_menutree.inc.php"); class utilities { diff --git a/phpgwapi/phpgw_utilities_clientsniffer.inc.php b/phpgwapi/inc/phpgw_utilities_clientsniffer.inc.php similarity index 100% rename from phpgwapi/phpgw_utilities_clientsniffer.inc.php rename to phpgwapi/inc/phpgw_utilities_clientsniffer.inc.php diff --git a/phpgwapi/phpgw_utilities_http.inc.php b/phpgwapi/inc/phpgw_utilities_http.inc.php similarity index 100% rename from phpgwapi/phpgw_utilities_http.inc.php rename to phpgwapi/inc/phpgw_utilities_http.inc.php diff --git a/phpgwapi/phpgw_utilities_matrixview.inc.php b/phpgwapi/inc/phpgw_utilities_matrixview.inc.php similarity index 100% rename from phpgwapi/phpgw_utilities_matrixview.inc.php rename to phpgwapi/inc/phpgw_utilities_matrixview.inc.php diff --git a/phpgwapi/phpgw_utilities_menutree.inc.php b/phpgwapi/inc/phpgw_utilities_menutree.inc.php similarity index 100% rename from phpgwapi/phpgw_utilities_menutree.inc.php rename to phpgwapi/inc/phpgw_utilities_menutree.inc.php diff --git a/phpgwapi/phpgw_utilities_rssparse.inc.php b/phpgwapi/inc/phpgw_utilities_rssparse.inc.php similarity index 100% rename from phpgwapi/phpgw_utilities_rssparse.inc.php rename to phpgwapi/inc/phpgw_utilities_rssparse.inc.php diff --git a/phpgwapi/phpgw_utilities_sbox.inc.php b/phpgwapi/inc/phpgw_utilities_sbox.inc.php similarity index 100% rename from phpgwapi/phpgw_utilities_sbox.inc.php rename to phpgwapi/inc/phpgw_utilities_sbox.inc.php diff --git a/phpgwapi/phpgw_vfs.inc.php b/phpgwapi/inc/phpgw_vfs.inc.php similarity index 100% rename from phpgwapi/phpgw_vfs.inc.php rename to phpgwapi/inc/phpgw_vfs.inc.php diff --git a/preferences/changetheme.php b/preferences/changetheme.php index 4146ef1279..8166eebe52 100755 --- a/preferences/changetheme.php +++ b/preferences/changetheme.php @@ -28,7 +28,7 @@ exit; } - $dh = opendir($phpgw_info["server"]["api_dir"] . "/themes"); + $dh = opendir($phpgw_info["server"]["api_inc"] . "/themes"); while ($file = readdir($dh)) { if (eregi("\.theme$", $file)) { $installed_themes[] = substr($file,0,strpos($file,".")); diff --git a/setup/createheader.php b/setup/createheader.php index 94cebc8757..376d3a83e1 100644 --- a/setup/createheader.php +++ b/setup/createheader.php @@ -96,13 +96,15 @@ $phpgw_info["server"]["db_type"] = $phpgw_domain[$phpgw_info["server"]["default_domain"]]["db_type"]; $phpgw_info["server"]["config_passwd"] = $phpgw_domain[$phpgw_info["server"]["default_domain"]]["config_passwd"]; } - if (!isset($phpgw_info["server"]["api_dir"])) { - $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi"; + if (!isset($phpgw_info["server"]["include_root"]) && $phpgw_info["server"]["header_version"] <= 1.6) { + $phpgw_info["server"]["include_root"] = $phpgw_info["server"]["server_root"]; + }elseif (!isset($phpgw_info["server"]["header_version"]) && $phpgw_info["server"]["header_version"] <= 1.6) { + $phpgw_info["server"]["include_root"] = $phpgw_info["server"]["server_root"]; } } else { echo "sample configuration not found. using built in defaults
\n"; $phpgw_info["server"]["server_root"] = "/path/to/phpgroupware"; - $phpgw_info["server"]["api_dir"] = "/path/to/phpgroupware/phpgwapi"; + $phpgw_info["server"]["include_root"] = "/path/to/phpgroupware"; /* This is the basic include needed on each page for phpGroupWare application compliance */ $phpgw_info["flags"]["htmlcompliant"] = True; @@ -137,7 +139,7 @@ $this_dir = dirname($SCRIPT_FILENAME); $updir = ereg_replace("/setup","",$this_dir); $phpgw_info["server"]["server_root"] = $updir; - $phpgw_info["server"]["api_dir"] = $updir."/phpgwapi"; + $phpgw_info["server"]["include_root"] = $updir; } ?> @@ -145,7 +147,7 @@
Server Root
"> - phpGW API Dir
"> + Include Root (this should be the same as Server Root unless you know what you are doing)
"> DB Host
">Hostname/IP of Databaseserver DB Name
">Name of Database DB User
">Name of DB User as phpgroupware has to connect as diff --git a/setup/inc/functions.inc.php b/setup/inc/functions.inc.php index 6f9792a0fb..a2d36180b5 100644 --- a/setup/inc/functions.inc.php +++ b/setup/inc/functions.inc.php @@ -147,10 +147,10 @@ { global $phpgw_info, $phpgw_domain, $SetupDomain, $db; /* Database setup */ - if (!isset($phpgw_info["server"]["api_dir"])) { - $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["server_root"]."/phpgwapi"; + if (!isset($phpgw_info["server"]["api_inc"])) { + $phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["server_root"]."/phpgwapi/inc"; } - include($phpgw_info["server"]["api_dir"] . "/phpgw_db_".$phpgw_domain[$SetupDomain]["db_type"].".inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_db_".$phpgw_domain[$SetupDomain]["db_type"].".inc.php"); $db = new db; $db->Host = $phpgw_domain[$SetupDomain]["db_host"]; $db->Type = $phpgw_domain[$SetupDomain]["db_type"]; diff --git a/setup/ldap.php b/setup/ldap.php index e2b8f140e2..27391ac03e 100644 --- a/setup/ldap.php +++ b/setup/ldap.php @@ -19,9 +19,9 @@ // Authorize the user to use setup app and load the database // include("./inc/setup_auth.inc.php"); // Does not return unless user is authorized - $phpgw_info["server"]["api_dir"] = + $phpgw_info["server"]["api_inc"] = $phpgw_info["server"]["include_root"]."/phpgwapi"; - include($phpgw_info["server"]["api_dir"] . "/phpgw_common.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_common.inc.php"); $common = new common; loaddb(); @@ -77,8 +77,8 @@ } if (! $error) { - include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_ldap.inc.php"); - include($phpgw_info["server"]["api_dir"] . "/phpgw_accounts_shared.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_ldap.inc.php"); + include($phpgw_info["server"]["api_inc"] . "/phpgw_accounts_shared.inc.php"); $accounts = new accounts; while ($app = each($s_apps)) { diff --git a/version.inc.php b/version.inc.php index f76446a6fd..441c40e146 100644 --- a/version.inc.php +++ b/version.inc.php @@ -12,4 +12,4 @@ /* $Id$ */ $phpgw_info["server"]["version"] = "0.9.8pre5"; - $phpgw_info["server"]["current_header_version"] = "1.6"; + $phpgw_info["server"]["current_header_version"] = "1.7";