projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Better email filter for user subscription
[platal.git]
/
classes
/
platalpage.php
diff --git
a/classes/platalpage.php
b/classes/platalpage.php
index
68a001d
..
ee56a9d
100644
(file)
--- a/
classes/platalpage.php
+++ b/
classes/platalpage.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
6
Polytechnique.org *
+ * Copyright (C) 2003-200
7
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-55,6
+55,7
@@
class PlatalPage extends Smarty
$this->register_prefilter('at_to_globals');
$this->register_prefilter('trimwhitespace');
$this->register_prefilter('at_to_globals');
$this->register_prefilter('trimwhitespace');
+ $this->register_prefilter('form_force_encodings');
$this->addJsLink('xorg.js');
}
$this->addJsLink('xorg.js');
}
@@
-96,6
+97,7
@@
class PlatalPage extends Smarty
}
$this->register_outputfilter('hide_emails');
$this->addJsLink('wiki.js');
}
$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);
if (!$globals->debug) {
error_reporting(0);
@@
-104,7
+106,7
@@
class PlatalPage extends Smarty
}
if ($globals->debug & 1) {
}
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);
}
$this->assign('validate', true);
@@
-182,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)
// {{{ function setRssLink
function setRssLink($title, $path)
@@
-262,12
+274,24
@@
function trimwhitespace($source, &$smarty)
}
// }}}
}
// }}}
+// {{{
+
+function form_force_encodings($source, &$smarty)
+{
+ return preg_replace('/<form[^\w]/',
+ '\0 accept-charset="iso-8859-15 latin9 us-ascii ascii" ',
+ $source);
+}
+
+// }}}
// {{{ function hide_emails
function _hide_email($source)
{
$source = str_replace("\n", '', $source);
// {{{ function hide_emails
function _hide_email($source)
{
$source = str_replace("\n", '', $source);
- return '<script type="text/javascript">Nix.decode("' . addslashes(str_rot13($source)) . '");</script>';
+ return '<script type="text/javascript">//<![CDATA[' . "\n" .
+ 'Nix.decode("' . addslashes(str_rot13($source)) . '");' . "\n" .
+ '//]]></script>';
}
function hide_emails($source, &$smarty)
}
function hide_emails($source, &$smarty)