From: <lph...@us...> - 2011-01-12 17:20:56
|
Revision: 31877 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=31877&view=rev Author: lphuberdeau Date: 2011-01-12 17:20:50 +0000 (Wed, 12 Jan 2011) Log Message: ----------- [NIL] May look like a scary commit, but does not change anything. The Perms_Accessor class never supported the __set() method, leaving property assignments made without impact. Not only the accessor does not allow setting the information, it does not even contain it. The permission information is contained in the resolver, which is IMMUTABLE. Modified Paths: -------------- trunk/lib/wiki/renderlib.php Modified: trunk/lib/wiki/renderlib.php =================================================================== --- trunk/lib/wiki/renderlib.php 2011-01-12 17:16:08 UTC (rev 31876) +++ trunk/lib/wiki/renderlib.php 2011-01-12 17:20:50 UTC (rev 31877) @@ -61,8 +61,6 @@ $permDescs = $userlib->get_permissions( 0, -1, 'permName_desc', '', 'wiki' ); $objectperms = Perms::get( array( 'type' => 'wiki page', 'object' => $this->page ) ); - $objectperms = $this->applyLocalPerms($objectperms, $permDescs); - foreach( $permDescs['data'] as $name ) { $name = $name['permName']; $this->setGlobal( $name, $objectperms->$name ? 'y' : 'n' ); @@ -75,36 +73,6 @@ return $objectperms; } // }}} - function applyLocalPerms($objectperms, $permDescs) // {{{ - { - // This function is a kludge until a better more generic solution is found for "user specific" checking perms - global $prefs; - if ( $prefs['wiki_creator_admin'] == 'y' && !empty($this->user) && $this->info['creator'] == $this->user ) { - // to give all perms - foreach( $permDescs['data'] as $name ) { - $name = $name["permName"]; - $shortname = str_replace('tiki_p_', '', $name); - $objectperms->$name = 1; - $objectperms->$shortname = 1; - } - } - if ($prefs['feature_wiki_userpage'] == 'y' && !empty($this->user) && strcasecmp($prefs['feature_wiki_userpage_prefix'], substr($this->page, 0, strlen($prefs['feature_wiki_userpage_prefix']))) == 0) { - if (strcasecmp($this->page, $prefs['feature_wiki_userpage_prefix'].$this->user) == 0) { - // user can edit his page - // to give view and edit perms - $objectperms->view = 1; - $objectperms->tiki_p_view = 1; - $objectperms->edit = 1; - $objectperms->tiki_p_edit = 1; - } else { - // user cannot edit - $objectperms->edit = 0; - $objectperms->tiki_p_edit = 0; - } - } - return $objectperms; - } // }}} - function restoreAll() // {{{ { global $smarty, $prefs; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |