summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-09-19 02:52:05 +0200
committerneoraider <devnull@localhost>2006-09-19 02:52:05 +0200
commitebf846c0a4c5d415b1e461ddbf8c5bdbb297d4e2 (patch)
tree178e0e825c9c96deea9949be76c1adacfc295843 /core
parent13edf825d1753e085c22909a9d3ad893303f78bc (diff)
downloadneon-ebf846c0a4c5d415b1e461ddbf8c5bdbb297d4e2.tar
neon-ebf846c0a4c5d415b1e461ddbf8c5bdbb297d4e2.zip
Einige weitere Anpassungen an die neue Modulverwaltung vorgenommen.
Diffstat (limited to 'core')
-rw-r--r--core/modules.inc.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/core/modules.inc.php b/core/modules.inc.php
index c1ebc80..395b8ad 100644
--- a/core/modules.inc.php
+++ b/core/modules.inc.php
@@ -5,7 +5,7 @@
function Uses() {
foreach(func_get_args() as $file) {
if(isset($GLOBALS['modules']->code[$file]))
- require_once($GLOBALS['modules']->code[$file]['path'] . 'code/' . $file . '.inc.php');
+ require_once($GLOBALS['modules']->GetCodePath($file));
else
die('Fatal: a required code file was not found.');
}
@@ -123,6 +123,19 @@
return $module;
}
+ function GetCodePath($name) {
+ return $this->code[$name]['path'] . 'code/' . $name . '.inc.php';
+ }
+
+ function GetPagePath($name, $type) {
+ return $this->pages[$name . '.' . $type]['path'] . 'pages/' .
+ strtr($type, array('c' => 'content', 'e' => 'editor', 'n' => 'nav')) . '/' . $name . '.xml';
+ }
+
+ function GetTemplatePath($name) {
+ return $this->templates[$name]['path'] . 'templates/' . $name . '.inc.php';
+ }
+
function Exists($name) {
return array_key_exists($name, $this->modules);
}