From: Jeremy Laine Date: Fri, 21 Jul 2006 21:07:07 +0000 (+0000) Subject: add class for facilitating scripts X-Git-Url: http://git.polytechnique.org/?p=diogenes.git;a=commitdiff_plain;h=107d742e8e0e334f1196659fd2e18b707173b950 add class for facilitating scripts --- diff --git a/include/diogenes.script.inc.php b/include/diogenes.script.inc.php new file mode 100644 index 0000000..08afa4d --- /dev/null +++ b/include/diogenes.script.inc.php @@ -0,0 +1,60 @@ +alias = $alias; + $this->login = $login; + $this->barrel = new Diogenes_Barrel($alias); + if (!$this->barrel->alias) { + $this->kill("unknown barrel requested : $alias"); + } + } + + function kill($msg) + { + echo "KILL: $msg\n"; + exit(1); + } + + function info($msg) + { + echo "INFO: $msg\n"; + } + + function getRcs() + { + global $globals; + return new $globals->rcs($this,$this->alias,$this->login); + } + + function log($action, $data="") + { + echo "LOG: $action $data\n"; + } +} + +?>