diff --git a/src/SLiMSTarsius/Parser.php b/src/SLiMSTarsius/Parser.php index b80f20c..b686451 100644 --- a/src/SLiMSTarsius/Parser.php +++ b/src/SLiMSTarsius/Parser.php @@ -32,7 +32,7 @@ public function compile() foreach ($this->arguments as $id => $value) { if ($id > 1) { - $this->arguments[$map[2]] = $value; + $this->arguments[$map[2]][] = $value; } else { diff --git a/src/SLiMSTarsius/Plugin.php b/src/SLiMSTarsius/Plugin.php index d867f9e..06ac974 100644 --- a/src/SLiMSTarsius/Plugin.php +++ b/src/SLiMSTarsius/Plugin.php @@ -33,11 +33,13 @@ public function create($dest, $pluginName) $destinantion = ($this->env === 'development_src')?$dest.'/tests/plugins/':$dest.'/plugins/'; $template = ($this->env === 'development_src')?$dest.'/tests/template/':$dest.'/vendor/drajat/slims-tarsius/tests/template/'; - if (count(explode(' ', trim($pluginName))) > 1) + if (count($pluginName) > 1) { - die('Hanya bisa membuat 1 plugin dalam 1 perintah!'); + die("Hanya bisa membuat 1 plugin dalam 1 perintah!\n"); } + $pluginName = $pluginName[0]; + // set message echo 'Membuat plugin '.$pluginName."\n"; // get information and make plugin diff --git a/src/SLiMSTarsius/Tarmagick.php b/src/SLiMSTarsius/Tarmagick.php index 98b9308..f62cf07 100644 --- a/src/SLiMSTarsius/Tarmagick.php +++ b/src/SLiMSTarsius/Tarmagick.php @@ -39,8 +39,7 @@ public static function getEnvironment($dir) { if (file_exists($dir.'/sysconfig.inc.php')) { - include_once $dir.'/sysconfig.inc.php'; - self::$environment = ENVIRONMENT; + self::$environment = 'development'; } else { diff --git a/tests/plugins/buku_induk/buku_induk.plugin.php b/tests/plugins/buku_induk/buku_induk.plugin.php new file mode 100644 index 0000000..2eeda37 --- /dev/null +++ b/tests/plugins/buku_induk/buku_induk.plugin.php @@ -0,0 +1,15 @@ +registerMenu('bibliography', 'Buku Induk', __DIR__ . '/index.php'); diff --git a/tests/plugins/buku_induk/index.php b/tests/plugins/buku_induk/index.php new file mode 100644 index 0000000..81e77b2 --- /dev/null +++ b/tests/plugins/buku_induk/index.php @@ -0,0 +1,60 @@ +' . __('You are not authorized to view this section') . ''); +} + +function httpQuery($query = []) +{ + return http_build_query(array_unique(array_merge($_GET, $query))); +} + +$page_title = 'Buku Induk'; + +/* Action Area */ + +/* End Action Area */ +?> + + +' . __('You are not authorized to view this section') . ''); } +function httpQuery($query = []) +{ + return http_build_query(array_unique(array_merge($_GET, $query))); +} + $page_title = '{label_menu}'; /* Action Area */ @@ -38,7 +43,7 @@ $page_title = '{label_menu}';
- Daftar + Daftar