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

Commit 6ed2edb

Browse files
committed
Removing unnecessary semi-colons
1 parent 28ee41c commit 6ed2edb

19 files changed

+165
-167
lines changed

editor.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,28 @@
2323
<?php
2424
if (file_exists(__DIR__."/plugins/jshint/jshint-2.5.6.min.js")) {
2525
echo '<script src="plugins/jshint/jshint-2.5.6.min.js?microtime='.microtime(true).'></script>';
26-
};?>
26+
} ?>
2727
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
2828
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/fold/foldgutter.css?microtime=<?php echo microtime(true);?>">
2929
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/scroll/simplescrollbars.css?microtime=<?php echo microtime(true);?>">
3030
<?php
3131
if (file_exists(__DIR__."/plugins/emmet/emmet.min.js")) {
3232
echo '<script src="plugins/emmet/emmet.min.js?microtime='.microtime(true).'"></script>';
33-
};?>
33+
} ?>
3434
<?php
3535
if (file_exists(__DIR__."/plugins/pesticide/pesticide.js")) {
3636
echo '<script src="plugins/pesticide/pesticide.js?microtime='.microtime(true).'"></script>';
37-
};?>
37+
} ?>
3838
<?php
3939
if (file_exists(__DIR__."/plugins/stats.js/stats.min.js")) {
4040
echo '<script src="plugins/stats.js/stats.min.js?microtime='.microtime(true).'"></script>';
41-
};?>
41+
} ?>
4242
<?php
4343
if (file_exists(__DIR__."/plugins/responsive-helper/responsive-helper.js")) {
4444
echo '<script src="plugins/responsive-helper/responsive-helper.js?microtime='.microtime(true).'"></script>';
45-
};?>
45+
} ?>
4646
<link rel="stylesheet" href="<?php
47-
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
47+
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';}
4848
echo "?microtime=".microtime(true);
4949
if (array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","mdn-like","neat","neo","paraiso-light","solarized","the-matrix","xq-light")) !== false) {
5050
$activeLineBG = "#ccc";
@@ -130,7 +130,7 @@
130130
<div class="trialBarContainer"><div class="trialBarRemaining" id="trialBarRemaining"></div><br>
131131
<div class="trialBarText"><?php echo $tDaysRemaining;?> <?php echo $t['days left'];?> - <a href="lib/login.php?get=code&csrf=<?php echo $_SESSION["csrf"];?>" target="_parent">Unlock now</a></div>
132132
</div>
133-
<?php ;}; ?>
133+
<?php } ?>
134134

135135
<h2><?php echo $t['files'];?></h2>
136136
<span class="heading"><?php echo $t['Last 10 files...'];?></span><br>
@@ -147,10 +147,9 @@
147147
echo '<a style="cursor:pointer" onClick="top.ICEcoder.openFile(\''.str_replace($docRoot,"",str_replace("|","/",$last10FilesArray[$i])).'\')">';
148148
echo str_replace($docRoot,"",str_replace("|","/",$last10FilesArray[$i]));
149149
echo '</a></li>';
150-
if ($i<count($last10FilesArray)-1) {echo PHP_EOL;};
151-
}
152-
}
153-
;?></ul>
150+
if ($i<count($last10FilesArray)-1) {echo PHP_EOL;}
151+
}
152+
} ?></ul>
154153
</div>
155154

156155
<div style="clear: both"></div>
@@ -175,8 +174,8 @@
175174
<a nohref onclick="top.ICEcoder.filesFrame.contentWindow.frames['testControl'].location.href = 'test'" style="color: #fff; cursor: pointer"><?php echo $t['Run unit tests'];?></a><div id="unitTestResults"></div>
176175
</div>
177176
<?php
178-
;};
179-
?>
177+
}
178+
?>
180179
<div style="float: left">
181180
<h2><?php echo $t['dev mode'];?> <?php echo $ICEcoder['devMode'] ? "on" : "off";?></h2>
182181
<span class="heading"><?php echo $t['Status'];?>:</span><br>

files.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
<link rel="stylesheet" type="text/css" href="lib/files.css?microtime=<?php echo microtime(true);?>">
1616
<link rel="stylesheet" type="text/css" href="lib/file-types.css?microtime=<?php echo microtime(true);?>">
1717
<link rel="stylesheet" type="text/css" href="lib/file-type-icons.css?microtime=<?php echo microtime(true);?>">
18-
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';}; echo ".js?microtime=".microtime(true);?>" type="text/javascript"></script>
18+
<script src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';}
19+
echo ".js?microtime=".microtime(true);?>" type="text/javascript"></script>
1920
<!--Updated via settings so must remain 4th stylesheet//-->
2021
<style>
2122
ul.fileManager li a span { font-size: <?php echo $ICEcoder["fontSize"];?>; }
@@ -45,7 +46,7 @@
4546
echo $iceRoot == "" ? $t['ROOT'] : trim($iceRoot,"/");
4647
$thisPermVal = $serverType=="Linux" ? substr(sprintf('%o', fileperms($docRoot.$iceRoot)), -3) : "";
4748
$permColors = $thisPermVal == 777 ? 'background: #800; color: #eee' : 'color: #888';
48-
?></span> <span style="<?php echo $permColors;?>; font-size: 8px" id="|_perms"><?php echo $thisPermVal;;?></span></a></li><?php
49+
?></span> <span style="<?php echo $permColors;?>; font-size: 8px" id="|_perms"><?php echo $thisPermVal; ?></span></a></li><?php
4950
// tree file items generated by the iFrame 'fileControl' below which loads in the items at location=| (ie, the root)
5051
?>
5152
</ul>
@@ -62,4 +63,4 @@
6263

6364
</body>
6465

65-
</html>
66+
</html>

index.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
$icv = $icvInfo[0];
1616
$icvI = str_replace('"','\\\'',$icvInfo[1]);
1717
$thisV = $ICEcoder["versionNo"];
18-
if (strpos($thisV,"beta")>-1 && !strpos($icv,"beta") && str_replace(" beta","",$thisV) == $icv) {$thisV-=0.1;};
19-
if ($thisV<$icv) {
18+
if (strpos($thisV,"beta")>-1 && !strpos($icv,"beta") && str_replace(" beta","",$thisV) == $icv) {$thisV-=0.1;}
19+
if ($thisV<$icv) {
2020
$updateMsg = ";top.ICEcoder.dataMessage('<b>".$t['UPDATE INFO'].":</b> ICEcoder v ".$icv." ".$t['now available'].". (".$t['Your version is']." v ".$ICEcoder["versionNo"].").<br><br><a onclick=\\'top.ICEcoder.update()\\' style=\\'color:#fff; background: #b00; padding: 5px; text-decoration: none; cursor: pointer\\'>".$t['Update now']."</a><br><br>".$icvI."');";
2121
}
2222
}
@@ -36,7 +36,7 @@
3636
<meta name="viewport" content="width=device-width, initial-scale=0.5, user-scalable=no">
3737
<link rel="stylesheet" type="text/css" href="lib/ice-coder.css?microtime=<?php echo microtime(true);?>">
3838
<link rel="stylesheet" href="<?php
39-
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
39+
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';}
4040
echo "?microtime=".microtime(true);
4141
?>">
4242
<link rel="icon" type="image/png" href="favicon.png">
@@ -69,7 +69,7 @@
6969
?>
7070
}
7171
</script>
72-
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';};?>.js?microtime=<?php echo microtime(true);?>"></script>
72+
<script language="JavaScript" src="lib/ice-coder<?php if (!$ICEcoder['devMode']) {echo '.min';} ?>.js?microtime=<?php echo microtime(true);?>"></script>
7373
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
7474
<script src="lib/draggabilly.pkgd.min.js?microtime=<?php echo microtime(true);?>"></script>
7575
<script src="farbtastic/farbtastic.js?microtime=<?php echo microtime(true);?>"></script>
@@ -116,7 +116,7 @@
116116
echo "top.ICEcoder.githubAuthTokenSet = true;";
117117
}
118118
echo "top.ICEcoder.csrf = '".$_SESSION["csrf"]."';";
119-
?>ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;top.ICEcoder.content.style.visibility='visible';top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = 'processes/on-load.php';<?php if(isset($_GET["display"]) && $_GET["display"] == "updated") {echo "top.ICEcoder.updated();";};?>" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
119+
?>ICEcoder.init()<?php echo $updateMsg.$onLoadExtras;?>;top.ICEcoder.content.style.visibility='visible';top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = 'processes/on-load.php';<?php if(isset($_GET["display"]) && $_GET["display"] == "updated") {echo "top.ICEcoder.updated();";} ?>" onResize="ICEcoder.setLayout()" onKeyDown="return ICEcoder.interceptKeys('coder',event);" onKeyUp="parent.ICEcoder.resetKeys(event);" onBlur="parent.ICEcoder.resetKeys(event);">
120120

121121
<div id="blackMask" class="blackMask" onClick="if (!ICEcoder.overPopup) {ICEcoder.showHide('hide',this)}" onContextMenu="return false">
122122
<div class="popupVCenter">
@@ -173,8 +173,8 @@
173173
<?php
174174
if (file_exists(__DIR__."/plugins/zip-it/index.php")) {
175175
echo '<a href="javascript:top.ICEcoder.zipIt(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()">Zip It!</a>'.PHP_EOL;
176-
};
177-
?>
176+
}
177+
?>
178178
<a href="javascript:top.ICEcoder.downloadFile(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Download'];?></a>
179179
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
180180
<a href="javascript:top.ICEcoder.propertiesScreen(top.ICEcoder.selectedFiles[top.ICEcoder.selectedFiles.length-1])" onMouseOver="ICEcoder.showFileMenu()"><?php echo $t['Properties'];?></a>
@@ -306,7 +306,7 @@
306306
</form>
307307
<form onSubmit="return ICEcoder.goToLine()">
308308
<div class="codeAssist" title="<?php echo $t['Turn on/off...'];?>">
309-
<input type="checkbox" name="codeAssist" id="codeAssist" class="codeAssistCheckbox" <?php if ($ICEcoder['codeAssist']) {echo 'checked ';};?>>
309+
<input type="checkbox" name="codeAssist" id="codeAssist" class="codeAssistCheckbox" <?php if ($ICEcoder['codeAssist']) {echo 'checked ';} ?>>
310310
<span class="codeAssistDisplay" id="codeAssistDisplay" style="background-position: <?php echo $ICEcoder['codeAssist'] ? "0" : "-16";?> 0" onClick="top.ICEcoder.codeAssistToggle()"></span> <?php echo $t['Code Assist'];?>
311311
</div>
312312
<div class="goLine"><?php echo $t['Go to Line'];?> <input type="text" name="goToLine" value="" id="goToLineNo" class="textbox goToLine">

lib/file-control-xhr.php

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$error = true;
3232
$errorStr = "true";
3333
$errorMsg = $t['Sorry, bad filename...'];
34-
};
34+
}
3535

3636
// If we have file(s) to work with...
3737
if (!$error) {
@@ -56,8 +56,8 @@
5656
if (strpos($allFiles[$i],$docRoot)===false && $_GET['action']!="getRemoteFile") {
5757
$allFiles[$i]=str_replace("|","/",$docRoot.$iceRoot.$allFiles[$i]);
5858
}
59-
};
60-
$file = implode(";",$allFiles);
59+
}
60+
$file = implode(";",$allFiles);
6161

6262
// Establish the $fileLoc and $fileName (used in single file cases, eg opening. Multiple file cases, eg deleting, is worked out in that loop)
6363
$fileLoc = substr(str_replace($docRoot,"",$file),0,strrpos(str_replace($docRoot,"",$file),"/"));
@@ -85,8 +85,8 @@
8585
$error = true;
8686
$errorStr = "true";
8787
$errorMsg = "Sorry! - problem with file requested";
88-
};
89-
}
88+
}
89+
}
9090
}
9191

9292
$doNext = "";
@@ -528,7 +528,7 @@ function stitchChanges($fileLines) {
528528
}
529529
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
530530
}
531-
};
531+
}
532532

533533
// ==========
534534
// NEW FOLDER
@@ -563,7 +563,7 @@ function stitchChanges($fileLines) {
563563
$finalAction = "nothing";
564564
}
565565
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
566-
};
566+
}
567567

568568
// ================
569569
// MOVE FILE/FOLDER
@@ -613,7 +613,7 @@ function stitchChanges($fileLines) {
613613
$finalAction = "nothing";
614614
}
615615
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
616-
};
616+
}
617617

618618
// ==================
619619
// RENAME FILE/FOLDER
@@ -647,7 +647,7 @@ function stitchChanges($fileLines) {
647647
$finalAction = "nothing";
648648
}
649649
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
650-
};
650+
}
651651

652652
// =================
653653
// PASTE FILE/FOLDER
@@ -704,7 +704,7 @@ function stitchChanges($fileLines) {
704704
$finalAction = "nothing";
705705
}
706706
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
707-
};
707+
}
708708

709709
// ==============
710710
// UPLOAD FILE(S)
@@ -769,7 +769,7 @@ function getDetails($fileArr) {
769769

770770
// Upload is not handled by XHR methods, but form post, so we need to manually trigger $doNext in a script tag
771771
echo "<script>".$doNext."</script>";
772-
};
772+
}
773773

774774
// ========================
775775
// DELETE FILE(S)/FOLDER(S)
@@ -784,8 +784,8 @@ function getDetails($fileArr) {
784784
$itemType = $ftpFileDirInfo['type'] == "directory" ? "dir" : "file";
785785
$itemPath = ltrim($fileLoc."/".$fileName,"/");
786786
if (!$demoMode && ftpDelete($ftpConn,$itemType,$itemPath)) {
787-
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";};
788-
// Reload file manager
787+
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";}
788+
// Reload file manager
789789
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
790790
$finalAction = "delete";
791791
// Run our custom processes
@@ -818,8 +818,8 @@ function getDetails($fileArr) {
818818
}
819819
$fileName = basename($fullPath);
820820
$fileLoc = dirname(str_replace($docRoot,"",$fullPath));
821-
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";};
822-
// Reload file manager
821+
if ($fileLoc=="" || $fileLoc=="\\") {$fileLoc="/";}
822+
// Reload file manager
823823
$doNext .= 'top.ICEcoder.selectedFiles=[];top.ICEcoder.updateFileManagerList(\'delete\',\''.$fileLoc.'\',\''.$fileName.'\');';
824824
$finalAction = "delete";
825825
// Run our custom processes
@@ -831,7 +831,7 @@ function getDetails($fileArr) {
831831
}
832832
}
833833
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
834-
};
834+
}
835835

836836
// The function to recursively remove folders & files
837837
function rrmdir($dir) {
@@ -855,7 +855,7 @@ function rrmdir($dir) {
855855
? rename($dir,str_replace("\\","/",__DIR__)."/../tmp/.".str_replace(":","_",str_replace("/","_",$dir)))
856856
: rmdir($dir);
857857
}
858-
};
858+
}
859859

860860
// ======================
861861
// REPLACE TEXT IN A FILE
@@ -876,7 +876,7 @@ function rrmdir($dir) {
876876
$finalAction = "nothing";
877877
}
878878
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
879-
};
879+
}
880880

881881
// ==========================
882882
// GET CONTENTS OF REMOTE URL
@@ -900,7 +900,7 @@ function rrmdir($dir) {
900900
$doNext .= 'top.ICEcoder.message(\''.$t['Sorry, could not...'].' '.$file.'\');';
901901
}
902902
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
903-
};
903+
}
904904

905905
// =======================
906906
// CHANGING FILE/DIR PERMS
@@ -935,7 +935,7 @@ function rrmdir($dir) {
935935
$doNext .= "top.ICEcoder.message('".$t['Sorry, cannot change...']." \\n".strClean($file)."');";
936936
}
937937
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
938-
};
938+
}
939939

940940
// ====================
941941
// CHECK FOR A FILE/DIR
@@ -946,7 +946,7 @@ function rrmdir($dir) {
946946
// Nothing really done here though, we do something with the responseText
947947
$finalAction = "checkExists";
948948
$doNext .= 'top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);';
949-
};
949+
}
950950

951951
// ===================
952952
// JSON DATA TO RETURN

lib/file-control.php

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<?php if ($_SESSION['githubDiff']) { ?>
88
<script src="github.js?microtime=<?php echo microtime(true);?>"></script>
99
<script src="underscore-min.js?microtime=<?php echo microtime(true);?>"></script>
10-
<?php ;}; ?>
10+
<?php } ?>
1111
<script>
1212
<?php
1313
// Establish the filename/new filename
@@ -35,7 +35,7 @@
3535
if (strpos($allFiles[$i],$docRoot)===false && $_GET['action']!="getRemoteFile") {
3636
$allFiles[$i]=str_replace("|","/",$docRoot.$iceRoot.$allFiles[$i]);
3737
}
38-
};
38+
}
3939
$file = implode(";",$allFiles);
4040

4141
// Establish the $fileLoc and $fileName (used in single file cases, eg opening. Multiple file cases, eg deleting, is worked out in that loop)
@@ -60,7 +60,7 @@
6060
($_GET['action']=="getRemoteFile" && strpos($allFiles[$i],"http") !== 0)
6161
) {
6262
die("top.ICEcoder.message('Sorry! - problem with file requested');</script>");
63-
};
63+
}
6464
}
6565

6666
// If we're due to open a file...
@@ -85,9 +85,9 @@
8585
} else {
8686
$fileExt = explode(" ",pathinfo($file, PATHINFO_EXTENSION));
8787
$fileExt = $fileExt[0];
88-
if (array_search($fileExt,array("gif","jpg","jpeg","png"))!==false) {$finfo = "image";};
89-
if (array_search($fileExt,array("doc","docx","ppt","rtf","pdf","zip","tar","gz","swf","asx","asf","midi","mp3","wav","aiff","mov","qt","wmv","mp4","odt","odg","odp"))!==false) {$finfo = "other";};
90-
}
88+
if (array_search($fileExt,array("gif","jpg","jpeg","png"))!==false) {$finfo = "image";}
89+
if (array_search($fileExt,array("doc","docx","ppt","rtf","pdf","zip","tar","gz","swf","asx","asf","midi","mp3","wav","aiff","mov","qt","wmv","mp4","odt","odg","odp"))!==false) {$finfo = "other";}
90+
}
9191
if (strpos($finfo,"text")===0 || strpos($finfo, "application/xml")===0 || strpos($finfo,"empty")!==false) {
9292
echo 'fileType="text";';
9393
echo 'top.ICEcoder.shortURL = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
@@ -123,12 +123,12 @@
123123
echo 'fileType="image";fileName=\''.$fileLoc."/".$fileName.'\';';
124124
} else {
125125
echo 'fileType="other";window.open(\'http://'.$_SERVER['SERVER_NAME'].$fileLoc."/".$fileName.'\');';
126-
};
127-
} else {
126+
}
127+
} else {
128128
echo 'fileType="nothing"; top.ICEcoder.message(\''.$t['Sorry'].', '.$fileLoc."/".$fileName.' '.$t['does not seem...'].'\');';
129129
}
130130

131-
};
131+
}
132132

133133

134134
?>
@@ -182,7 +182,7 @@
182182

183183
top.ICEcoder.filesFrame.contentWindow.frames['processControl'].location.href = "github.php?action=read&repo=<?php echo $ghRemoteURL;?>&filePath=<?php echo $ghFilePath;?>&csrf="+top.ICEcoder.csrf;
184184
}
185-
<?php ;}; ?>
185+
<?php} ?>
186186

187187
// Set the value & innerHTML of the code textarea to that of our loaded file plus make it visible (it's hidden on ICEcoder's load)
188188
top.ICEcoder.switchMode();
@@ -207,9 +207,8 @@
207207

208208
top.ICEcoder.goToLine(<?php echo $lineNumber; ?>);
209209
top.ICEcoder.loadingFile = false;
210-
<?php
211-
;};
212-
?>
210+
<?php}
211+
?>
213212
}
214213
},4);
215214
}

0 commit comments

Comments
 (0)