X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fbanana%2Fhooks.inc.php;h=9d42694e02a0ff1448e6924d1b126402306a830d;hb=de201e9f56bebbebf78f30aaae7739dbe7522db0;hp=69c5c37a63fade4dc730f369057f4cc39d03abff;hpb=4478f95efc07709dbe0a4415e979ff0347651cf8;p=platal.git diff --git a/include/banana/hooks.inc.php b/include/banana/hooks.inc.php index 69c5c37..9d42694 100644 --- a/include/banana/hooks.inc.php +++ b/include/banana/hooks.inc.php @@ -1,6 +1,6 @@ id()); if ($res->numRows()) { + // User wants his xface to be showed, fallback to default handler return false; } } @@ -209,7 +215,7 @@ function make_Organization() global $globals; $perms = S::v('perms'); $group = $globals->asso('nom'); - if (S::has_perms()) { + if (S::admin()) { return "Administrateur de Polytechnique.org"; } else if ($group && $perms->hasFlag('groupadmin')) { return "Animateur de $group"; @@ -314,7 +320,9 @@ class BananaHandler { } - public function process() + public function success() { } + + public function process(&$success) { return PlWizard::CURRENT_PAGE; } @@ -322,7 +330,8 @@ class BananaHandler function run_banana(&$page, $class, array $args) { - $banana = new $class(S::user(), $args); + $user = S::user(); + $banana = new $class($user, $args); $page->assign('banana', $banana->run()); $page->addCssInline($banana->css()); $page->addCssLink('banana.css');