Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit c19503b

Browse files
author
mattpass
committed
Minor tidy in index.php and updater.php
1 parent 9e68bb9 commit c19503b

File tree

2 files changed

+24
-24
lines changed

2 files changed

+24
-24
lines changed

index.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
$updateMsg = '';
99
// Check for updates
10-
if ($ICEcoder["checkUpdates"]) {
11-
$icv_url = "https://icecoder.net/latest-version?thisVersion=" . $ICEcoder["versionNo"];
12-
$icvData = getData($icv_url, 'curl', false, 5);
10+
if (true === $ICEcoder["checkUpdates"]) {
11+
$icvURL = "https://icecoder.net/latest-version?thisVersion=" . $ICEcoder["versionNo"];
12+
$icvData = getData($icvURL, 'curl', false, 5);
1313
if ("" == $icvData) {
1414
$icvData = "1.0\nICEcoder version placeholder";
1515
}
@@ -28,7 +28,7 @@
2828
if ($thisV < $icv) {
2929
$updateMsg =
3030
";ICEcoder.dataMessage('<b>" . $t['UPDATE INFO'] .
31-
":</b> ICEcoder v" . explode("\n", $icvData)[0] ." " . $t['now available'] . ". (" . $t['Your version is'] . " v " . $ICEcoder["versionNo"] .
31+
":</b> ICEcoder v" . explode("\n", $icvData)[0] ." " . $t['now available'] . ". (" . $t['Your version is'] . " v" . $ICEcoder["versionNo"] .
3232
").<br><br><a href=\\'https://icecoder.net\\' target=\\'_blank\\' style=\\'color:#fff; background: #b00; padding: 5px; text-decoration: none; cursor: pointer\\'>" .
3333
$t['Update now'] . "</a><br><br>" . $icvI ."');";
3434
}
@@ -37,7 +37,7 @@
3737
$isMac = false !== strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh") ? true : false;
3838
?>
3939
<!DOCTYPE html>
40-
<html onmousedown="ICEcoder.mouseDown=true; ICEcoder.resetAutoLogoutTimer();" onmouseup="ICEcoder.mouseDown=false; ICEcoder.resetAutoLogoutTimer(); ICEcoder.mouseDownInCM=false; if (!ICEcoder.overCloseLink) {ICEcoder.tabDragEnd()}" onmousemove="if('undefined' !== typeof ICEcoder) {ICEcoder.getMouseXY(event,'top'); ICEcoder.resetAutoLogoutTimer(); ICEcoder.canResizeFilesW()}" onmousewheel="ICEcoder.resetAutoLogoutTimer(); if (ICEcoder.getcMInstance() && !ICEcoder.getcMInstance().hasFocus() && !ICEcoder.getcMdiffInstance().hasFocus()) {event.wheelDelta > 0 ? ICEcoder.nextTab() : ICEcoder.previousTab();}">
40+
<html onmousedown="ICEcoder.mouseDown = true; ICEcoder.resetAutoLogoutTimer();" onmouseup="ICEcoder.mouseDown = false; ICEcoder.resetAutoLogoutTimer(); ICEcoder.mouseDownInCM = false; if (!ICEcoder.overCloseLink) {ICEcoder.tabDragEnd()}" onmousemove="if ('undefined' !== typeof ICEcoder) {ICEcoder.getMouseXY(event, 'top'); ICEcoder.resetAutoLogoutTimer(); ICEcoder.canResizeFilesW()}" onmousewheel="ICEcoder.resetAutoLogoutTimer(); if (ICEcoder.getcMInstance() && !ICEcoder.getcMInstance().hasFocus() && !ICEcoder.getcMdiffInstance().hasFocus()) {event.wheelDelta > 0 ? ICEcoder.nextTab() : ICEcoder.previousTab();}">
4141
<head>
4242
<title>ICEcoder v<?php echo $ICEcoder["versionNo"];?></title>
4343
<!--Updated via settings so must remain 1st stylesheet//-->
@@ -53,15 +53,15 @@
5353
<link rel="stylesheet" href="<?php
5454
echo $iceURLPath . "/assets/css/theme/";
5555
echo "default" === $ICEcoder["theme"] ? 'icecoder.css' : $ICEcoder["theme"] . '.css';
56-
echo "?microtime=".microtime(true);
56+
echo "?microtime=" . microtime(true);
5757
?>">
5858
<link rel="icon" type="image/png" href="<?php echo $iceURLPath;?>/assets/images/favicon.png">
5959
<script>
6060
iceRoot = "<?php echo $ICEcoder['root']; ?>";
6161

6262
window.onbeforeunload = function() {
63-
if(ICEcoder.autoLogoutTimer < ICEcoder.autoLogoutMins * 60) {
64-
for(var i = 1; i <= ICEcoder.savedPoints.length; i++) {
63+
if (ICEcoder.autoLogoutTimer < ICEcoder.autoLogoutMins * 60) {
64+
for (var i = 1; i <= ICEcoder.savedPoints.length; i++) {
6565
if (ICEcoder.savedPoints[i - 1] != ICEcoder.getcMInstance(i).changeGeneration()) {
6666
return "<?php echo $t['You have some...'];?>.";
6767
}
@@ -152,9 +152,9 @@
152152
}
153153
$extraProcessesClass = new ExtraProcesses();
154154
$onLoad = $extraProcessesClass->onLoad();
155-
?>ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;ICEcoder.content.style.visibility = 'visible';<?php echo $onLoad;?><?php if(true === isset($_GET["display"]) && "updated" === $_GET["display"]) {echo "ICEcoder.updated();";};?>" onresize="ICEcoder.setLayout()" onkeydown="return ICEcoder.interceptKeys('coder', event);" onkeyup="if('visible' === get('blackMask').style.visibility) {ICEcoder.handleModalKeyUp(event, 'modalGeneralCatch')}; ICEcoder.resetKeys(event);" onblur="ICEcoder.resetKeys(event);">
155+
?>ICEcoder.init()<?php echo $updateMsg . $onLoadExtras;?>;ICEcoder.content.style.visibility = 'visible';<?php echo $onLoad;?><?php if (true === isset($_GET["display"]) && "updated" === $_GET["display"]) {echo "ICEcoder.updated();";};?>" onresize="ICEcoder.setLayout()" onkeydown="return ICEcoder.interceptKeys('coder', event);" onkeyup="if ('visible' === get('blackMask').style.visibility) {ICEcoder.handleModalKeyUp(event, 'modalGeneralCatch')}; ICEcoder.resetKeys(event);" onblur="ICEcoder.resetKeys(event);">
156156

157-
<div id="blackMask" class="blackMask" onclick="if (!ICEcoder.overPopup) {ICEcoder.showHide('hide',this)}" oncontextmenu="return false">
157+
<div id="blackMask" class="blackMask" onclick="if (!ICEcoder.overPopup) {ICEcoder.showHide('hide', this)}" oncontextmenu="return false">
158158
<div class="popupVCenter">
159159
<div class="popup" id="mediaContainer"></div>
160160
</div>
@@ -184,7 +184,7 @@
184184
</div>
185185
</div>
186186

187-
<div id="fileMenu" class="fileMenu" onmouseover="ICEcoder.changeFilesW('expand')" onmouseout="ICEcoder.changeFilesW('contract');ICEcoder.hideFileMenu()" style="opacity: 0" oncontextmenu="return false">
187+
<div id="fileMenu" class="fileMenu" onmouseover="ICEcoder.changeFilesW('expand')" onmouseout="ICEcoder.changeFilesW('contract'); ICEcoder.hideFileMenu()" style="opacity: 0" oncontextmenu="return false">
188188
<span id="folderMenuItems">
189189
<a href="javascript:ICEcoder.newFile()" onmouseover="ICEcoder.showFileMenu()"><?php echo $t['New File'];?></a>
190190
<a href="javascript:ICEcoder.newFolder()" onmouseover="ICEcoder.showFileMenu()"><?php echo $t['New Folder'];?></a>
@@ -216,20 +216,20 @@
216216
echo '<a href="javascript:ICEcoder.zipIt(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])" onmouseover="ICEcoder.showFileMenu()">Zip It!</a>' . PHP_EOL;
217217
};
218218
?>
219-
<a href="/service/javascript:ICEcoder.downloadFile(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length-1])" onmouseover="ICEcoder.showFileMenu()"><?php echo $t['Download'];?></a>
219+
<a href="/service/javascript:ICEcoder.downloadFile(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])" onmouseover="ICEcoder.showFileMenu()"><?php echo $t['Download'];?></a>
220220
<div onmouseover="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
221-
<a href="/service/javascript:ICEcoder.propertiesScreen(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length-1])" onmouseover="ICEcoder.showFileMenu()"><?php echo $t['Properties'];?></a>
221+
<a href="/service/javascript:ICEcoder.propertiesScreen(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])" onmouseover="ICEcoder.showFileMenu()"><?php echo $t['Properties'];?></a>
222222
</div>
223223

224224
<div id="header" class="header" oncontextmenu="return false"></div>
225225

226226
<div id="files" class="files" onmouseover="ICEcoder.changeFilesW('expand')" onmouseout="ICEcoder.changeFilesW('contract'); ICEcoder.hideFileMenu();" oncontextmenu="return false">
227227
<div id="fileNav" class="fileNav">
228228
<ul>
229-
<li><a nohref onclick="ICEcoder.canShowFMNav=true; ICEcoder.showHideFileNav('show','optionsFile')" onmouseover="if(ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsFile')}" id="optionsFileNav"><?php echo $t['File'];?></a></li>
230-
<li><a nohref onclick="ICEcoder.canShowFMNav=true; ICEcoder.showHideFileNav('show','optionsEdit')" onmouseover="if(ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsEdit')}" id="optionsEditNav"><?php echo $t['Edit'];?></a></li>
231-
<li><a nohref onclick="ICEcoder.canShowFMNav=true; ICEcoder.showHideFileNav('show','optionsSettings')" onmouseover="if(ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsSettings')}" id="optionsSettingsNav"><?php echo $t['Settings'];?></a></li>
232-
<li><a nohref onclick="ICEcoder.canShowFMNav=true; ICEcoder.showHideFileNav('show','optionsHelp')" onmouseover="if(ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsHelp')}" id="optionsHelpNav"><?php echo $t['Help'];?></a></li>
229+
<li><a nohref onclick="ICEcoder.canShowFMNav = true; ICEcoder.showHideFileNav('show', 'optionsFile')" onmouseover="if (ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsFile')}" id="optionsFileNav"><?php echo $t['File'];?></a></li>
230+
<li><a nohref onclick="ICEcoder.canShowFMNav = true; ICEcoder.showHideFileNav('show', 'optionsEdit')" onmouseover="if (ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsEdit')}" id="optionsEditNav"><?php echo $t['Edit'];?></a></li>
231+
<li><a nohref onclick="ICEcoder.canShowFMNav = true; ICEcoder.showHideFileNav('show', 'optionsSettings')" onmouseover="if (ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsSettings')}" id="optionsSettingsNav"><?php echo $t['Settings'];?></a></li>
232+
<li><a nohref onclick="ICEcoder.canShowFMNav = true; ICEcoder.showHideFileNav('show', 'optionsHelp')" onmouseover="if (ICEcoder.canShowFMNav) {ICEcoder.showHideFileNav('show', 'optionsHelp')}" id="optionsHelpNav"><?php echo $t['Help'];?></a></li>
233233
</ul>
234234
</div>
235235
<div class="options" id="fileOptions">
@@ -247,9 +247,9 @@
247247
<li><a nohref onclick="ICEcoder.deleteFiles(ICEcoder.selectedFiles)"><?php echo $t['Delete'];?></a></li>
248248
<li><a nohref onclick="ICEcoder.duplicateFiles(ICEcoder.selectedFiles)"><?php echo $t['Duplicate'];?></a></li>
249249
<li><a nohref onclick="ICEcoder.renameFile(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])"><?php echo $t['Rename'];?></a></li>
250-
<li><a nohref onclick="ICEcoder.uploadFilesSelect(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length-1])"><?php echo $t['Upload'];?>...</a></li>
250+
<li><a nohref onclick="ICEcoder.uploadFilesSelect(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])"><?php echo $t['Upload'];?>...</a></li>
251251
<li><a nohref onclick="ICEcoder.zipIt(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])"><?php echo $t['Zip'];?></a></li>
252-
<li><a nohref onclick="ICEcoder.propertiesScreen(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length-1])"><?php echo $t['Properties'];?>...</a></li>
252+
<li><a nohref onclick="ICEcoder.propertiesScreen(ICEcoder.selectedFiles[ICEcoder.selectedFiles.length - 1])"><?php echo $t['Properties'];?>...</a></li>
253253
<li><a nohref onClick="ICEcoder.printCode()"><?php echo $t['Print'];?>...</a></li>
254254
<li><a nohref onClick="ICEcoder.fullScreenSwitcher()"><?php echo $t['Fullscreen toggle'];?></a></li>
255255
<li><a nohref onClick="ICEcoder.logout()"><?php echo $t['Logout'];?></a></li>
@@ -266,7 +266,7 @@
266266
<li><a nohref onclick="ICEcoder.jumpToDefinition()"><?php echo $t['Jump to Definition'];?></a></li>
267267
</ul>
268268
</div>
269-
<div id="optionsSettings" class="optionsList" onmouseover="ICEcoder.showHideFileNav('show',this.id)" onmouseout="ICEcoder.showHideFileNav('hide', this.id);ICEcoder.canShowFMNav = false">
269+
<div id="optionsSettings" class="optionsList" onmouseover="ICEcoder.showHideFileNav('show', this.id)" onmouseout="ICEcoder.showHideFileNav('hide', this.id);ICEcoder.canShowFMNav = false">
270270
<ul>
271271
<li><a nohref onclick="ICEcoder.settingsScreen(false, 'general')">General</a></li>
272272
<li><a nohref onclick="ICEcoder.settingsScreen(false, 'style')">Style</a></li>
@@ -279,14 +279,14 @@
279279
FTP is a far less used method of data transfer and so this menu hidden for now
280280
Uncomment if you really want to use it but please note, in future versions of ICEcoder
281281
that FTP is likely to be removed altogether
282-
<div id="optionsSource" class="optionsList" onmouseover="ICEcoder.showHideFileNav('show',this.id)" onmouseout="ICEcoder.showHideFileNav('hide', this.id);ICEcoder.canShowFMNav = false">
282+
<div id="optionsSource" class="optionsList" onmouseover="ICEcoder.showHideFileNav('show', this.id)" onmouseout="ICEcoder.showHideFileNav('hide', this.id);ICEcoder.canShowFMNav = false">
283283
<ul>
284284
<li><a nohref onclick="ICEcoder.goLocalhostRoot()">Localhost</a></li>
285285
<li><a nohref onclick="ICEcoder.ftpManager()">FTP</a></li>
286286
</ul>
287287
</div>
288288
//-->
289-
<div id="optionsHelp" class="optionsList" onmouseover="ICEcoder.showHideFileNav('show',this.id)" onmouseout="ICEcoder.showHideFileNav('hide', this.id);ICEcoder.canShowFMNav = false">
289+
<div id="optionsHelp" class="optionsList" onmouseover="ICEcoder.showHideFileNav('show', this.id)" onmouseout="ICEcoder.showHideFileNav('hide', this.id);ICEcoder.canShowFMNav = false">
290290
<ul>
291291
<li><a nohref onclick="ICEcoder.viewTutorial(false, 500)">Tutorial</a></li>
292292
<li><a href="https://icecoder.net/usage" target="_blank">Usage</a></li>

lib/updater.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ function copyOldVersion() {
7373
}
7474
}
7575
}
76-
$icv_url = "https://icecoder.net/latest-version.txt";
76+
$icvURL = "https://icecoder.net/latest-version.txt";
7777
echo 'Detecting current version of ICEcoder...<br>';
78-
$icvInfo = getData($icv_url,'curl','Sorry, couldn\'t figure out latest version.');
78+
$icvInfo = getData($icvURL,'curl','Sorry, couldn\'t figure out latest version.');
7979
echo 'Latest version of ICEcoder is '.$icvInfo.'<br>';
8080
openZipNew($icvInfo);
8181
}

0 commit comments

Comments
 (0)