Minor improvements

Changed ACL system message to info type, fixed and simplified helper's
'getPublicID()'
This commit is contained in:
Simon DELAGE 2015-11-22 08:43:40 +01:00
parent 268e9a6f9d
commit bebd766062
2 changed files with 4 additions and 5 deletions

View File

@ -282,7 +282,7 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin{
} // end of templates acl
$i = count($newLines);
if ($i > 0) {
msg("Userhomepage: adding or updating ".$i." ACL rules.",1);
msg("Userhomepage: adding or updating ".$i." ACL rules.",0);
foreach($newLines as $line) {
if (($line['where'] != null) && ($line['who'] != null)) {
// delete potential ACL rule with same scope (aka 'where') and same user (aka 'who')

View File

@ -26,11 +26,10 @@ class helper_plugin_userhomepage extends DokuWiki_Plugin {
// Returns the ID of any (or current) user's public page (even if it doesn't exist)
function getPublicID($userLogin=null) {
if ($user) {
return $this->public_page = cleanID($this->getConf('public_pages_ns').':'.$userLogin);
} else {
return $this->public_page = cleanID($this->getConf('public_pages_ns').':'.$_SERVER['REMOTE_USER']);
if ($userLogin == null) {
$userLogin = $_SERVER['REMOTE_USER'];
}
return $this->public_page = cleanID($this->getConf('public_pages_ns').':'.$userLogin);
}
// Returns a link to current user's private namespace start page (even if it doesn't exist)