ICEcoder.message('".$t['Sorry, cannot create...']."\\n".$chosenLocal."');";
}
}
if (is_dir($docRoot.$chosenLocal)) {
$pathValid = true;
}
if ($pathValid) {
// New setting for the root path
$settingsNew = '"root" => "'.$chosenLocal.'",'.PHP_EOL;
// Identify the bit to replace
$repPosStart = strpos($settingsContents,'"root"');
$repPosEnd = strpos($settingsContents,'"checkUpdates"');
// Compile our new settings
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,$repPosEnd,strlen($settingsContents));
// Now update the config file
if (is_writeable("../data/".$settingsFile)) {
$fh = fopen("../data/".$settingsFile, 'w');
fwrite($fh, $settingsContents);
fclose($fh);
// Clear any FTP session we may have
$_SESSION['ftpSiteRef'] = false;
// Hide this popup and reload file manager
echo "";
} else {
echo "";
}
}
}
// ======
// ADDING
// ======
if ($_GET['action']=="add") {
// Start creating a new chunk for the github paths
$settingsNew = '"githubLocalPaths" => array(';
// Add the new one
if ($_POST['githubLocalPathNEW'] != "" && $_POST['githubRemotePathNEW'] != "") {
$settingsNew .= '"'.injClean(xssClean($_POST['githubLocalPathNEW'],"html")).'",';
}
// Then set all the old local paths
for ($i=0; $i array(';
// Redo the arrays using the form data
for ($i=0; $iwindow.location='github-manager.php?updatedGithubPaths&csrf='+ICEcoder.csrf;";
die($t['saving github paths']);
} else {
echo "";
}
}
}
?>
ICEcoder GitHub manager