summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/plugins/extension/helper/gui.php10
-rw-r--r--lib/plugins/extension/helper/list.php8
2 files changed, 15 insertions, 3 deletions
diff --git a/lib/plugins/extension/helper/gui.php b/lib/plugins/extension/helper/gui.php
index 953d50fa6..3a0f0c589 100644
--- a/lib/plugins/extension/helper/gui.php
+++ b/lib/plugins/extension/helper/gui.php
@@ -106,9 +106,13 @@ class helper_plugin_extension_gui extends DokuWiki_Plugin {
/* @var helper_plugin_extension_list $list */
$list = $this->loadHelper('extension_list');
$list->start_form();
- foreach($result as $name) {
- $extension->setExtension($name);
- $list->add_row($extension, $extension->getID() == $this->infoFor);
+ if($result){
+ foreach($result as $name) {
+ $extension->setExtension($name);
+ $list->add_row($extension, $extension->getID() == $this->infoFor);
+ }
+ } else {
+ $list->nothing_found();
}
$list->end_form();
$list->render();
diff --git a/lib/plugins/extension/helper/list.php b/lib/plugins/extension/helper/list.php
index ba3681ce4..8cc303fbe 100644
--- a/lib/plugins/extension/helper/list.php
+++ b/lib/plugins/extension/helper/list.php
@@ -89,6 +89,14 @@ class helper_plugin_extension_list extends DokuWiki_Plugin {
}
/**
+ * Show message when no results are found
+ */
+ function nothing_found() {
+ global $lang;
+ $this->form .= '<li class="notfound">'.$lang['nothingfound'].'</li>';
+ }
+
+ /**
* Print the form
*/
function render() {