diff --git a/lib/multiple-results.php b/lib/multiple-results.php index 1469a4b..5697eb0 100644 --- a/lib/multiple-results.php +++ b/lib/multiple-results.php @@ -77,7 +77,7 @@ if (startTab!=top.ICEcoder.selectedTab) { } } if (userTarget.indexOf("all")>-1 || (userTarget.indexOf("selected")>-1 && foundInSelected)) { - resultsDisplay += ''+ targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(//g,""+findText+"")+ '
'+spansArray[i].innerHTML+', rename to '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(//g,"")+'
'; + resultsDisplay += ''+ targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(//g,""+findText+"")+ '
'+spansArray[i].innerHTML+', rename to '+targetURL.replace(/\|/g,"/").replace(/_perms/g,"").replace(//g,"")+'
'; resultsDisplay += '
rename
'; @@ -92,9 +92,11 @@ if (startTab!=top.ICEcoder.selectedTab) { $r = 0; function phpGrep($q, $path, $base) { $fp = opendir($path); - $slash = $serverType == "Windows" ? "\\" : "/"; global $r; global $ICEcoder; + global $serverType; + if (!isset($ret)) {$ret="";}; + $slash = $serverType == "Windows" ? "\\" : "/"; while($f = readdir($fp)) { if(preg_match("#^\.+$#", $f)) continue; $fullPath = $path.$slash.$f; @@ -120,7 +122,7 @@ if (startTab!=top.ICEcoder.selectedTab) { return $ret; } - $results = phpGrep($findText, $docRoot.$ICEroot, $docRoot.$ICEroot); + $results = phpGrep($findText, $docRoot.$iceRoot, $docRoot.$iceRoot); echo 'resultsDisplay += "'.$results.'";'; ?> '); + top.ICEcoder.replaceInFile(fileRef,findText,''); } var replaceInFilesAll = function() { @@ -172,7 +174,7 @@ var replaceInFilesAll = function() { var renameSingle = function(arrayRef) { fileRef = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,""); - newName = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,"").replace(find,""); + newName = spansArray[arrayRef].id.replace(/\|/g,"/").replace(/_perms/g,"").replace(find,""); top.ICEcoder.renameFile(fileRef,newName); }