forked from extern/egroupware
Set correctly for full paths
This commit is contained in:
parent
f4688e2c20
commit
3e20192a97
@ -4,13 +4,21 @@
|
|||||||
### These are automatically set in phpGW - do not edit ###
|
### These are automatically set in phpGW - do not edit ###
|
||||||
|
|
||||||
$sep = $phpgw_info["server"]["dir_separator"];
|
$sep = $phpgw_info["server"]["dir_separator"];
|
||||||
$filesdir = $phpgw_info["server"]["files_dir"];
|
|
||||||
$rootdir = $phpgw->vfs->basedir;
|
$rootdir = $phpgw->vfs->basedir;
|
||||||
$fakebase = $phpgw->vfs->fakebase;
|
$fakebase = $phpgw->vfs->fakebase;
|
||||||
$hostname = $phpgw_info["server"]["webserver_url"] . $filesdir;
|
$hostname = $phpgw_info["server"]["webserver_url"] . $filesdir;
|
||||||
$appname = $phpgw_info["flags"]["currentapp"];
|
$appname = $phpgw_info["flags"]["currentapp"];
|
||||||
$settings = $phpgw_info["user"]["preferences"][$appname];
|
$settings = $phpgw_info["user"]["preferences"][$appname];
|
||||||
|
|
||||||
|
if (stristr ($rootdir, PHPGW_SERVER_ROOT))
|
||||||
|
{
|
||||||
|
$filesdir = substr ($rootdir, strlen (PHPGW_SERVER_ROOT));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unset ($filesdir);
|
||||||
|
}
|
||||||
|
|
||||||
### End Configuration Options ###
|
### End Configuration Options ###
|
||||||
|
|
||||||
define ("NULL", "");
|
define ("NULL", "");
|
||||||
@ -124,7 +132,9 @@ function string_encode ($string, $return)
|
|||||||
global $hostname;
|
global $hostname;
|
||||||
|
|
||||||
if (preg_match ("/=(.*)(&|$)/U", $string))
|
if (preg_match ("/=(.*)(&|$)/U", $string))
|
||||||
|
{
|
||||||
$rstring = preg_replace ("/=(.*)(&|$)/Ue", "'=' . rawurlencode ('\\1') . '\\2'", $string);
|
$rstring = preg_replace ("/=(.*)(&|$)/Ue", "'=' . rawurlencode ('\\1') . '\\2'", $string);
|
||||||
|
}
|
||||||
elseif (ereg ("^$hostname", $string))
|
elseif (ereg ("^$hostname", $string))
|
||||||
{
|
{
|
||||||
$rstring = ereg_replace ("^$hostname/", "", $string);
|
$rstring = ereg_replace ("^$hostname/", "", $string);
|
||||||
|
Loading…
Reference in New Issue
Block a user