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']);
|
$session = new Net_SSH2($config['host'], $config['port']);
|
||||||
if ($session->login($config['user'], $config['pass'])) {
|
if ($session->login($config['user'], $config['pass'])) {
|
||||||
if ($_POST['action'] == 'status') {
|
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') {
|
} else if ($_POST['action'] == 'push') {
|
||||||
$message = empty($_POST['message']) ? 'FTP' : $_POST['message'];
|
$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') {
|
} 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() {
|
window.addEventListener('load', function() {
|
||||||
var sections = document.querySelectorAll('section');
|
var sections = document.querySelectorAll('section');
|
||||||
for (var i = 0; i < sections.length; i++) {
|
for (var i = 0; i < sections.length; i++) {
|
||||||
|
@ -3,10 +3,8 @@
|
|||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if (defined('ONGITLAB') && ONGITLAB) {
|
if (defined('ONGITLAB') && ONGITLAB) {
|
||||||
if (!isset($_SESSION['remember_user_token'])) {
|
if (!isset($_COOKIE['remember_user_token'])) {
|
||||||
if (dirname(__FILE__) != '/') {
|
header('Location: /');
|
||||||
header('Location: /');
|
|
||||||
}
|
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user