X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fbanana%2Fhooks.inc.php;h=d8cd9f1ea30fd5e0fee9f4cea20492daa5499a80;hb=e0ee31204dbb8e43870716190e4549257416fcb8;hp=f0a23620e65e071e3fa687cbcb421de440c1d82e;hpb=dd9bac8f7903e9924525ad8db3e38650ff5ad1b6;p=platal.git diff --git a/include/banana/hooks.inc.php b/include/banana/hooks.inc.php index f0a2362..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; } } @@ -311,7 +310,7 @@ class BananaHandler return 'banana/index.tpl'; } - public function prepare(PlatalPage &$page, $id) + public function prepare(PlPage &$page, $id) { } @@ -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');