summaryrefslogtreecommitdiff
path: root/utils/modules/pages.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/modules/pages.php')
-rw-r--r--utils/modules/pages.php14
1 files changed, 3 insertions, 11 deletions
diff --git a/utils/modules/pages.php b/utils/modules/pages.php
index 99c8142..d3ee0aa 100644
--- a/utils/modules/pages.php
+++ b/utils/modules/pages.php
@@ -1,6 +1,8 @@
<?php
/* -*- Mode: php; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+global $UTIL_DIR;
+
include_once($UTIL_DIR . "/convert.php");
include_once($UTIL_DIR . "/markdown.php");
include_once($UTIL_DIR . "/modules.php");
@@ -26,17 +28,7 @@ class Page {
$modulecodes = array_unique($res[1]);
foreach($modulecodes as $modulecode) {
- $m = explode("?", $modulecode);
- $module = $m[0];
- $params = explode(",", $m[1]);
- if($modules[$module]) {
- $modulestr = $modules[$module]->run($params);
- } else {
- $modulestr = "<p><strong>CMS ERROR: Could not find module: [[" . $modulecode . "]]</strong></p>";
- }
-
- $str = str_replace("[[" . $modulecode . "]]", $modulestr, $str);
-
+ $str = str_replace("[[" . $modulecode . "]]", runModule($modulecode), $str);
}
}