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

Increase readability #741

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
changing the alias function is_writeable to the php function is_writable
  • Loading branch information
rotelok committed Jun 16, 2018
commit 972ae19e254febe7f0cbd2ba3bde791d31dcfabe
4 changes: 2 additions & 2 deletions lib/ftp-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));

// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand Down Expand Up @@ -209,4 +209,4 @@

</body>

</html>
</html>
4 changes: 2 additions & 2 deletions lib/github-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));

// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand Down Expand Up @@ -151,7 +151,7 @@
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));

// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand Down
4 changes: 2 additions & 2 deletions lib/go-localhost-root.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
substr($settingsContents,($repPosEnd),strlen($settingsContents));

// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand All @@ -34,4 +34,4 @@
?>
<?php
;};
?>
?>
2 changes: 1 addition & 1 deletion lib/plugins-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));

// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand Down
4 changes: 2 additions & 2 deletions lib/properties.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<br><br>
<span class="column" style="width: 180px"><?php echo $t['Type'];?>: <?php echo is_dir($fileName) ? "Folder" : "File"; ?></span>
<span class="column" style="margin: 0 10px"><?php echo $t['Readable Writeable'];?>:
<?php echo is_readable($fileName) ? "Yes" : "No"; ?> / <?php echo is_writeable($fileName) ? "Yes" : "No";?>
<?php echo is_readable($fileName) ? "Yes" : "No"; ?> / <?php echo is_writable($fileName) ? "Yes" : "No";?>
</span>
<span class="column"><?php echo $t['Relative path'];?>: <?php echo str_replace($docRoot,"",$fileName);?></span>
<br><br>
Expand Down Expand Up @@ -172,4 +172,4 @@ function changePerms(val) {

</body>

</html>
</html>
6 changes: 3 additions & 3 deletions lib/settings-save-current-files.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
$settingsContents = substr($settingsContents,0,$repPosStart).$saveFiles.substr($settingsContents,($repPosStart+$repPosEnd),strlen($settingsContents));
// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand All @@ -45,7 +45,7 @@
if (count($last10FilesArray)>=10) {$ICEcoder["last10Files"]=substr($ICEcoder["last10Files"],0,strrpos($ICEcoder["last10Files"],','));};
$settingsContents = substr($settingsContents,0,$repPosStart).$saveFilesArray[$i].$commaExtra.$ICEcoder["last10Files"].substr($settingsContents,($repPosStart+$repPosEnd),strlen($settingsContents));
// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand All @@ -57,4 +57,4 @@
}
echo '<script>top.ICEcoder.serverMessage();top.ICEcoder.serverQueue("del",0);</script>';
}
?>
?>
6 changes: 3 additions & 3 deletions lib/settings-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,($repPosEnd),strlen($settingsContents));

// Now update the config file
if (is_writeable($settingsFile)) {
if (is_writable($settingsFile)) {
$fh = fopen($settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
Expand Down Expand Up @@ -94,7 +94,7 @@
$generalSettingsContents = str_replace('"enableRegistration" => true','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents);
$generalSettingsContents = str_replace('"enableRegistration" => false','"enableRegistration" => '.$isEnableRegistration,$generalSettingsContents);

if (is_writeable($configSettings)) {
if (is_writable($configSettings)) {
$fConfigSettings = fopen($configSettings, 'w');
fwrite($fConfigSettings, $generalSettingsContents);
fclose($fConfigSettings);
Expand All @@ -114,4 +114,4 @@
$jsBugFilePaths = "['".str_replace(",","','",str_replace(" ","",strClean($_POST['bugFilePaths'])))."']";
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$ICEcoder["codeAssist"].",".$ICEcoder["lockedNav"].",'".$ICEcoder["tagWrapperCommand"]."','".$ICEcoder["autoComplete"]."',".$ICEcoder["visibleTabs"].",'".$ICEcoder["fontSize"]."',".$ICEcoder["lineWrapping"].",".$ICEcoder["lineNumbers"].",".$ICEcoder["showTrailingSpace"].",".$ICEcoder["matchBrackets"].",".$ICEcoder["autoCloseTags"].",".$ICEcoder["autoCloseBrackets"].",".$ICEcoder["indentWithTabs"].",".$ICEcoder["indentAuto"].",".$ICEcoder["indentSize"].",'".$ICEcoder["pluginPanelAligned"]."',".$jsBugFilePaths.",".$ICEcoder["bugFileCheckTimer"].",".$ICEcoder["bugFileMaxLines"].",'".$githubAuthTokenSet."',".$ICEcoder["updateDiffOnSave"].",".$ICEcoder["autoLogoutMins"].",".$refreshFM.");top.iceRoot = '".$ICEcoder["root"]."';</script>";
}
?>
?>
2 changes: 1 addition & 1 deletion lib/updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function startUpdate() {
$testPath = $source.DIRECTORY_SEPARATOR.$iterator->getSubPathName();
$testPath = str_replace("\\","/",$testPath);
if (strpos($testPath,"/backups/")==false && strpos($testPath,"/plugins/")==false && strpos($testPath,"/.git/")==false) {
if (!is_writeable($item)) {
if (!is_writable($item)) {
array_push($cantMoveArray,substr($item,count($source)+2));
}
}
Expand Down