X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fbanana%2Fhooks.inc.php;h=cd963045535512e7fb30250111dd01a93b211e4b;hb=fb813fb52d5ab65ca9a5b92b5cb9089523380d79;hp=d8cd9f1ea30fd5e0fee9f4cea20492daa5499a80;hpb=1f58ccb1e75eca08fbd04971d617ea372bc77b5a;p=platal.git diff --git a/include/banana/hooks.inc.php b/include/banana/hooks.inc.php index d8cd9f1..cd96304 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 +214,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 +319,9 @@ class BananaHandler { } - public function process() + public function success() { } + + public function process(&$success) { return PlWizard::CURRENT_PAGE; } @@ -322,7 +329,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');