|
93 | 93 | for (let i = 0; i < spansArray.length; i++) {
|
94 | 94 | let foundInSelected = false;
|
95 | 95 | const targetURL = spansArray[i].id.replace(/\|/g, "/").toLowerCase();
|
| 96 | + const targetURLDisplay = spansArray[i].id.replace(/\|/g, "/"); // Original filename incl casing |
96 | 97 | const targetName = targetURL.substring(targetURL.lastIndexOf("/") + 1);
|
97 | 98 | let haveMatch = false;
|
98 | 99 | while ((match = rExp.exec(targetName)) !== null) {
|
99 |
| - console.log(match); |
100 | 100 | haveMatch = true;
|
101 | 101 | }
|
102 | 102 | if (
|
|
120 | 120 | if (-1 < userTarget.indexOf("all") || (-1 < userTarget.indexOf("selected") && foundInSelected)) {
|
121 | 121 | resultsDisplay +=
|
122 | 122 | '<a href="javascript:parent.ICEcoder.openFile(\'<?php echo $docRoot;?>' +
|
123 |
| - targetURL.replace(/\|/g, "/").replace(/_perms/g,"") + |
| 123 | + targetURLDisplay.replace(/\|/g, "/").replace(/_perms/g,"") + |
124 | 124 | '\');parent.ICEcoder.goFindAfterOpenInt = setInterval(function(){goFindAfterOpen(\'<?php echo $docRoot;?>' +
|
125 |
| - targetURL.replace(/\|/g, "/").replace(/_perms/g, "") + |
| 125 | + targetURLDisplay.replace(/\|/g, "/").replace(/_perms/g, "") + |
126 | 126 | '\')}, 20);parent.ICEcoder.showHide(\'hide\', parent.document.getElementById(\'blackMask\'))">';
|
127 | 127 | // TODO: get this line working
|
128 | 128 | resultsDisplay +=
|
129 |
| - targetURL.replace(/\|/g, "/").replace(/_perms/g, "").replace(/<?php |
| 129 | + targetURLDisplay.replace(/\|/g, "/").replace(/_perms/g, "").replace(/<?php |
130 | 130 | echo str_replace("/", "\/",strtolower(preg_quote($findText))); ?>/g, "<b>" +
|
131 | 131 | parent.ICEcoder.xssClean(findText).toLowerCase() + "</b>");
|
132 | 132 | resultsDisplay += '</a><br>';
|
133 |
| - <?php if (false === isset($_GET['replace'])) { ?> |
134 |
| - resultsDisplay += '<div id="foundCount' + i +'">' + spansArray[i].innerHTML + '</div>'; |
135 |
| - <?php ;} else { ?> |
136 |
| - // TODO: get this line working |
| 133 | + <?php if (true === isset($_GET['replace'])) { ?> |
137 | 134 | resultsDisplay +=
|
138 |
| - '<div id="foundCount' + i + '">' + spansArray[i].innerHTML + |
139 |
| - ', <?php echo $t['rename to'];?> ' + |
| 135 | + '<div id="foundCount' + i + '">' + |
| 136 | + '<?php echo $t['rename to'];?> ' + |
140 | 137 | targetURL.replace(/\|/g, "/").replace(/_perms/g, "").replace(/<?php echo str_replace("/", "\/",strtolower(preg_quote($findText))); ?>/g,"<b><?php
|
141 | 138 | if (isset($_GET['replace'])) {echo str_replace("&", "&", xssClean($_GET['replace'], 'script'));};
|
142 | 139 | ?></b>")+'</div>';
|
|
0 commit comments