From 273933839f85feb8867ebc22c1b4767fe41f0dc2 Mon Sep 17 00:00:00 2001 From: Simon DELAGE Date: Fri, 10 Oct 2014 18:20:26 +0200 Subject: [PATCH] Made correction based on user problem A user had a strange problem: plugin would not create the template and there was some kind of infinite loop on login but he found a simple fix that doesn't seem to have any side effect --- action.php | 4 ++-- plugin.info.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/action.php b/action.php index daca4e9..e716d9e 100644 --- a/action.php +++ b/action.php @@ -76,7 +76,7 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin{ // Announce private namespace was created msg($this->getLang('createdprivatens').' ('.$this->private_page.')', 0); // Note that we created private page - $created['private'] = true; + $created['private'] = page_exists($this->private_page); } // Public page? // If public page doesn't exists, create it (from template) @@ -90,7 +90,7 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin{ // Announce plubic page was created msg($this->getLang('createdpublicpage').' ('.$this->public_page.')', 0); // Note that we created public page - $created['public'] = true; + $created['public'] = page_exists($this->public_page); } // List IDs that can match wiki start $wikistart = array($conf['start'], ':'.$conf['start']); diff --git a/plugin.info.txt b/plugin.info.txt index 56e16ea..99ea45a 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -1,7 +1,7 @@ base userhomepage author Simon Delage email simon.geekitude@gmail.com -date 2014-09-30 +date 2014-10-10 name User Homepage desc Automatically create user's private namespace and/or public page and redirects users to private namespace on login. url https://www.dokuwiki.org/plugin:userhomepage