Bug/Wish:
+ * Core:
+ - #558: Propose a valid URL when getting a 404 error -FRU
+
* Emails:
- #512: Can attach a file -FRU
return null;
}
- function list_hooks()
+ function near_hook()
{
$hooks = array();
foreach ($this->__hooks as $hook=>$handler) {
foreach ($p as $k) {
if (!$ended) {
$key = $this->find_nearest_key($k, $place);
+ } else {
+ $key = $k;
}
- if ($ended || $key == "#final#") {
+ if ($key == "#final#") {
$key = $k;
$ended = true;
+ if (!array_key_exists($link, $this->__hooks)) {
+ return null;
+ }
}
if (!is_null($key)) {
if (!empty($link)) {
break;
case PL_NOT_FOUND:
- $page->assign('near', $this->list_hooks());
$this->__mods['core']->handler_404($page);
break;
}
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)
return $k;
}
- function list_hooks()
+ function near_hook()
{
- $link = parent::list_hooks();
+ $link = parent::near_hook();
if (strpos($link, '%grp') !== false) {
global $globals;
return str_replace('%grp', $globals->asso('diminutif'), $link);
function handler_404(&$page)
{
+ global $platal;
header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+ $page->assign('near', $platal->near_hook());
$page->changeTpl('404.tpl');
}