summaryrefslogtreecommitdiff
path: root/utils/pages.php
diff options
context:
space:
mode:
Diffstat (limited to 'utils/pages.php')
-rw-r--r--utils/pages.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/pages.php b/utils/pages.php
index 60156b8..0ab52a8 100644
--- a/utils/pages.php
+++ b/utils/pages.php
@@ -23,12 +23,15 @@ class Page {
$str = Markdown($this->content);
- if(preg_match_all("/\[\[([a-zA-Z0-9_]+)\]\]/", $str, $res)) {
+ if(preg_match_all("/\[\[([\?,a-zA-Z0-9_]+)\]\]/", $str, $res)) {
$modulecodes = array_unique($res[1]);
foreach($modulecodes as $modulecode) {
- if($modules[$modulecode]) {
- $modulestr = $modules[$modulecode]->run($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>";
}
@@ -98,4 +101,4 @@ class Pages {
}
}
-?> \ No newline at end of file
+?>