summaryrefslogtreecommitdiffstats
path: root/code/pages.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'code/pages.inc.php')
-rw-r--r--code/pages.inc.php37
1 files changed, 4 insertions, 33 deletions
diff --git a/code/pages.inc.php b/code/pages.inc.php
index 290b4bd..2024303 100644
--- a/code/pages.inc.php
+++ b/code/pages.inc.php
@@ -3,31 +3,8 @@
class Pages {
- var $pages = array(
- 'Login.c' => null,
- 'Logout.c' => null,
- 'Modules.c' => null,
- 'Modules:Config.c' => null,
- 'Modules:Enable.c' => null,
- 'Pages.c' => null,
- 'Pages:Copy.c' => null,
- 'Pages:Delete.c' => null,
- 'Pages:Edit.c' => null,
- 'Pages:Handle.c' => null,
- 'Pages:New.c' => null,
- 'Pages:Privs.c' => null,
- 'Pages:Rename.c' => null,
- 'Users.c' => null,
- 'Users:Delete.c' => null,
- 'Users:Group.c' => null,
- 'Users:Handle.c' => null,
- 'Users:New.c' => null,
- 'Users:Password.c' => null,
- 'Users:Rename.c' => null,
- 'Login.n' => null,
- 'default.e' => null,
- 'phpexec.e' => null
- );
+ var $pages = array();
+
function Get($page, $type, $extra = null) {
if(!$this->Exists($page, $type))
@@ -67,9 +44,6 @@
}
function Exists($page, $type) {
- if(array_key_exists($page . '.' . $type, $this->pages))
- return true;
-
if(array_key_exists($page . '.' . $type, $GLOBALS['modules']->pages))
return true;
@@ -103,7 +77,7 @@
function GetPageData($page, $type) {
if(!$this->Exists($page, $type)) return null;
- if(!$this->pages[$page . '.' . $type]) {
+ if(!array_key_exists($page . '.' . $type, $this->pages)) {
$res = $GLOBALS['db']->Execute('SELECT template, data FROM pages WHERE name = ? AND type = ?', array($page, $type));
if($res->RecordCount()) {
@@ -114,10 +88,7 @@
'access' => '', 'data' => $data);
}
else {
- $filename = $GLOBALS['modules']->pages[$page . '.' . $type]['path'] . 'pages/'
- . strtr($type, array('c' => 'content', 'e' => 'editor', 'n' => 'nav')) . '/' . $page . '.xml';
-
- $xmldata = $GLOBALS['xmlparser']->ParseFile($filename);
+ $xmldata = $GLOBALS['xmlparser']->ParseFile($GLOBALS['modules']->GetPagePath($page, $type));
if(!$xmldata) return null;
$info = $GLOBALS['xmlparser']->FindTag($xmldata, 'info');