mirror of
https://github.com/icecoder/ICEcoder.git
synced 2026-03-04 07:44:01 +01:00
Else & if conds added to get GitHub repo
Added an else condition to work with empty folders, establishes local and remote paths and works out of the $iceRoot is one of our local paths If so, inform the user their folder is empty and ask the user if they'd like to clone the repo If so, show the loading mask and call our GitHub script to begin the process
This commit is contained in:
@@ -90,6 +90,20 @@ if (isset($_GET['location'])) {
|
||||
newUL.innerHTML = showContent;
|
||||
locNest.parentNode.insertBefore(newUL,locNest.nextSibling);
|
||||
},4);
|
||||
} else {
|
||||
<?php
|
||||
$iceGithubLocalPaths = $ICEcoder["githubLocalPaths"];
|
||||
$iceGithubRemotePaths = $ICEcoder["githubRemotePaths"];
|
||||
$pathPos = array_search($iceRoot,$iceGithubLocalPaths);
|
||||
if ($pathPos !== false) {
|
||||
?>
|
||||
if (top.ICEcoder.ask("Your local folder is empty, would you like to clone <?php echo $iceGithubRemotePaths[$pathPos];?>?")) {
|
||||
setTimeout(function() {
|
||||
top.ICEcoder.showHide('show',top.get('loadingMask'));
|
||||
top.ICEcoder.filesFrame.contentWindow.frames['fileControl'].location.href = "lib/github.php?action=clone&csrf="+top.ICEcoder.csrf;
|
||||
},4);
|
||||
}
|
||||
<?php ;}; ?>
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user