mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-03 07:13:59 +01:00
Using getData function now
This commit is contained in:
@@ -6,7 +6,7 @@ include("settings.php");
|
||||
$file = str_replace("|","/",xssClean($_GET['file'],'html'));
|
||||
|
||||
// Get contents
|
||||
$loadedFile = toUTF8noBOM(file_get_contents("../backups/".$file,false,$context),true);
|
||||
$loadedFile = toUTF8noBOM(getData("../backups/".$file),true);
|
||||
$encoding=ini_get("default_charset");
|
||||
if($encoding=="")
|
||||
$encoding="UTF-8";
|
||||
|
||||
@@ -105,7 +105,7 @@ if ($_GET['action']=="load") {
|
||||
ftpEnd();
|
||||
// Get local file
|
||||
} else {
|
||||
$loadedFile = toUTF8noBOM(file_get_contents($file,false,$context),true);
|
||||
$loadedFile = toUTF8noBOM(getData($file),true);
|
||||
}
|
||||
$encoding=ini_get("default_charset");
|
||||
if($encoding=="")
|
||||
|
||||
@@ -8,7 +8,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
|
||||
// Get our old FTP sites & user settings
|
||||
$oldFTPSites = $ICEcoder["ftpSites"];
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
$settingsContents = getData($settingsFile);
|
||||
|
||||
// ========
|
||||
// CHOOSING
|
||||
|
||||
@@ -230,7 +230,7 @@ if (!isset($ftpSite) && $_SESSION['githubDiff']) {
|
||||
// If we're not looking at a .git dir, it's not a .gitignore excluded path and not a dir
|
||||
if (strpos($fileFolderName,".git/") == false && !in_array($docRoot.$iceRoot.$fileFolderName, $excluded) && !is_dir($docRoot.$iceRoot.$fileFolderName)) {
|
||||
// Get contents of file
|
||||
$contents = file_get_contents($docRoot.$iceRoot.$fileFolderName);
|
||||
$contents = getData($docRoot.$iceRoot.$fileFolderName);
|
||||
|
||||
$finfo = "text";
|
||||
// Determine if we should remove \r line endings based on mime type (text files yes, others no)
|
||||
|
||||
@@ -9,7 +9,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
// Get our old paths & user settings
|
||||
$oldLocal = $ICEcoder["githubLocalPaths"];
|
||||
$oldRemote = $ICEcoder["githubRemotePaths"];
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
$settingsContents = getData($settingsFile);
|
||||
|
||||
// ========
|
||||
// CHOOSING
|
||||
|
||||
@@ -6,7 +6,7 @@ $t = $text['settings-update'];
|
||||
// Update our 'root' value to be blank
|
||||
// which resets the file manager to localhost root again
|
||||
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn']) {
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
$settingsContents = getData($settingsFile);
|
||||
// Replace our root var
|
||||
$repPosStart = strpos($settingsContents,'"root"');
|
||||
$repPosEnd = strpos($settingsContents,'"checkUpdates"');
|
||||
|
||||
@@ -125,7 +125,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
$fullPath = $path.$slash.$f;
|
||||
if(is_dir($fullPath)) {
|
||||
$ret .= phpGrep($q, $fullPath, $base);
|
||||
} else if(stristr(toUTF8noBOM(file_get_contents($fullPath,false,$context),false), $q)) {
|
||||
} else if(stristr(toUTF8noBOM(getData($fullPath),false), $q)) {
|
||||
$bFile = false;
|
||||
$foundInSelFile = false;
|
||||
// Exclude banned files
|
||||
@@ -147,7 +147,7 @@ if (startTab!=top.ICEcoder.selectedTab) {
|
||||
}
|
||||
if (!$bFile && (count($selectedFiles)==0 || count($selectedFiles)>0 && $foundInSelFile)) {
|
||||
$ret .= "<a href=\\\"javascript:top.ICEcoder.openFile('".$fullPath."');top.ICEcoder.goFindAfterOpenInt = setInterval(function(){goFindAfterOpen('".$fullPath."')},20);top.ICEcoder.showHide('hide',top.get('blackMask'))\\\">";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">".$t['Found']." ".substr_count(strtolower(toUTF8noBOM(file_get_contents($fullPath,false,$context),false)),$q)." ".$t['times']."</div>";
|
||||
$ret .= str_replace($base,"",$fullPath)."</a><div id=\\\"foundCount".$r."\\\">".$t['Found']." ".substr_count(strtolower(toUTF8noBOM(getData($fullPath),false)),$q)." ".$t['times']."</div>";
|
||||
if (isset($_GET['replace'])) {
|
||||
$ret .= "<div class=\\\"replace\\\" id=\\\"replace\\\" onClick=\\\"replaceInFileSingle('".$fullPath."');this.style.display=\'none\'\\\">".$t['replace']."</div>";
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@ $t = $text['settings-save-current-files'];
|
||||
|
||||
// Save the currently opened files for next time
|
||||
if ($_SESSION['loggedIn'] && isset($_GET["saveFiles"]) && $_GET['saveFiles']) {
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
$settingsContents = getData($settingsFile);
|
||||
|
||||
// Replace our previousFiles var with the the current
|
||||
$repPosStart = strpos($settingsContents,'previousFiles" => "')+20;
|
||||
|
||||
@@ -5,7 +5,7 @@ $t = $text['settings-update'];
|
||||
|
||||
// Update this config file?
|
||||
if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_POST["theme"]) && $_POST["theme"]) {
|
||||
$settingsContents = file_get_contents($settingsFile,false,$context);
|
||||
$settingsContents = getData($settingsFile);
|
||||
// Replace our settings vars
|
||||
$repPosStart = strpos($settingsContents,'"root"');
|
||||
$repPosEnd = strpos($settingsContents,'"plugins"');
|
||||
@@ -84,7 +84,7 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
|
||||
$refreshFM = $_POST['changedFileSettings']=="true" ? "true" : "false";
|
||||
|
||||
// Change multiUser and enableRegistration in config___settings.php
|
||||
$generalSettingsContents = file_get_contents($configSettings,false,$context);
|
||||
$generalSettingsContents = getData($configSettings);
|
||||
$isMultiUser = isset($_POST['multiUser']) && $_POST['multiUser'] ? "true" : "false";
|
||||
$generalSettingsContents = str_replace('"multiUser" => true,','"multiUser" => '.$isMultiUser.',',$generalSettingsContents);
|
||||
$generalSettingsContents = str_replace('"multiUser" => false,','"multiUser" => '.$isMultiUser.',',$generalSettingsContents);
|
||||
|
||||
Reference in New Issue
Block a user