From 4dea819324ee9f18517fc17a93e7145225ed1ad0 Mon Sep 17 00:00:00 2001 From: vargenau Date: Tue, 24 Aug 2010 14:24:17 +0000 Subject: [PATCH] Remove method asAclGroupLines that was introduced in r6688 git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@7651 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/PageList.php | 2 +- lib/PagePerm.php | 26 -------------------------- lib/plugin/WikiAdminSetAcl.php | 10 +++++----- themes/MonoBook/templates/info.tmpl | 2 +- themes/default/templates/info.tmpl | 2 +- 5 files changed, 8 insertions(+), 34 deletions(-) diff --git a/lib/PageList.php b/lib/PageList.php index 5e0f59be7..ee027f549 100644 --- a/lib/PageList.php +++ b/lib/PageList.php @@ -536,7 +536,7 @@ class _PageList_Column_acl extends _PageList_Column { $result = HTML::span(); $result->pushContent($type); $result->pushContent(HTML::br()); - $result->pushContent($perm->asAclGroupLines()); + $result->pushContent($perm->asAclLines()); return $result; } }; diff --git a/lib/PagePerm.php b/lib/PagePerm.php index 1a8dbf6d8..5e4e1fd38 100644 --- a/lib/PagePerm.php +++ b/lib/PagePerm.php @@ -705,32 +705,6 @@ class PagePermission { return $s; } - // Print ACL as group followed by actions allowed for the group - function asAclGroupLines() { - - $s = ''; - $perm =& $this->perm; - $actions = array("view", "edit", "create", "list", "remove", "purge", "dump", "change"); - $groups = array(ACL_EVERY, ACL_ANONYMOUS, ACL_BOGOUSER, ACL_HASHOMEPAGE, ACL_SIGNED, ACL_AUTHENTICATED, ACL_ADMIN, ACL_OWNER, ACL_CREATOR); - - foreach ($groups as $group) { - $none = true; - foreach ($actions as $action) { - if (isset($perm[$action][$group])) { - if ($none) { - $none = false; - $s .= "$group:"; - } - $s .= (($perm[$action][$group] ? " " : " -") . $action); - } - } - if (!($none)) { - $s .= "; "; - } - } - return $s; - } - // This is just a bad hack for testing. // Simplify the ACL to a unix-like "rwx------+" string // See getfacl(8) diff --git a/lib/plugin/WikiAdminSetAcl.php b/lib/plugin/WikiAdminSetAcl.php index 9d4208546..670a47c17 100644 --- a/lib/plugin/WikiAdminSetAcl.php +++ b/lib/plugin/WikiAdminSetAcl.php @@ -95,9 +95,9 @@ extends WikiPlugin_WikiAdminSelect $result->pushContent(HTML::p(fmt("ACL changed for page '%s'", $pagename))); $result->pushContent(HTML::p(fmt("from '%s'", - $oldperm ? $oldperm->asAclGroupLines() : "None"))); + $oldperm ? $oldperm->asAclLines() : "None"))); $result->pushContent(HTML::p(fmt("to '%s'.", - $perm->asAclGroupLines()))); + $perm->asAclLines()))); // Create new revision so that ACL change appears in history. $current = $page->getCurrentRevision(); @@ -106,8 +106,8 @@ extends WikiPlugin_WikiAdminSelect $text = $current->getPackedContent(); $meta['summary'] = sprintf(_("ACL changed for page '%s' from '%s' to '%s'."), $pagename, - $oldperm ? $oldperm->asAclGroupLines() : "None", - $perm->asAclGroupLines()); + $oldperm ? $oldperm->asAclLines() : "None", + $perm->asAclLines()); $meta['is_minor_edit'] = 1; $meta['author'] = $request->_user->UserName(); unset($meta['mtime']); // force new date @@ -242,7 +242,7 @@ extends WikiPlugin_WikiAdminSelect elseif ($type == 'default') $type = _("default page permission"); $header->pushContent(HTML::strong(_("Type").': '), HTML::tt($type),HTML::br()); - $header->pushContent(HTML::strong(_("ACL").': '), HTML::tt($perm->asAclGroupLines()),HTML::br()); + $header->pushContent(HTML::strong(_("ACL").': '), HTML::tt($perm->asAclLines()),HTML::br()); $header->pushContent(HTML::p(HTML::strong(_("Description").': '), _("Selected Grant checkboxes allow access, unselected checkboxes deny access."), diff --git a/themes/MonoBook/templates/info.tmpl b/themes/MonoBook/templates/info.tmpl index 21c02321a..22556eef6 100644 --- a/themes/MonoBook/templates/info.tmpl +++ b/themes/MonoBook/templates/info.tmpl @@ -148,7 +148,7 @@ if ($type == 'inherited') { ACL - asAclGroupLines() ?> + asAclLines() ?> diff --git a/themes/default/templates/info.tmpl b/themes/default/templates/info.tmpl index ef24c7920..65d7dc7c8 100644 --- a/themes/default/templates/info.tmpl +++ b/themes/default/templates/info.tmpl @@ -140,7 +140,7 @@ if ($type == 'inherited') { ACL - asAclGroupLines() ?> + asAclLines() ?> -- 2.45.0