Minor improvements
Changed ACL system message to info type, fixed and simplified helper's 'getPublicID()'
This commit is contained in:
parent
268e9a6f9d
commit
bebd766062
|
@ -282,7 +282,7 @@ class action_plugin_userhomepage extends DokuWiki_Action_Plugin{
|
||||||
} // end of templates acl
|
} // end of templates acl
|
||||||
$i = count($newLines);
|
$i = count($newLines);
|
||||||
if ($i > 0) {
|
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) {
|
foreach($newLines as $line) {
|
||||||
if (($line['where'] != null) && ($line['who'] != null)) {
|
if (($line['where'] != null) && ($line['who'] != null)) {
|
||||||
// delete potential ACL rule with same scope (aka 'where') and same user (aka 'who')
|
// delete potential ACL rule with same scope (aka 'where') and same user (aka 'who')
|
||||||
|
|
|
@ -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)
|
// Returns the ID of any (or current) user's public page (even if it doesn't exist)
|
||||||
function getPublicID($userLogin=null) {
|
function getPublicID($userLogin=null) {
|
||||||
if ($user) {
|
if ($userLogin == null) {
|
||||||
return $this->public_page = cleanID($this->getConf('public_pages_ns').':'.$userLogin);
|
$userLogin = $_SERVER['REMOTE_USER'];
|
||||||
} else {
|
|
||||||
return $this->public_page = cleanID($this->getConf('public_pages_ns').':'.$_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)
|
// Returns a link to current user's private namespace start page (even if it doesn't exist)
|
||||||
|
|
Loading…
Reference in a new issue