From c2ec4b0ae353241f73dcd8090e1dfc6624287fe8 Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Wed, 27 Aug 2014 09:19:20 +0100 Subject: [PATCH] Commit action added xssClean call needs "html" context Commit action added, displays screen to allow user to input the commit title and message Gets content of files ready and puts into textareas with IDs to be picked up after cleaning up filenames Start a github object with JS and push to GitHub, running through files until it's done them all, and displaying error message if there's a problem. If all is OK though, it simulates a CTRL-click to deselect file and remove from file manager list. When done, it will state it is switching back and switch back --- lib/github.php | 106 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 1 deletion(-) diff --git a/lib/github.php b/lib/github.php index a0ded37..be35d5d 100644 --- a/lib/github.php +++ b/lib/github.php @@ -14,11 +14,12 @@ if (!extension_loaded('openssl') || !in_array('https', $wrappers)) { // If we have an action to perform if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset($_GET['action']) && $sslAvail) { + // ==== // AUTH // ==== if ($_GET['action']=="auth") { - $_SESSION['githubAuthToken'] = xssClean($_GET['token']); + $_SESSION['githubAuthToken'] = xssClean($_GET['token'],"html"); echo ' @@ -108,5 +109,108 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset } + // ====== + // COMMIT + // ====== + if ($_GET['action']=="commit") { + ?> + + + + + ICEcoder <?php echo $ICEcoder["versionNo"];?> GitHub commit files + + + + + + + + + +

+ +
+ Title:

+ Message:
+
+ +
Commit
+ +

+ + '.str_replace("","",str_replace("&","&",$loadedFile)).'

'.PHP_EOL.PHP_EOL; + } + } + ?> + + + + + + + \ No newline at end of file