Subversion Repositories oidplus

Compare Revisions

Regard whitespace Rev 1286 → Rev 1287

/trunk/includes/classes/OIDplus.class.php
2125,7 → 2125,7
$target = realpath($target);
if ($target === false) return false;
$tmp = substr($target, strlen($basedir)+1);
$res .= str_replace(DIRECTORY_SEPARATOR,'/',$tmp); // remove OS specific path delimiters introduced by realpath()
$res .= str_replace(DIRECTORY_SEPARATOR,'/',$tmp); // replace OS specific path delimiters introduced by realpath()
if (is_dir($target)) $res .= '/';
}
 
2133,6 → 2133,8
}
 
/**
* Note: canonicalURL() is different than webpath(),
* because it does additional things like re-ordering of arguments
* @param string|null $goto
* @return false|string
* @throws OIDplusException
2146,11 → 2148,13
$target = realpath('.');
if ($target === false) return false;
$tmp = substr($target, strlen($basedir)+1);
$res = str_replace(DIRECTORY_SEPARATOR,'/',$tmp); // remove OS specific path delimiters introduced by realpath()
$res = str_replace(DIRECTORY_SEPARATOR,'/',$tmp); // replace OS specific path delimiters introduced by realpath()
if (is_dir($target) && ($res != '')) $res .= '/';
 
// Third part: File name
$tmp = explode('/',$_SERVER['SCRIPT_NAME']);
$tmp = $_SERVER['SCRIPT_NAME'];
$tmp = rtrim($tmp, 'index.php');
$tmp = explode('/',$tmp);
$tmp = end($tmp);
 
// Fourth part: Query string (ordered)
/trunk/includes/oidplus_base.js
63,13 → 63,12
}
 
function getSystemUrl(relative) {
relative = (typeof relative === 'undefined') ? false : relative; // do not translate
var url = new URL(window.location.href);
if (relative) {
return url.pathname;
} else {
return url.href.substr(0, url.href.length-url.search.length);
var res = relative ? url.pathname : url.href.substr(0, url.href.length-url.search.length);
if (res.endsWith("index.php")) res = res.substring(0, res.lastIndexOf('/')) + "/";
return res;
}
}
 
function getTreeLoadURL() {
var url = new URL(window.location.href);