mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
added returncode view for api
This commit is contained in:
parent
072d4297f8
commit
2c65001722
1 changed files with 7 additions and 3 deletions
|
@ -41,10 +41,14 @@ if (isset($_POST['user']) || isset($_POST['hash'])) {
|
|||
|
||||
// Run query
|
||||
exec (VESTA_CMD.$cmd." ".$arg1." ".$arg2." ".$arg3." ".$arg4." ".$arg5." ".$arg6." ".$arg7." ".$arg8." ".$arg9, $output, $return_var);
|
||||
if (($return_var == 0) && (empty($output))) {
|
||||
echo 'OK';
|
||||
if ((!empty($_POST['returncode'])) && ($_POST['returncode'] == 'yes')) {
|
||||
echo $return_var;
|
||||
} else {
|
||||
echo implode("\n",$output);
|
||||
if (($return_var == 0) && (empty($output))) {
|
||||
echo "OK";
|
||||
} else {
|
||||
echo implode("\n",$output)."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue