From 11e24bec389d2a7ed3df63ba4d8efc62fa733b50 Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Wed, 5 Jul 2006 22:37:04 +0000 Subject: [PATCH] keep arguments under the hood. small uri's adjustments git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@379 839d8a87-29fc-0310-9880-83ba4fa771e5 --- classes/Platal.php | 9 ++++++--- templates/marketing/public.tpl | 2 +- templates/marketing/volontaire.tpl | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/classes/Platal.php b/classes/Platal.php index 767a11a..d87b9f7 100644 --- a/classes/Platal.php +++ b/classes/Platal.php @@ -30,7 +30,7 @@ class Platal var $__hooks; var $path; - var $auth; + var $args; function Platal() { @@ -74,8 +74,10 @@ class Platal return PL_NOT_FOUND; } - $args = explode('/', substr($this->path, strlen($p))); - $args[0] = &$page; + $args = explode('/', substr($this->path, strlen($p))); + $args[0] = $p; + $this->argv = $args; + $args[0] = &$page; if ($hook['auth'] > Session::get('auth', AUTH_PUBLIC)) { $_SESSION['session']->doAuth($page); @@ -102,6 +104,7 @@ class Platal $this->__mods['core']->handler_404($page); break; } + $page->assign_by_ref('platal', $this); $page->run(); } } diff --git a/templates/marketing/public.tpl b/templates/marketing/public.tpl index 062c090..101c1a8 100644 --- a/templates/marketing/public.tpl +++ b/templates/marketing/public.tpl @@ -73,7 +73,7 @@ peut sans aucun doute l'aider {$nom} inscrit, nous t'enverrons un email pour te prévenir que son inscription a réussi.

-
+ diff --git a/templates/marketing/volontaire.tpl b/templates/marketing/volontaire.tpl index f9f9958..fae35fc 100644 --- a/templates/marketing/volontaire.tpl +++ b/templates/marketing/volontaire.tpl @@ -34,7 +34,7 @@ Choix de la promo : {if $addr} -

[Marketing promo pour la promo {$smarty.get.promo}]

+

[Marketing promo pour la promo {$platal->argv[1]}]

{if $addr->total()}

Marketing volontaire

-- 2.1.4
Nom :{$nom}
Prénom :{$prenom}