Corrections diverses (fish)
This commit is contained in:
parent
2f97f00fd5
commit
b723127bdd
6
ajax.php
6
ajax.php
@ -19,12 +19,12 @@ if (!empty($_POST['action'])) {
|
||||
$session = new Net_SSH2($config['host'], $config['port']);
|
||||
if ($session->login($config['user'], $config['pass'])) {
|
||||
if ($_POST['action'] == 'status') {
|
||||
echo ansi2html($session->exec('cd ' . $config['path'] . ' && ' . $gitstatus));
|
||||
echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && ' . $gitstatus . "'"));
|
||||
} else if ($_POST['action'] == 'push') {
|
||||
$message = empty($_POST['message']) ? 'FTP' : $_POST['message'];
|
||||
echo ansi2html($session->exec('cd ' . $config['path'] . ' && git add -A && git commit -m "' . $message . '" && git push && ' . $gitstatus));
|
||||
echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git add -A && git commit -m "' . addslashes($message) . '" && git push && ' . $gitstatus . "'"));
|
||||
} else if ($_POST['action'] == 'pull') {
|
||||
echo ansi2html($session->exec('cd ' . $config['path'] . ' && git pull && ' . $gitstatus));
|
||||
echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git pull && ' . $gitstatus . "'"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,5 @@
|
||||
"use strict";
|
||||
|
||||
window.addEventListener('load', function() {
|
||||
var sections = document.querySelectorAll('section');
|
||||
for (var i = 0; i < sections.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user