From: <var...@us...> - 2010-08-23 15:10:17
|
Revision: 7647 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7647&view=rev Author: vargenau Date: 2010-08-23 15:10:10 +0000 (Mon, 23 Aug 2010) Log Message: ----------- Move "perm" and "acl" columns from plugins to PageList Modified Paths: -------------- trunk/lib/PageList.php trunk/lib/plugin/WikiAdminChmod.php trunk/lib/plugin/WikiAdminSetAcl.php trunk/pgsrc/Help%2FPageList Modified: trunk/lib/PageList.php =================================================================== --- trunk/lib/PageList.php 2010-08-20 16:58:24 UTC (rev 7646) +++ trunk/lib/PageList.php 2010-08-23 15:10:10 UTC (rev 7647) @@ -546,6 +546,35 @@ } }; +class _PageList_Column_perm extends _PageList_Column { + function _getValue ($page_handle, &$revision_handle) { + $perm_array = pagePermissions($page_handle->_pagename); + return pagePermissionsSimpleFormat($perm_array, + $page_handle->get('author'), + $page_handle->get('group')); + } +}; + +class _PageList_Column_acl extends _PageList_Column { + function _getValue ($page_handle, &$revision_handle) { + $perm_tree = pagePermissions($page_handle->_pagename); + + list($type, $perm) = pagePermissionsAcl($perm_tree[0], $perm_tree); + if ($type == 'inherited') { + $type = sprintf(_("page permission inherited from %s"), $perm_tree[1][0]); + } elseif ($type == 'page') { + $type = _("individual page permission"); + } elseif ($type == 'default') { + $type = _("default page permission"); + } + $result = HTML::span(); + $result->pushContent($type); + $result->pushContent(HTML::br()); + $result->pushContent($perm->asAclGroupLines()); + return $result; + } +}; + class PageList { var $_group_rows = 3; var $_columns = array(); @@ -1176,11 +1205,11 @@ // initialised by the plugin 'renamed_pagename' => new _PageList_Column_renamed_pagename('rename', _("Rename to")), + */ 'perm' => new _PageList_Column_perm('perm', _("Permission")), 'acl' => new _PageList_Column_acl('acl', _("ACL")), - */ 'checkbox' => new _PageList_Column_checkbox('p', _("All")), 'pagename' Modified: trunk/lib/plugin/WikiAdminChmod.php =================================================================== --- trunk/lib/plugin/WikiAdminChmod.php 2010-08-20 16:58:24 UTC (rev 7646) +++ trunk/lib/plugin/WikiAdminChmod.php 2010-08-23 15:10:10 UTC (rev 7647) @@ -188,16 +188,6 @@ } } -// conflicts with WikiAdminSetAcl -class _PageList_Column_chmod_perm extends _PageList_Column { - function _getValue ($page_handle, &$revision_handle) { - $perm_array = pagePermissions($page_handle->_pagename); - return pagePermissionsSimpleFormat($perm_array, - $page_handle->get('author'), - $page_handle->get('group')); - } -}; - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/lib/plugin/WikiAdminSetAcl.php =================================================================== --- trunk/lib/plugin/WikiAdminSetAcl.php 2010-08-20 16:58:24 UTC (rev 7646) +++ trunk/lib/plugin/WikiAdminSetAcl.php 2010-08-23 15:10:10 UTC (rev 7647) @@ -278,35 +278,6 @@ } } -class _PageList_Column_acl extends _PageList_Column { - function _getValue ($page_handle, &$revision_handle) { - $perm_tree = pagePermissions($page_handle->_pagename); - - list($type, $perm) = pagePermissionsAcl($perm_tree[0], $perm_tree); - if ($type == 'inherited') { - $type = sprintf(_("page permission inherited from %s"), $perm_tree[1][0]); - } elseif ($type == 'page') { - $type = _("individual page permission"); - } elseif ($type == 'default') { - $type = _("default page permission"); - } - $result = HTML::span(); - $result->pushContent($type); - $result->pushContent(HTML::br()); - $result->pushContent($perm->asAclGroupLines()); - return $result; - } -}; - -class _PageList_Column_perm extends _PageList_Column { - function _getValue ($page_handle, &$revision_handle) { - $perm_array = pagePermissions($page_handle->_pagename); - return pagePermissionsSimpleFormat($perm_array, - $page_handle->get('author'), - $page_handle->get('group')); - } -}; - // Local Variables: // mode: php // tab-width: 8 Modified: trunk/pgsrc/Help%2FPageList =================================================================== --- trunk/pgsrc/Help%2FPageList 2010-08-20 16:58:24 UTC (rev 7646) +++ trunk/pgsrc/Help%2FPageList 2010-08-23 15:10:10 UTC (rev 7647) @@ -1,4 +1,4 @@ -Date: Tue, 1 Jun 2010 17:01:57 +0000 +Date: Mon, 23 Aug 2010 17:09:36 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.4.0RC-20100415) X-Rcs-Id: $Id$ Content-Type: application/x-phpwiki; @@ -111,11 +111,11 @@ |= owner | Owner |= checkbox | Selectable checkbox at the left |= content | Page content +|= perm | Permission Mask +|= acl | ACL Special, custom columns, either theme or plugin (~WikiAdmin*) specific: |= remove | Remove -|= perm | Permission Mask -|= acl | ACL |= renamed_pagename | Rename to |= ratingwidget | wikilens theme specific. |= custom | See plugin/_WikiTranslation This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |