This commit is contained in:
Michel Roux 2013-10-22 09:53:41 +02:00
parent 7e957014f7
commit a94078632b

View File

@ -22,8 +22,8 @@ if (!empty($_POST['action'])) {
if ($_POST['action'] == 'status') {
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('bash -c \'cd ' . $config['path'] . ' && git add -A && git commit -m "' . str_replace(array('"', "'"), ' ', $message) . '" && git push && ' . $gitstatus . "'"));
$message = empty($_POST['message']) ? 'FTP' : str_replace(array('"', "'"), ' ', stripslashes($_POST['message']));
echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git add -A && git commit -m "' . $message . '" && git push && ' . $gitstatus . "'"));
} else if ($_POST['action'] == 'pull') {
echo ansi2html($session->exec('bash -c \'cd ' . $config['path'] . ' && git pull && ' . $gitstatus . "'"));
}