mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 16:44:20 +01:00
changed the link() and webserver_url to return the entire path
This commit is contained in:
parent
70647e98fb
commit
1db613d9ed
@ -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;
|
||||
}
|
||||
|
||||
|
52
phpgwapi/setup/config.inc.php
Normal file
52
phpgwapi/setup/config.inc.php
Normal file
@ -0,0 +1,52 @@
|
||||
<tr bgcolor="486591">
|
||||
<td colspan="2"><font color="fefefe"> <b>Directory information</b></font></td>
|
||||
</tr>
|
||||
|
||||
</tr>
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter file path for temporary files.</td>
|
||||
<td><input name="newsettings[temp_dir]" value="<?php echo $current_config["temp_dir"]; ?>" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter file path for users and group files.</td>
|
||||
<td><input name="newsettings[files_dir]" value="<?php echo $current_config["files_dir"]; ?>" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the location of phpGroupWare's URL.<br>Example: http://www.domain.com/phpgroupware<br></td>
|
||||
<td><input name="newsettings[webserver_url]" value="<?php echo $current_config["webserver_url"]; ?>" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="FFFFFF">
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="486591">
|
||||
<td colspan="2"><font color="fefefe"> <b>Server information</b></font></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter your default FTP server.</td>
|
||||
<td><input name="newsettings[default_ftp_server]" value="<?php echo $current_config["default_ftp_server"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter your HTTP proxy server.</td>
|
||||
<td><input name="newsettings[httpproxy_server]" value="<?php echo $current_config["httpproxy_server"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter your HTTP proxy server port.</td>
|
||||
<td><input name="newsettings[httpproxy_port]" value="<?php echo $current_config["httpproxy_port"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the title for your site.</td>
|
||||
<td><input name="newsettings[site_title]" value="<?php echo $current_config["site_title"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the hostname of the machine this server is running on.</td>
|
||||
<td><input name="newsettings[hostname]" value="<?php echo $SERVER_NAME; ?>"></td>
|
||||
</tr>
|
@ -6,6 +6,11 @@
|
||||
<td colspan="2"><font color="fefefe"> <b>Preferences</b></font></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the title for your site.</td>
|
||||
<td><input name="newsettings[site_title]" value="<?php echo $current_config["site_title"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<?php $selected[$current_config["showpoweredbyon"]] = " selected"; ?>
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Showed powered by logo on:</td>
|
||||
|
@ -80,62 +80,9 @@
|
||||
?>
|
||||
<form method="POST" action="config.php">
|
||||
<table border="0" align="center">
|
||||
<tr bgcolor="486591">
|
||||
<td colspan="2"><font color="fefefe"> <b>Directory information</b></font></td>
|
||||
</tr>
|
||||
|
||||
</tr>
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter path for temporary files.</td>
|
||||
<td><input name="newsettings[temp_dir]" value="<?php echo $current_config["temp_dir"]; ?>" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter path for users and group files.</td>
|
||||
<td><input name="newsettings[files_dir]" value="<?php echo $current_config["files_dir"]; ?>" size="40"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the location of phpGroupWare's URL.<br>Example: /phpGroupWare<br>(leave blank if at http://yourserver/)</td>
|
||||
<td><input name="newsettings[webserver_url]" value="<?php echo $current_config["webserver_url"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="FFFFFF">
|
||||
<td colspan="2"> </td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="486591">
|
||||
<td colspan="2"><font color="fefefe"> <b>Server information</b></font></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter your default FTP server.</td>
|
||||
<td><input name="newsettings[default_ftp_server]" value="<?php echo $current_config["default_ftp_server"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter your HTTP proxy server.</td>
|
||||
<td><input name="newsettings[httpproxy_server]" value="<?php echo $current_config["httpproxy_server"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter your HTTP proxy server port.</td>
|
||||
<td><input name="newsettings[httpproxy_port]" value="<?php echo $current_config["httpproxy_port"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the title for your site.</td>
|
||||
<td><input name="newsettings[site_title]" value="<?php echo $current_config["site_title"]; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<tr bgcolor="e6e6e6">
|
||||
<td>Enter the hostname of the machine this server is running on.</td>
|
||||
<td><input name="newsettings[hostname]" value="<?php echo $SERVER_NAME; ?>"></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
$phpgw_setup->execute_script("config");
|
||||
//$phpgw_setup->execute_script("config",array("accounts", "preferences","email"));
|
||||
$phpgw_setup->execute_script("config",array("phpgwapi","admin", "preferences","email"));
|
||||
?>
|
||||
|
||||
<tr bgcolor="FFFFFF">
|
||||
|
@ -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"]."<br>";
|
||||
echo "phpgw_info[setup][$key][status]: ".$phpgw_info["setup"][$key]["status"]."<br>";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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;}
|
||||
|
@ -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')");
|
||||
|
@ -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')");
|
||||
|
Loading…
Reference in New Issue
Block a user