X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=classes%2Fplatalpage.php;h=ee56a9d17a91ff2788886bce34ae06f22b5e928d;hb=cbce77b738f8ac05f9469ef1a2be98db98723409;hp=b0f5d6a4357bcb5543954598c93bf4598fdb3778;hpb=162370e7f75c7f052e35623daa978ecf426f4654;p=platal.git diff --git a/classes/platalpage.php b/classes/platalpage.php index b0f5d6a..ee56a9d 100644 --- a/classes/platalpage.php +++ b/classes/platalpage.php @@ -1,6 +1,6 @@ register_prefilter('at_to_globals'); $this->register_prefilter('trimwhitespace'); + $this->register_prefilter('form_force_encodings'); $this->addJsLink('xorg.js'); } @@ -89,10 +90,14 @@ class PlatalPage extends Smarty case SIMPLE: $this->assign('simple', true); + case SKINNED: - $this->register_modifier('escape_html', 'escape_html'); - $this->default_modifiers = Array('@escape_html'); + $this->register_modifier('escape_html', 'escape_html'); + $this->default_modifiers = Array('@escape_html'); } + $this->register_outputfilter('hide_emails'); + $this->addJsLink('wiki.js'); + header("Accept-Charset: iso-8859-15, latin9, us-ascii, ascii"); if (!$globals->debug) { error_reporting(0); @@ -101,7 +106,7 @@ class PlatalPage extends Smarty } if ($globals->debug & 1) { - $this->assign('db_trace', XDB::trace_format($this, 'database-debug.tpl')); + $this->assign('db_trace', XDB::trace_format($this, 'skin/common.database-debug.tpl')); } $this->assign('validate', true); @@ -179,6 +184,16 @@ class PlatalPage extends Smarty } // }}} + // {{{ function addCssInline + + function addCssInline($css) + { + if (!empty($css)) { + $this->append('xorg_inline_css', $css); + } + } + + // }}} // {{{ function setRssLink function setRssLink($title, $path) @@ -259,6 +274,58 @@ function trimwhitespace($source, &$smarty) } // }}} +// {{{ + +function form_force_encodings($source, &$smarty) +{ + return preg_replace('///'; +} + +function hide_emails($source, &$smarty) +{ + //prevent email replacement in