X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fbanana%2Fhooks.inc.php;h=d8cd9f1ea30fd5e0fee9f4cea20492daa5499a80;hb=8230e9f8eff954fb1103c8bdcf0d22557d419ae7;hp=987de1369c2ad4629402d65a138c17bfb15c7a67;hpb=04334c61ffd1e63616503bf52e90174adaa3cc86;p=platal.git diff --git a/include/banana/hooks.inc.php b/include/banana/hooks.inc.php index 987de13..d8cd9f1 100644 --- a/include/banana/hooks.inc.php +++ b/include/banana/hooks.inc.php @@ -1,6 +1,6 @@ addJsLink("$src.js"); + Platal::page()->addJsLink("$src.js"); return ' '; } @@ -290,12 +289,12 @@ class PlatalBananaPage extends BananaPage protected function prepare() { $tpl = parent::prepare(); - global $wiz, $page; - $wiz = new PlWizard('Banana', 'core/plwizard.tpl', true, false); + global $wiz; + $wiz = new PlWizard('Banana', PlPage::getCoreTpl('plwizard.tpl'), true, false); foreach ($this->pages as $name=>&$mpage) { $wiz->addPage($this->handler, $mpage['text'], $name); } - $wiz->apply($page, $this->base, $this->page); + $wiz->apply(Platal::page(), $this->base, $this->page); return $tpl; } } @@ -323,7 +322,7 @@ class BananaHandler function run_banana(&$page, $class, array $args) { - $banana = new $class(S::v('forlife'), $args); + $banana = new $class(S::user(), $args); $page->assign('banana', $banana->run()); $page->addCssInline($banana->css()); $page->addCssLink('banana.css');