From e67b44363acd2083d9b0ec4fabaea3deec87afc5 Mon Sep 17 00:00:00 2001 From: Vincent Zanotti Date: Sun, 12 Oct 2008 16:13:11 +0200 Subject: [PATCH] Converts the Platal module to hruid (mainly two FIXME). Signed-off-by: Vincent Zanotti --- modules/platal.php | 16 ++++++++++++++++ templates/platal/filrss.tpl | 4 ++-- templates/platal/preferences.tpl | 2 +- templates/platal/webredirect.tpl | 12 +++++------- 4 files changed, 24 insertions(+), 10 deletions(-) diff --git a/modules/platal.php b/modules/platal.php index a1699d5..951803b 100644 --- a/modules/platal.php +++ b/modules/platal.php @@ -137,6 +137,14 @@ class PlatalModule extends PLModule if (Post::has('rss')) { $this->__set_rss_state(Post::b('rss')); } + + # FIXME: this code is not multi-domain compatible. We should decide how + # carva will extend to users not in the main domain. + $res = XDB::query("SELECT alias + FROM aliases + WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", + S::user()->id()); + $page->assign('bestalias', $res->fetchOneCell()); } function handler_webredir(&$page) @@ -169,6 +177,14 @@ class PlatalModule extends PLModule WHERE user_id = {?}', S::v('uid')); $page->assign('carva', $res->fetchOneCell()); + + # FIXME: this code is not multi-domain compatible. We should decide how + # carva will extend to users not in the main domain. + $res = XDB::query("SELECT alias + FROM aliases + WHERE id = {?} AND FIND_IN_SET('bestalias', flags)", + S::user()->id()); + $page->assign('bestalias', $res->fetchOneCell()); } function handler_prefs_rss(&$page) diff --git a/templates/platal/filrss.tpl b/templates/platal/filrss.tpl index de808fa..26cd81c 100644 --- a/templates/platal/filrss.tpl +++ b/templates/platal/filrss.tpl @@ -52,11 +52,11 @@ En voici les adresses :

diff --git a/templates/platal/preferences.tpl b/templates/platal/preferences.tpl index 12f9062..ecaa4cf 100644 --- a/templates/platal/preferences.tpl +++ b/templates/platal/preferences.tpl @@ -49,7 +49,7 @@

Ma redirection de page WEB

Tu peux configurer tes redirections WEB - http://www.carva.org/{$smarty.session.bestalias}. + http://www.carva.org/{$bestalias}.
diff --git a/templates/platal/webredirect.tpl b/templates/platal/webredirect.tpl index 6d3da9c..fa9b58a 100644 --- a/templates/platal/webredirect.tpl +++ b/templates/platal/webredirect.tpl @@ -27,8 +27,8 @@

Dans la lignée du service de redirection d'emails de {#globals.core.sitename#}, il est possible de faire pointer - les adresses http://www.carva.org/{$smarty.session.bestalias} - et http://www.carva.org/{$smarty.session.forlife} + les adresses http://www.carva.org/{$bestalias} + et http://www.carva.org/{$smarty.session.hruid} vers la page WEB de ton choix. Pour de plus amples détails, consulte cette page

@@ -47,11 +47,9 @@

{if $carva} Actuellement, les adresses - - http://www.carva.org/{$smarty.session.bestalias} - et - http://www.carva.org/{$smarty.session.forlife} - sont redirigées sur http://{$carva} + http://www.carva.org/{$bestalias} et + http://www.carva.org/{$smarty.session.hruid} + sont redirigées sur http://{$carva} {else} La redirection n'est pas utilisée ... {/if} -- 2.1.4