Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 14, 2023. It is now read-only.
/ICEcoderPublic archive

Increase readability#741

Open
rotelok wants to merge18 commits intoicecoder:master
base:master
Choose a base branch
Loading
fromrotelok:increase-readability
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
18 commits
Select commitHold shift + click to select a range
76dc065
Changing instances of dirname(__FILE__) to __DIR__
rotelokJun 16, 2018
52d8440
fixing funcion name case mismatch
rotelokJun 16, 2018
fd2603a
removing unnecessary variable attributions
rotelokJun 16, 2018
972ae19
changing the alias function is_writeable to the php function is_writable
rotelokJun 16, 2018
fe3683a
simplifying $isMac attribution, it doesn't need a ternary operator
rotelokJun 16, 2018
28ee41c
using array_merge instead of '+' to merge arrays
rotelokJun 16, 2018
6ed2edb
Removing unnecessary semi-colons
rotelokJun 16, 2018
05ee5e5
Removing unnecessary parenthesis
rotelokJun 16, 2018
9cd129b
Altering
rotelokJun 16, 2018
f4fe032
altering
rotelokJun 16, 2018
2d63ef5
merging isset($var1) && isset($var2) to isset($var1,$var2) it's equiv…
rotelokJun 16, 2018
2caa32a
changing the constructs intval($var) and floatval($var) to (int)$var
rotelokJun 16, 2018
f2b19dd
Altering the function phpversion() to the constant PHP_VERSION
rotelokJun 16, 2018
c8b2bc0
using $array[] = $value instead of array_push($array,$value)
rotelokJun 16, 2018
399c046
merging multiple sequential str_replace() calls
rotelokJun 16, 2018
7bc0dea
refactored the constructs
rotelokJun 16, 2018
f8565d1
disable scandir sorting, because we don't use it
rotelokJun 16, 2018
5c8aa37
Reverting the commig 6ed2edb "Removing unnecessary semi-colons"
rotelokJun 17, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletionseditor.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
<?php
include("lib/headers.php");
include("lib/settings.php");
include"lib/headers.php";
include"lib/settings.php";
$t = $text['editor'];
?>
<!DOCTYPE html>
Expand All@@ -21,34 +21,34 @@
//-->
<script src="<?php echo $ICEcoder["codeMirrorDir"]; ?>/lib/codemirror-compressed.js?microtime=<?php echo microtime(true);?>"></script>
<?php
if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint-2.5.6.min.js")) {
if (file_exists(__DIR__."/plugins/jshint/jshint-2.5.6.min.js")) {
echo '<script src="plugins/jshint/jshint-2.5.6.min.js?microtime='.microtime(true).'></script>';
};?>
<script src="lib/mmd.js?microtime=<?php echo microtime(true);?>"></script>
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/fold/foldgutter.css?microtime=<?php echo microtime(true);?>">
<link rel="stylesheet" href="<?php echo $ICEcoder["codeMirrorDir"]; ?>/addon/scroll/simplescrollbars.css?microtime=<?php echo microtime(true);?>">
<?php
if (file_exists(dirname(__FILE__)."/plugins/emmet/emmet.min.js")) {
if (file_exists(__DIR__."/plugins/emmet/emmet.min.js")) {
echo '<script src="plugins/emmet/emmet.min.js?microtime='.microtime(true).'"></script>';
};?>
<?php
if (file_exists(dirname(__FILE__)."/plugins/pesticide/pesticide.js")) {
if (file_exists(__DIR__."/plugins/pesticide/pesticide.js")) {
echo '<script src="plugins/pesticide/pesticide.js?microtime='.microtime(true).'"></script>';
};?>
<?php
if (file_exists(dirname(__FILE__)."/plugins/stats.js/stats.min.js")) {
if (file_exists(__DIR__."/plugins/stats.js/stats.min.js")) {
echo '<script src="plugins/stats.js/stats.min.js?microtime='.microtime(true).'"></script>';
};?>
<?php
if (file_exists(dirname(__FILE__)."/plugins/responsive-helper/responsive-helper.js")) {
if (file_exists(__DIR__."/plugins/responsive-helper/responsive-helper.js")) {
echo '<script src="plugins/responsive-helper/responsive-helper.js?microtime='.microtime(true).'"></script>';
};?>
<link rel="stylesheet" href="<?php
if ($ICEcoder["theme"]=="default") {echo 'lib/editor.css';} else {echo $ICEcoder["codeMirrorDir"].'/theme/'.$ICEcoder["theme"].'.css';};
echo "?microtime=".microtime(true);
if (array_search($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","mdn-like","neat","neo","paraiso-light","solarized","the-matrix","xq-light")) !== false) {
if (in_array($ICEcoder["theme"],array("3024-day","base16-light","eclipse","elegant","mdn-like","neat","neo","paraiso-light","solarized","the-matrix","xq-light"))) {
$activeLineBG = "#ccc";
} elseif (array_search($ICEcoder["theme"],array("3024-night","blackboard","colorforth","liquibyte","night","tomorrow-night-bright","tomorrow-night-eighties","vibrant-ink")) !== false) {
} elseif (in_array($ICEcoder["theme"],array("3024-night","blackboard","colorforth","liquibyte","night","tomorrow-night-bright","tomorrow-night-eighties","vibrant-ink"))) {
$activeLineBG = "#888";
} else {
$activeLineBG = "#000";
Expand DownExpand Up@@ -112,7 +112,7 @@
<span class="heading"><?php echo $t['ICEcoder root'];?></span><br>
<?php echo $docRoot.$iceRoot;?><br><br>
<span class="heading"><?php echo $t['PHP version'];?></span><br>
<?php echophpversion();?><br><br>
<?php echoPHP_VERSION;?><br><br>
<span class="heading"><?php echo $t['Date & time'];?></span><br>
<span id="serverDT"></span><br><br>
<h2><?php echo $t['your device'];?></h2>
Expand All@@ -136,7 +136,7 @@
<span class="heading"><?php echo $t['Last 10 files...'];?></span><br>
<ul class="fileManager" id="last10Files" style="margin-left: 0; line-height: 20px"><?php
$last10FilesArray = explode(",",$ICEcoder["last10Files"]);
for ($i=0;$i<count($last10FilesArray);$i++) {
for ($i=0, $iMax =count($last10FilesArray); $i< $iMax;$i++) {
if ($ICEcoder["last10Files"]=="") {
echo '<div style="display: inline-block; margin-left: -39px; margin-top: -4px">'.$t['none'].'</div><br><br>';
} else {
Expand DownExpand Up@@ -318,7 +318,7 @@ function createNewCMInstance(num) {

<div style="position: absolute; display: none; height: 100%; width: 100%; top: 0; padding: 3px 0 0 60px; line-height: 16px; font-family: monospace; font-size: 13px; z-index: 2147483647" id="game"></div>

<?php include_once("processes/on-editor-load.php"); ?>
<?php include_once"processes/on-editor-load.php"; ?>

</body>

Expand Down
4 changes: 2 additions & 2 deletionsfiles.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
<?php
include("lib/headers.php");
include("lib/settings.php");
include"lib/headers.php";
include"lib/settings.php";
$t = $text['files'];

// Is our dir in the list of GitHub local paths?
Expand Down
10 changes: 5 additions & 5 deletionsindex.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
<?php
include("lib/headers.php");
include("lib/settings.php");
include"lib/headers.php";
include"lib/settings.php";
$t = $text['index'];

$updateMsg = '';
Expand All@@ -21,7 +21,7 @@
}
}

$isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh")>-1 ? true : false;
$isMac = strpos($_SERVER['HTTP_USER_AGENT'], "Macintosh") > -1;
?>
<!DOCTYPE html>
<html onMouseDown="top.ICEcoder.mouseDown=true; top.ICEcoder.resetAutoLogoutTimer();" onMouseUp="top.ICEcoder.mouseDown=false; top.ICEcoder.resetAutoLogoutTimer(); top.ICEcoder.mouseDownInCM=false; if (!top.ICEcoder.overCloseLink) {top.ICEcoder.tabDragEnd()}" onMouseMove="if(top.ICEcoder) {top.ICEcoder.getMouseXY(event,'top'); top.ICEcoder.resetAutoLogoutTimer(); top.ICEcoder.canResizeFilesW()}" onMouseWheel="top.ICEcoder.resetAutoLogoutTimer(); if (top.ICEcoder.getcMInstance() && !top.ICEcoder.getcMInstance().hasFocus() && !top.ICEcoder.getcMdiffInstance().hasFocus()) {event.wheelDelta > 0 ? top.ICEcoder.nextTab() : top.ICEcoder.previousTab();}">
Expand DownExpand Up@@ -171,7 +171,7 @@
</span>
<div onMouseOver="ICEcoder.showFileMenu()" style="padding: 2px 0"><hr></div>
<?php
if (file_exists(dirname(__FILE__)."/plugins/zip-it/index.php")) {
if (file_exists(__DIR__."/plugins/zip-it/index.php")) {
echo '<a href="#"7200e58692d5db1df9b8e7680b2e6690903f79f9f666d428d5caed3fa1330d88">};
?>
Expand DownExpand Up@@ -344,4 +344,4 @@

</body>

</html>
</html>
6 changes: 3 additions & 3 deletionslib/auto-logout-warning.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
<?php
include("headers.php");
include("settings.php");
include"headers.php";
include"settings.php";
$t = $text['auto-logout-warning'];
?>
<!DOCTYPE html>
Expand All@@ -21,4 +21,4 @@

</body>

</html>
</html>
6 changes: 3 additions & 3 deletionslib/backup-versions-preview-loader.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
<?php
// Load common functions
include("headers.php");
include("settings.php");
include"headers.php";
include"settings.php";

$file = str_replace("|","/",xssClean($_GET['file'],'html'));

Expand DownExpand Up@@ -33,4 +33,4 @@
parent.document.getElementById('buttonsContainer').style.display = 'inline-block';
parent.editor.setValue(document.getElementById('loadedFile').value);
parent.document.getElementById('infoContainer').innerHTML = 'Date & Time:<br><?php echo $datetime;?><br><br>Size:<br><?php echo $size;?>';
</script>
</script>
12 changes: 6 additions & 6 deletionslib/backup-versions.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
<?php
// Load common functions
include("headers.php");
include("settings.php");
include"headers.php";
include"settings.php";
$text = $_SESSION['text'];
$t = $text['backup-versions'];

Expand DownExpand Up@@ -50,11 +50,11 @@

while (false !== ($cssFile = readdir($handle))) {
if ($cssFile !== "." && $cssFile != "..") {
array_push($themeArray,basename($cssFile,".css"));
$themeArray[] =basename($cssFile,".css");
}
}
sort($themeArray);
for ($i=0;$i<count($themeArray);$i++) {
for ($i=0, $iMax =count($themeArray); $i< $iMax;$i++) {
echo '<link rel="stylesheet" href="../'.$ICEcoder["codeMirrorDir"].'/theme/'.$themeArray[$i].'.css?microtime='.microtime(true).'">'.PHP_EOL;
}
?>
Expand DownExpand Up@@ -110,7 +110,7 @@

<?php
echo "fileName = '".basename($file)."';";
include(dirname(__FILE__)."/language-modes-partial.js");
include __DIR__."/language-modes-partial.js";
?>

var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
Expand DownExpand Up@@ -167,4 +167,4 @@

</body>

</html>
</html>
14 changes: 7 additions & 7 deletionslib/bug-files-check.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
<?php
// Load common functions
include("headers.php");
include_once("settings-common.php");
include"headers.php";
include_once"settings-common.php";
$text = $_SESSION['text'];
$t = $text['bug-files-check'];

Expand All@@ -11,7 +11,7 @@

$result = "ok";

for ($i=0; $i<count($files); $i++) {
for ($i=0, $iMax =count($files); $i< $iMax; $i++) {
// Work out the real path for a file
$files[$i] = realpath($_SERVER['DOCUMENT_ROOT'].$files[$i]);
// If we can't find that file or it doesn't start with the doc root, it's an error
Expand All@@ -26,7 +26,7 @@

$filesWithNewBugs = 0;

for ($i=0; $i<count($files); $i++) {
for ($i=0, $iMax =count($files); $i< $iMax; $i++) {
// If we have set a filesize value previously and it's different to now, there's new bugs
$fileSizesSeenArray = explode(",",xssClean($_GET['filesSizesSeen'],"html"));
if ($fileSizesSeenArray[$i]!="null" && $fileSizesSeenArray[$i] != $filesSizesSeen[$i]) {
Expand DownExpand Up@@ -93,7 +93,7 @@
}

// Get dir name tmp dir's parent
$tmpLoc =dirname(__FILE__);
$tmpLoc =__DIR__;
$tmpLoc = explode(DIRECTORY_SEPARATOR,$tmpLoc);
$tmpLoc = $tmpLoc[count($tmpLoc)-2];

Expand All@@ -107,9 +107,9 @@
);

// Include our process once our bug checking work is done
include("../processes/on-bug-check.php");
include"../processes/on-bug-check.php";

// Finally, display our status in JSON format as the XHR response text
echo json_encode($status);

?>
?>
6 changes: 3 additions & 3 deletionslib/download.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
<?php
include("headers.php");
include("settings.php");
include"headers.php";
include"settings.php";

// Establish the real absolute path to the file
$file = realpath($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['file'])));
Expand All@@ -24,4 +24,4 @@
readfile($file);
exit;
}
?>
?>
Loading

[8]ページ先頭

©2009-2025 Movatter.jp