shortURL changes

shortURL is now basePath with shortURLStarts conditionally removed from
start
This commit is contained in:
Matt Pass
2012-07-25 19:10:08 +01:00
parent 9c6be944fc
commit 97f430b2b7

View File

@@ -30,7 +30,8 @@ if ($_GET['action']=="load") {
if ($_SESSION['userLevel'] == 10 || ($_SESSION['userLevel'] < 10 && $bannedFile==false)) {
echo '<script>fileType="text";top.ICEcoder.rightClickedFile=top.ICEcoder.thisFileFolderLink=\''.$file.'\';';
echo 'shortURL = top.ICEcoder.thisFileFolderLink.replace(/\|/g,"/");';
echo 'top.ICEcoder.shortURL = shortURL.substr((shortURL.lastIndexOf(top.shortURLStarts)+top.shortURLStarts.length),shortURL.length);</script>';
echo 'top.ICEcoder.shortURL = shortURL.substr(top.basePath.length);';
echo 'if (shortURL.indexOf(top.shortURLStarts)==0) {shortURL.replace(top.shortURLStarts,"")}</script>';
$loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",$loadedFile).'</textarea>';
} else {