asso()) { if ($p = strpos($this->path, '/')) { $this->ns = substr($this->path, 0, $p).'/'; $this->path = '%grp'.substr($this->path, $p); } else { $this->ns = $this->path.'/'; $this->path = '%grp'; } } } protected function find_nearest_key($key, array &$array) { global $globals; if (in_array('%grp', array_keys($array)) && $key == $globals->asso('diminutif')) { return '%grp'; } return parent::find_nearest_key($key, $array); } public function near_hook() { global $globals; $link = str_replace('%grp', $globals->asso('diminutif'), parent::near_hook()); if ($link != $this->path) { return $link; } return null; } protected function find_hook() { $ans = parent::find_hook(); $this->https = false; if ($ans && $this->ns) { $this->path = $this->ns . substr($this->path, 5); $this->argv[0] = $this->ns . substr($this->argv[0], 5); } return $ans; } public function force_login(&$page) { http_redirect(S::v('loginX')); } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>