SF.net SVN: phpwiki:[10754] trunk/lib/plugin/WikiAdminRemove.php

vargenau--- via phpwiki-checkins <[email protected]>
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 10754
          http://sourceforge.net/p/phpwiki/code/10754
Author:   vargenau
Date:     2021-12-09 13:47:59 +0000 (Thu, 09 Dec 2021)
Log Message:
-----------
WikiAdminRemove plugin: factor code

Modified Paths:
--------------
    trunk/lib/plugin/WikiAdminRemove.php

Modified: trunk/lib/plugin/WikiAdminRemove.php
===================================================================
--- trunk/lib/plugin/WikiAdminRemove.php	2021-12-09 13:44:25 UTC (rev 10753)
+++ trunk/lib/plugin/WikiAdminRemove.php	2021-12-09 13:47:59 UTC (rev 10754)
@@ -100,7 +100,7 @@
         return $list;
     }
 
-    private function removePages(&$request, $pages)
+    private function removePages($request, $pages)
     {
         $result = HTML::div();
         $ul = HTML::ul();
@@ -198,22 +198,17 @@
         }
 
         $header = HTML::fieldset();
+        $pagelist = new PageList_Selectable($args['info'], $args['exclude'],
+            array('types' =>
+            array('remove'
+            => new _PageList_Column_remove('remove', _("Remove")))));
+        $pagelist->addPageList($pages);
         if ($next_action == 'verify') {
-            $pagelist = new PageList_Selectable($args['info'], $args['exclude'],
-                array('types' =>
-                array('remove'
-                => new _PageList_Column_remove('remove', _("Remove")))));
-            $pagelist->addPageList($pages);
             $button_label = _("Yes");
             $header->pushContent(HTML::legend(_("Confirm removal")));
             $header->pushContent(HTML::p(HTML::strong(
                 _("Are you sure you want to remove the selected pages?"))));
         } else {
-            $pagelist = new PageList_Selectable($args['info'], $args['exclude'],
-                array('types' =>
-                array('remove'
-                => new _PageList_Column_remove('remove', _("Remove")))));
-            $pagelist->addPageList($pages);
             $button_label = _("Remove selected pages");
             $header->pushContent(HTML::legend(_("Select the pages to remove")));
             if ($args['min_age'] > 0) {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.