From: x2000habouzit Date: Wed, 5 Jul 2006 06:50:51 +0000 (+0000) Subject: fix a bug in the uri exploder. X-Git-Tag: xorg/0.9.11~517 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=0025a0c5b80edf65ca41afa3db296fe59a2497ae;p=platal.git fix a bug in the uri exploder. use more semantic uri's in marketing (promo) fix some typos don't use gassign, it's broken in our context. git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@376 839d8a87-29fc-0310-9880-83ba4fa771e5 --- diff --git a/classes/Platal.php b/classes/Platal.php index fe55885..cf888cc 100644 --- a/classes/Platal.php +++ b/classes/Platal.php @@ -34,7 +34,7 @@ class Platal function Platal() { - $this->path = Get::_get('p', null); + $this->path = trim(Get::_get('p', null), '/'); $this->__mods = array(); $this->__hooks = array(); @@ -74,8 +74,12 @@ class Platal return PL_NOT_FOUND; } - $args = array_merge(array(&$page), - explode('/', substr($this->path, strlen($p) + 1))); + $args = explode('/', substr($this->path, strlen($p) + 1)); + if ($args[0] != '') { + array_unshift($args, &$page); + } else { + $args = array(&$page); + } if ($hook['auth'] > Session::get('auth', AUTH_PUBLIC)) { $_SESSION['session']->doAuth($page); diff --git a/htdocs/images/24/first-page.png b/htdocs/images/24/first-page.png new file mode 100644 index 0000000..a253e35 Binary files /dev/null and b/htdocs/images/24/first-page.png differ diff --git a/htdocs/images/24/last-page.png b/htdocs/images/24/last-page.png new file mode 100644 index 0000000..f346c45 Binary files /dev/null and b/htdocs/images/24/last-page.png differ diff --git a/htdocs/images/24/next.png b/htdocs/images/24/next.png new file mode 100644 index 0000000..31256ab Binary files /dev/null and b/htdocs/images/24/next.png differ diff --git a/htdocs/images/24/previous.png b/htdocs/images/24/previous.png new file mode 100644 index 0000000..eebfcd7 Binary files /dev/null and b/htdocs/images/24/previous.png differ diff --git a/modules/marketing.php b/modules/marketing.php index 8fbcebc..b26040e 100644 --- a/modules/marketing.php +++ b/modules/marketing.php @@ -96,10 +96,10 @@ class MarketingModule extends PLModule if (list($nom, $prenom, $promo, $matricule) = $res->fetchOneRow()) { require_once('register.inc.php'); $matricule_X = get_X_mat($matricule); - $page->gassign('nom'); - $page->gassign('prenom'); - $page->gassign('promo'); - $page->gassign('matricule'); + $page->assign('nom', $nom); + $page->assign('prenom', $prenom); + $page->assign('promo', $promo); + $page->assign('matricule', $matricule); $page->assign('matricule_X',$matricule_X); } else { $page->kill('uid invalide'); @@ -156,8 +156,8 @@ class MarketingModule extends PLModule $res = $globals->xdb->query("SELECT date, relance FROM register_pending WHERE uid = {?}", $uid); if (list($pending, $relance) = $res->fetchOneCell()) { - $page->gassign('pending'); - $page->gassign('relance'); + $page->assign('pending', $pending); + $page->assign('relance', $relance); } return PL_OK; @@ -169,8 +169,8 @@ class MarketingModule extends PLModule $page->changeTpl('marketing/promo.tpl'); - if (!$promo) { - $promo = Env::has('promo') ? Env::getInt('promo') : Session::getInt('promo'); + if (is_null($promo)) { + $promo = Session::getInt('promo'); } $page->assign('promo', $promo); diff --git a/templates/marketing/private.tpl b/templates/marketing/private.tpl index 0549d73..11fa083 100644 --- a/templates/marketing/private.tpl +++ b/templates/marketing/private.tpl @@ -96,7 +96,7 @@ sa derni {if $rel_to} -
+ diff --git a/templates/marketing/promo.tpl b/templates/marketing/promo.tpl index 66c4b50..d0d35fc 100644 --- a/templates/marketing/promo.tpl +++ b/templates/marketing/promo.tpl @@ -20,50 +20,19 @@ {* *} {**************************************************************************} -
Edition du mail de relance
- - - - - - - -
- -
- - -
- -
-
-
- - -
-
-
-
-
- Promotion : - -
-
-
-
-
- - -
-
-
-
-
- - -
-
-
+
+
+ [<<] + [<] + +   + Promo: +   + + [>] + [>>] +
+

@@ -73,6 +42,8 @@ +
+