From bd2f39283f10609f7b75d2ad46f71c849ba3f463 Mon Sep 17 00:00:00 2001 From: x2003bruneau Date: Wed, 28 Feb 2007 16:48:47 +0000 Subject: [PATCH] Fix NL subscription on registration git-svn-id: svn+ssh://murphy/home/svn/platal/branches/platal-0.9.13@1532 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/profile.php | 2 +- plugins/block.tidy.php | 41 ++++++++++++++++++----------------------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/modules/profile.php b/modules/profile.php index efcd84d..dd566c3 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -279,7 +279,7 @@ class ProfileModule extends PLModule } if (Post::v('add_to_nl')) { require_once 'newsletter.inc.php'; - subscribe_nl(); + NewsLetter::subscribe(); } if (Post::v('add_to_promo')) { $r = XDB::query('SELECT id FROM groupex.asso WHERE diminutif = {?}', diff --git a/plugins/block.tidy.php b/plugins/block.tidy.php index 06254aa..5f537af 100644 --- a/plugins/block.tidy.php +++ b/plugins/block.tidy.php @@ -19,28 +19,21 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * ***************************************************************************/ -$tidy_on = Array( - 'drop-empty-paras', - 'drop-font-tags', - 'drop-proprietary-attributes', - 'hide-comments', - 'logical-emphasis', - 'output-xhtml', - 'replace-color', - 'show-body-only' -); -$tidy_off = Array( - 'clean', - 'join-styles', - 'join-classes' -); - -foreach($tidy_on as $opt) { tidy_setopt($opt, true); } -foreach($tidy_off as $opt) { tidy_setopt($opt, false); } -tidy_setopt('alt-text', '[ inserted by TIDY ]'); -tidy_setopt('wrap', '120'); -tidy_set_encoding('latin0'); -unset($tidy_o, $tydy_off); +global $tidy_config; +$tidy_config = array( + 'drop-empty-paras' => true, + 'drop-font-tags' => true, + 'drop-proprietary-attributes' => true, + 'hide-comments' => true, + 'logical-emphasis' => true, + 'output-xhtml' => true, + 'replace-color' => true, + 'show-body-only' => true, + 'clean' => false, + 'join-styles' => false, + 'join-classes' => false, + 'alt-text' => '[ inserted by TIDY ]', + 'wrap' => '120'); /* * Smarty plugin @@ -53,7 +46,9 @@ unset($tidy_o, $tydy_off); */ function smarty_block_tidy($params, $content, &$smarty) { - return tidy_repair_string($content); + global $tidy_config; + return tidy_repair_string($content, $tidy_config, 'latin0'); } +// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?> -- 2.1.4