Skip to content

Commit f15a1b1

Browse files
committed
Replacing alerts with ICEcoder.message
1 parent 41f52cc commit f15a1b1

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

lib/download.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
$file = realpath($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['file'])));
77
// If it doesn't exist, or doesn't start with the $docRoot, stop here
88
if (!file_exists($file) || strpos(str_replace("\\","/",$file),$docRoot) !== 0) {
9-
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
9+
die("<script>top.ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
1010
}
1111

1212
if (file_exists($file)) {

lib/file-control.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
// Or a remote URL that doesn't start http
6060
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
6161
) {
62-
die("alert('Sorry! - problem with file requested');</script>");
62+
die("top.ICEcoder.message('Sorry! - problem with file requested');</script>");
6363
};
6464
}
6565

@@ -97,7 +97,7 @@
9797
ftpStart();
9898
// Show user warning if no good connection
9999
if (!$ftpConn || !$ftpLogin) {
100-
die('alert("Sorry, no FTP connection to '.$ftpHost.' for user '.$ftpUser.'");top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>');
100+
die('top.ICEcoder.message("Sorry, no FTP connection to '.$ftpHost.' for user '.$ftpUser.'");top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>');
101101
exit;
102102
}
103103
// Get our file contents and close the FTP connection

lib/github.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
193193
echo '<textarea name="loadedFile'.$i.'" id="loadedFile'.$i.'" style="display: none">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&amp;",$loadedFile)).'</textarea><br><br>'.PHP_EOL.PHP_EOL;
194194
} else {
195-
die("<script>alert('Sorry, that file doesn\'t appear to exist');</script>");
195+
die("<script>top.ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
196196
}
197197
}
198198
?>

test/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function runTests() {
243243
setTimeout(function() {
244244
ICEcoder.closeTab(1,false,true);
245245
console.log('TEST COMPLETE!');
246-
alert('Test Complete!\n\nRan '+s+' of '+total+' tests OK.\nSee console for more details.');
246+
top.ICEcoder.message('Test Complete!\n\nRan '+s+' of '+total+' tests OK.\nSee console for more details.');
247247
},200);
248248
} else {
249249
testResult("- FAIL",title);
@@ -276,7 +276,7 @@ function displayResults(successful) {
276276

277277
function testStopped() {
278278
unitTestResults.innerHTML += " - Test stopped";
279-
alert("Test stopped, see console for details.");
279+
top.ICEcoder.message("Test stopped, see console for details.");
280280
}
281281
</script>
282282

0 commit comments

Comments
 (0)