diff --git a/phpgwapi/inc/phpgw.inc.php b/phpgwapi/inc/phpgw.inc.php index b1224803de..62d977579a 100644 --- a/phpgwapi/inc/phpgw.inc.php +++ b/phpgwapi/inc/phpgw.inc.php @@ -222,16 +222,16 @@ } if (isset($phpgw_info["server"]["usecookies"]) && - $phpgw_info["server"]["usecookies"]) { - if ($extravars) { - $url .= "?$extravars"; - } + $phpgw_info["server"]["usecookies"]) { + if ($extravars) { + $url .= "?$extravars"; + } } else { $url .= "?sessionid=" . $phpgw_info["user"]["sessionid"]; $url .= "&kp3=" . $kp3; $url .= "&domain=" . $phpgw_info["user"]["domain"]; // This doesn't belong in the API. - // Its up to the app to pass this value. (jengo) + // Its up to the app to pass this value. (jengo) if ($phpgw_info["flags"]["newsmode"]) { $url .= "&newsmode=on"; } @@ -241,22 +241,17 @@ } } - // Note: The following code is slighty redundant, - // you should ALWAYS pass the full path (jengo) - - // next line adds index.php when one is assumed since - // iis will not interpret urls like http://.../addressbook/?xyz=5 -/* $url = str_replace("/?", "/index.php?", $url); - $html_check = strtolower(substr($url ,0,4)); + $url = str_replace("/?", "/index.php?", $url); + $webserver_url_count = strlen($phpgw_info["server"]["webserver_url"]); $slash_check = strtolower(substr($url ,0,1)); - if($url_check != "http") { + + if(substr($url ,0,$webserver_url_count) != $phpgw_info["server"]["webserver_url"]) { if($slash_check != "/") { - $url = $phpgw_info["server"]["hostname"] - .$phpgw_info["server"]["webserver_url"]."/".$url; + $url = $phpgw_info["server"]["webserver_url"]."/".$url; } else{ - $url = $phpgw_info["server"]["hostname"].$url; + $url = $phpgw_info["server"]["webserver_url"].$url; } - } */ + } return $url; } diff --git a/phpgwapi/setup/config.inc.php b/phpgwapi/setup/config.inc.php new file mode 100644 index 0000000000..a9ef25689f --- /dev/null +++ b/phpgwapi/setup/config.inc.php @@ -0,0 +1,52 @@ + +  Directory information + + + + + Enter file path for temporary files. + " size="40"> + + + + Enter file path for users and group files. + " size="40"> + + + + Enter the location of phpGroupWare's URL.
Example: http://www.domain.com/phpgroupware
+ " size="40"> + + + +   + + + +  Server information + + + + Enter your default FTP server. + "> + + + + Enter your HTTP proxy server. + "> + + + + Enter your HTTP proxy server port. + "> + + + + Enter the title for your site. + "> + + + + Enter the hostname of the machine this server is running on. + + diff --git a/preferences/setup/config.inc.php b/preferences/setup/config.inc.php index 274acfc155..079171a94e 100644 --- a/preferences/setup/config.inc.php +++ b/preferences/setup/config.inc.php @@ -6,6 +6,11 @@  Preferences + + Enter the title for your site. + "> + + Showed powered by logo on: diff --git a/setup/config.php b/setup/config.php index d1db7317e4..9919118281 100644 --- a/setup/config.php +++ b/setup/config.php @@ -80,62 +80,9 @@ ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - execute_script("config"); - //$phpgw_setup->execute_script("config",array("accounts", "preferences","email")); + $phpgw_setup->execute_script("config",array("phpgwapi","admin", "preferences","email")); ?> diff --git a/setup/inc/phpgw_setup.inc.php b/setup/inc/phpgw_setup.inc.php index ce36b54265..74289fd60e 100644 --- a/setup/inc/phpgw_setup.inc.php +++ b/setup/inc/phpgw_setup.inc.php @@ -311,7 +311,7 @@ function app_status($appname = ""){ global $phpgw_info; - $this->execute_script("version"); + $this->get_versions(); reset ($phpgw_info["server"]["versions"]); $this->db->query("select * from applications"); @@ -328,32 +328,43 @@ }else{ $phpgw_info["setup"][$key]["status"] = "current"; } -echo "phpgw_info[setup][$key][status]: ".$phpgw_info["setup"][$key]["status"]."
"; + echo "phpgw_info[setup][$key][status]: ".$phpgw_info["setup"][$key]["status"]."
"; } } } - function execute_script($script, $appname = ""){ - global $phpgw_info, $phpgw_domain, $current_config, $newsetting, $phpgw_setup; - if ($appname == ""){ - $d = dir($phpgw_info["server"]["server_root"]); - while($entry=$d->read()) { - if ($script == "version"){ - $f = $phpgw_info["server"]["server_root"]."/".$entry."/version.inc.php"; - if (file_exists ($f)){include($f); } - }else{ - $f = $phpgw_info["server"]["server_root"]."/".$entry."/setup/".$script.".inc.php"; - if (file_exists ($f)){include($f);} - } - } - $d->close(); - }else{ + function execute_script($script, $order = ""){ + global $phpgw_info, $phpgw_domain, $current_config, $newsetting, $phpgw_setup, $SERVER_NAME; + if ($order != "" && gettype($order) != "array"){ $order = array($order); } + if ($order == ""){$order = array();} + /* First include the ordered setup script file */ + reset ($order); + while (list (, $appname) = each ($order)){ $f = $phpgw_info["server"]["server_root"]."/".$appname."/setup/".$script.".inc.php"; - if (file_exists ($f)){include($f);} + if (file_exists($f)) {include($f);} + $completed_scripts[$appname] = True; + } + /* Then add the rest */ + $d = dir($phpgw_info["server"]["server_root"]); + while ($entry=$d->read()){ + if ($entry != "" && $completed_scripts[$appname] != True){ + $f = $phpgw_info["server"]["server_root"]."/".$entry."/setup/".$script.".inc.php"; + if (file_exists($f)) {include($f);} + } } } + function get_versions(){ + global $phpgw_info, $phpgw_domain, $current_config, $newsetting, $phpgw_setup, $SERVER_NAME; + $d = dir($phpgw_info["server"]["server_root"]); + while($entry=$d->read()) { + $f = $phpgw_info["server"]["server_root"]."/".$entry."/version.inc.php"; + if (file_exists ($f)){include($f); } + } + $d->close(); + } + function update_app_version($appname, $tableschanged = True){ global $phpgw_info; if ($tableschanged == True){$phpgw_info["setup"]["tableschanged"] = True;} diff --git a/setup/sql/common_default_records.inc.php b/setup/sql/common_default_records.inc.php index 668d431fa5..df7594872c 100644 --- a/setup/sql/common_default_records.inc.php +++ b/setup/sql/common_default_records.inc.php @@ -26,7 +26,7 @@ $phpgw_setup->db->query("insert into config (config_name, config_value) values ('encryptkey', 'change this phrase 2 something else')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('site_title', 'phpGroupWare')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('hostname', 'local.machine.name')"); - $phpgw_setup->db->query("insert into config (config_name, config_value) values ('webserver_url', '/phpgroupware')"); + $phpgw_setup->db->query("insert into config (config_name, config_value) values ('webserver_url', 'http://www.domain.com/phpgroupware')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('auth_type', 'sql')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('ldap_host', 'localhost')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('ldap_context', 'ou=People,dc=my-domain,dc=com')"); diff --git a/setup/sql/mysql_upgrade_prebeta.inc.php b/setup/sql/mysql_upgrade_prebeta.inc.php index 0b1ce7cea9..079704522e 100644 --- a/setup/sql/mysql_upgrade_prebeta.inc.php +++ b/setup/sql/mysql_upgrade_prebeta.inc.php @@ -143,7 +143,7 @@ $phpgw_setup->db->query("insert into config (config_name, config_value) values ('encryptkey', 'change this phrase 2 something else'"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('site_title', 'phpGroupWare')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('hostname', 'local.machine.name')"); - $phpgw_setup->db->query("insert into config (config_name, config_value) values ('webserver_url', '/phpgroupware')"); + $phpgw_setup->db->query("insert into config (config_name, config_value) values ('webserver_url', 'http://www.domain.com/phpgroupware')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('auth_type', 'sql')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('ldap_host', 'localhost')"); $phpgw_setup->db->query("insert into config (config_name, config_value) values ('ldap_context', 'o=phpGroupWare')");
 Directory information
Enter path for temporary files." size="40">
Enter path for users and group files." size="40">
Enter the location of phpGroupWare's URL.
Example: /phpGroupWare
(leave blank if at http://yourserver/)
">
 
 Server information
Enter your default FTP server.">
Enter your HTTP proxy server.">
Enter your HTTP proxy server port.">
Enter the title for your site.">
Enter the hostname of the machine this server is running on.