diff options
author | neoraider <devnull@localhost> | 2006-12-09 02:18:00 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-12-09 02:18:00 +0100 |
commit | 7be63518bdb86fb747dda20918ef6eab3d30e40c (patch) | |
tree | e9239af6d9efa6d7a2129adb71ca77fb25a0f59d /code/pages.inc.php | |
parent | fa39bfd963d7d05335d968b0efdfd9bb9a40f132 (diff) | |
download | neon-7be63518bdb86fb747dda20918ef6eab3d30e40c.tar neon-7be63518bdb86fb747dda20918ef6eab3d30e40c.zip |
?bersetzung vereinfacht; alle Seiten ?bersetzt
Diffstat (limited to 'code/pages.inc.php')
-rw-r--r-- | code/pages.inc.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/code/pages.inc.php b/code/pages.inc.php index e3af67a..549e24c 100644 --- a/code/pages.inc.php +++ b/code/pages.inc.php @@ -1,5 +1,5 @@ <?PHP - Uses('user', 'templates'); + Uses('user', 'templates', 'subst'); class Pages { @@ -9,11 +9,11 @@ function Get($page, $type) { if(!$this->Exists($page, $type)) return array('title' => $page, - 'content' => ErrorMessage('PageNotFound', array('page' => $page))); + 'content' => Subst('<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>')); if(!$this->HasReadAccess($page, $type)) return array('title' => $page, - 'content' => ErrorMessage('Forbidden', array('page' => $page))); + 'content' => Subst('<span class="error">{{The page \'' . $page . '\' is protected.}}</span>')); $pagedata = $this->GetPageData($page, $type); @@ -22,17 +22,19 @@ $data['_page'] = $page; $data['_type'] = $type; - return $GLOBALS['templates'][$pagedata['template']]->GetPage($data); + $ret = $GLOBALS['templates'][$pagedata['template']]->GetPage($data); + + return array('title' => Subst($ret['title']), 'content' => Subst($ret['content'])); } function GetEditor($page, $type, $backlink) { if(!$this->Exists($page, $type)) return array('title' => $page, - 'content' => ErrorMessage('PageNotFound', array('page' => $page))); + 'content' => Subst('<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>')); if(!$this->HasWriteAccess($page, $type)) return array('title' => $page, - 'content' => ErrorMessage('Forbidden', array('page' => $page))); + 'content' => Subst('<span class="error">{{The page \'' . $page . '\' is protected.}}</span>')); $pagedata = $this->GetPageData($page, $type); @@ -41,7 +43,9 @@ $data['_type'] = $type; $data['_backlink'] = $backlink; - return $GLOBALS['templates'][$pagedata['template']]->GetEditor($data); + $ret = $GLOBALS['templates'][$pagedata['template']]->GetEditor($data); + + return array('title' => Subst($ret['title']), 'content' => Subst($ret['content'])); } function Exists($page, $type) { |