diff options
Diffstat (limited to 'code/pages.inc.php')
-rw-r--r-- | code/pages.inc.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/code/pages.inc.php b/code/pages.inc.php index 6f0e383..290b4bd 100644 --- a/code/pages.inc.php +++ b/code/pages.inc.php @@ -1,9 +1,6 @@ <?PHP - require_once('code/db.inc.php'); - require_once('code/user.inc.php'); - require_once('code/templates.inc.php'); - require_once('code/xmlparser.inc.php'); - require_once('code/modules.inc.php'); + Uses('user', 'templates'); + class Pages { var $pages = array( @@ -117,9 +114,8 @@ 'access' => '', 'data' => $data); } else { - $filename = $GLOBALS['modules']->pages[$page . '.' . $type]; - if(!$filename) $filename = 'pages/' . strtr($type, array('c' => 'content', 'e' => 'editor', 'n' => 'nav')) - . '/' . $page . '.xml'; + $filename = $GLOBALS['modules']->pages[$page . '.' . $type]['path'] . 'pages/' + . strtr($type, array('c' => 'content', 'e' => 'editor', 'n' => 'nav')) . '/' . $page . '.xml'; $xmldata = $GLOBALS['xmlparser']->ParseFile($filename); if(!$xmldata) return null; |