diff --git a/action.php b/action.php index 3359b7c..bdebe81 100644 --- a/action.php +++ b/action.php @@ -49,10 +49,8 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin{ saveWikiText($id,$this->_template_private(),$lang['created']); unlock($id); // } - // Redirect to edit or show private namespace start page (if edit public page is not on) - if (!($this->getConf('edit_public_before_create'))) { - send_redirect(wl($id, array("do" => ($this->getConf('edit_before_create'))?"edit":"show"), false, "&")); - } + // redirect to edit home page + send_redirect(wl($id, array("do" => ($this->getConf('edit_before_create'))?"edit":"show"), false, "&")); } // If Translation plugin is active, determine if we're at wikistart if (!plugin_isdisabled('translation')) { @@ -95,10 +93,6 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin{ lock($this->public_page); saveWikiText($this->public_page,$this->_template_public(),$lang['created']); unlock($this->public_page); - // redirect to edit public page - if ($this->getConf('edit_public_before_create')) { - send_redirect(wl($this->public_page, 'do=edit', false, '&')); - } } } } diff --git a/conf/default.php b/conf/default.php index aacd966..0fa6069 100644 --- a/conf/default.php +++ b/conf/default.php @@ -18,4 +18,3 @@ $conf['edit_before_create'] = 0; $conf['create_public_page'] = 0; $conf['public_pages_ns'] = 'user'; $conf['templatepathpublic'] = 'lib/plugins/userhomepage/_template_public.txt'; -$conf['edit_public_before_create'] = 1; diff --git a/conf/metadata.php b/conf/metadata.php index 9bb3cf6..204440d 100644 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -18,4 +18,3 @@ $meta['edit_before_create'] = array('onoff'); $meta['create_public_page'] = array('onoff'); $meta['public_pages_ns'] = array('string','_pattern' => '/^(|[a-zA-Z\-:]+)$/','_caution' => 'warning'); $meta['templatepathpublic'] = array('string'); -$meta['edit_public_before_create'] = array('onoff'); diff --git a/lang/en/settings.php b/lang/en/settings.php index b6abe21..8cdff3b 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -20,8 +20,7 @@ $lang['set_permissions_others_o_8'] = 'Upload'; $lang['set_permissions_others_o_16'] = 'Delete'; $lang['group_by_name'] = 'Group users\' namespaces by the first character of user name ?'; $lang['templatepath'] = 'Doku relative path to the template file for user\'s namespace start page.'; -$lang['edit_before_create'] = 'Allow users to edit their private namespace start page on creation (will not work if editing public page on creation is on).'; +$lang['edit_before_create'] = 'Allow users to edit their namespace start page before create.'; $lang['create_public_page'] = 'Create a public page for user'; $lang['public_pages_ns'] = 'Namespace under wich public pages ar created. If a value other than \'user\' is used, ?????????????????'; $lang['templatepathpublic'] = 'lib/plugins/userhomepage/_template_public.txt'; -$lang['edit_public_before_create'] = 'Allow users to edit their public on creation.';