From 9b591173d40cadcc86edccf27247b40fee89b901 Mon Sep 17 00:00:00 2001 From: seek3r Date: Mon, 18 Dec 2000 20:22:02 +0000 Subject: [PATCH] the api code is almost in working condition, I am commiting so that others can statr helping me --- header.inc.php.template | 6 +++--- phpgwapi/phpgw.inc.php | 13 ++++++------- phpgwapi/phpgw_common.inc.php | 2 +- phpgwapi/phpgw_info.inc.php | 14 +++++--------- version.inc.php | 2 +- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/header.inc.php.template b/header.inc.php.template index 2be37fa28a..6113fca7a1 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"]["include_root"] = "__INCLUDE_ROOT__"; + $phpgw_info["server"]["api_dir"] = "__API_DIR__"; $phpgw_domain["default"] = array ( "db_host" => "__DB_HOST__", @@ -79,11 +79,11 @@ * Do not edit these lines * \**************************************************************************/ include($phpgw_info["server"]["server_root"]."/version.inc.php"); - $phpgw_info["server"]["header_version"] = "1.5"; + $phpgw_info["server"]["header_version"] = "1.6"; // This is a fix for NT if (!isset($phpgw_info["flags"]["noapi"]) || !$phpgw_info["flags"]["noapi"] == True){ - include($phpgw_info["server"]["include_root"] . "/phpgwapi/phpgw.inc.php"); + include($phpgw_info["server"]["api_dir"] . "/phpgw.inc.php"); } // Leave off the final php closing tag, some editors will add diff --git a/phpgwapi/phpgw.inc.php b/phpgwapi/phpgw.inc.php index c37f7ff5fc..8e1b728a6d 100644 --- a/phpgwapi/phpgw.inc.php +++ b/phpgwapi/phpgw.inc.php @@ -12,13 +12,12 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["include_root"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); $d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3)); - $d3 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); - if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp" || $d3 == "htt" || $d3 == "ftp") { + if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") { echo "Failed attempt to break in via an old Security Hole!
\n"; exit; - } unset($d1);unset($d2);unset($d3); + } unset($d1);unset($d2); error_reporting(7); @@ -32,7 +31,7 @@ /**************************************************************************\ * Load up all the base files * \**************************************************************************/ - include($phpgw_info["server"]["include_root"] . "/phpgwapi/phpgw_info.inc.php"); + include($phpgw_info["server"]["api_dir"] . "/phpgw_info.inc.php"); /**************************************************************************\ * Required classes * @@ -364,13 +363,13 @@ /**************************************************************************\ * These lines load up the themes * \**************************************************************************/ - include($phpgw_info["server"]["server_root"] . "/themes/" . + include($phpgw_info["server"]["api_dir"] . "/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"]["server_root"] . "/themes/default.theme"); + include ($phpgw_info["server"]["api_dir"] . "/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_common.inc.php b/phpgwapi/phpgw_common.inc.php index c5b13607db..5007bd99c7 100644 --- a/phpgwapi/phpgw_common.inc.php +++ b/phpgwapi/phpgw_common.inc.php @@ -11,7 +11,7 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["include_root"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],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"; diff --git a/phpgwapi/phpgw_info.inc.php b/phpgwapi/phpgw_info.inc.php index 22b2d8f8a9..503f2d4532 100644 --- a/phpgwapi/phpgw_info.inc.php +++ b/phpgwapi/phpgw_info.inc.php @@ -12,13 +12,12 @@ /* $Id$ */ - $d1 = strtolower(substr($phpgw_info["server"]["include_root"],0,3)); + $d1 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); $d2 = strtolower(substr($phpgw_info["server"]["server_root"],0,3)); - $d3 = strtolower(substr($phpgw_info["server"]["api_dir"],0,3)); - if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp" || $d3 == "htt" || $d3 == "ftp") { + if($d1 == "htt" || $d1 == "ftp" || $d2 == "htt" || $d2 == "ftp") { echo "Failed attempt to break in via an old Security Hole!
\n"; exit; - } unset($d1);unset($d2);unset($d3); + } unset($d1);unset($d2); magic_quotes_runtime(false); @@ -28,15 +27,12 @@ echo "!!! PLEASE CORRECT THIS SITUATION !!!"; } - /* Additional dirs that are set from exsisting information. */ - $phpgw_info["server"]["api_dir"] = $phpgw_info["server"]["include_root"] . "/phpgwapi"; - if (empty($phpgw_info["server"]["default_tplset"])){ $phpgw_info["server"]["default_tplset"] = "default"; } if (empty($phpgw_info["server"]["template_dir"])){ - $phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["include_root"]."/templates/".$phpgw_info["server"]["default_tplset"]; + $phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["api_dir"]."/templates/".$phpgw_info["server"]["default_tplset"]; } if (!isset($phpgw_domain)) { // make them fix their header @@ -98,7 +94,7 @@ { global $phpgw, $phpgw_info, $cd, $colspan; $phpgw_info["server"]["images_dir"] = $phpgw_info["server"]["webserver_url"] . "/images"; - $phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["include_root"] . "/templates/" + $phpgw_info["server"]["template_dir"] = $phpgw_info["server"]["api_dir"] . "/templates/" . $phpgw_info["server"]["default_tplset"]; $phpgw_info["server"]["app_root"] = $phpgw_info["server"]["server_root"]."/".$phpgw_info["flags"]["currentapp"]; diff --git a/version.inc.php b/version.inc.php index 17bb3b34a0..f76446a6fd 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.5"; + $phpgw_info["server"]["current_header_version"] = "1.6";