Clean functions.php
This commit is contained in:
parent
ec33842949
commit
1c7c45ea56
3 changed files with 32 additions and 125 deletions
|
|
@ -8,7 +8,7 @@ if (empty($sess->values["connected"]) && !defined("xCSRF"))
|
|||
if (!empty($VAR["development"]))
|
||||
define("DEBUG", true);
|
||||
|
||||
require_once("functions.php"); //Inclusion des principales fonctions
|
||||
require_once("functions.php");
|
||||
|
||||
require_once("common/Exercice.class.php");
|
||||
require_once("common/Member.class.php");
|
||||
|
|
@ -26,25 +26,6 @@ if (is_file($VAR["misc_dir"]."/shared/challenge_started"))
|
|||
$template->assign("END", $VAR['end_challenge']);
|
||||
}
|
||||
|
||||
function pipe_backend_scheduler($instruct)
|
||||
{
|
||||
global $VAR;
|
||||
|
||||
$socket = socket_create(AF_UNIX, SOCK_STREAM, 0);
|
||||
if (is_writable($VAR["scheduler_socket"]) && socket_connect($socket, $VAR["scheduler_socket"]))
|
||||
{
|
||||
socket_write($socket, $instruct."\r\n") or die(socket_strerror(socket_last_error()));
|
||||
sleep(1);
|
||||
socket_shutdown($socket);
|
||||
socket_close($socket);
|
||||
}
|
||||
else if(defined("DEBUG") && DEBUG)
|
||||
{
|
||||
print("Socket '".$VAR["scheduler_socket"]."' is not writable by ".$_SERVER["USER"]." user!");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($VAR['misc_dir']))
|
||||
$template->assign("MISC_DIR", $VAR['misc_dir']);
|
||||
if (!empty($LANG))
|
||||
|
|
|
|||
Reference in a new issue