After globalling $docRoot and $ICEcodeDir, work out a $localPath for the
file we have a result for
If our results match, we are looking in the ICEcoder dir and should
exclude as a result
Add a context array to all instances of file_get_contents(). This is so
we don't end up with a timeout too early if the system is set to
something short (ie, 15 secs) and we try to open a large file that takes
longer than this short limit.
Windows may use backslahes as it's dir seperator, but under some PHP
installs it uses the Linux forward slash instead. We could use the
directory seperator PHP var, but I've heard mixed opinions on this and
would rather just detect by looking at what $path, which contains
$docRoot, which is from the $_SERVER variable as this would be more
reliable.
It also wasn't showing the replace button due to a PHP_EOL which ended
the JS string with quote termination.
Establish a stringExtra value of a slash or nothing depending on wether
we are considering the root level or not
When comparing the folder against the selectedFile array value, postfix
both with a slash (could be any char though). This is to eliminate path
mismatches.
Remove old echo test message
Added new $foundInSelFile var
Both this and bFile are false to begin with
Testing on not false of bannedFile in strpos
If we find our matching item is one of our selected files, set
$foundInSelFile to true
Only if we don't have a banned file and either we have no selected
files, or we do have some and have a match, push to array etc
PHP_EOL's to make source easier to read
strClean on GET var selectedFiles
Remove 2 x console.logs
Remove commented text
2 x areas need first slash removing and ending with a slash
Need to var thisWidth to avoid global
Get an array of selectedFiles if there is one
Fix by resetting foundInSelected on each loop
targetURL is now lowercase as standard
Only provide results if it's a file
Also only provide results if the beginning of the path matches and
either the targetURL is the same or if it forms the beginning
Set $bFile = true if the file which contains our match doesn't match the
selected file
Checking if we have a $_GET['target'] before use to avoid PHP notices
findText is converted to lowercase
Global case insensitive searching with regex in open documents
Find/replace in filenames now compares in a case insensitive way
Split the resultsDisplay generation onto 3 lines to make it easier to
read
Fixed issue with showing 'replace with xxx' when you're actually just
finding