Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Grenoble
Eole-Wol
Commits
43ec78e4
Unverified
Commit
43ec78e4
authored
Aug 05, 2019
by
David Beniamine
Browse files
Cleaner error handling
parent
fe233a17
Changes
1
Hide whitespace changes
Inline
Side-by-side
wol/www/index.php
View file @
43ec78e4
...
...
@@ -33,17 +33,13 @@ error_reporting(E_ALL);
extract
(
$_POST
);
if
(
!
isset
(
$action
)){
$lines
=
explode
(
PHP_EOL
,
shell_
exec
(
"../scripts/get_registry.sh"
)
);
exec
(
"../scripts/get_registry.sh"
,
$lines
,
$code
);
?>
<p>
<?php
$n
=
count
(
$lines
);
if
(
empty
(
$lines
)){
echo
"Impossible de récupérer le registre"
;
ob_start
();
shell_exec
(
"../scripts/get_registry.sh"
);
$lines
=
ob_get_clean
();
echo
"
$lines
"
;
echo
"Impossible de récupérer le registre, code
$code
"
;
}
else
if
(
$n
==
1
){
echo
"
$n
poste est enregistré sur ce serveur"
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment