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

vargenau--- via phpwiki-checkins <[email protected]> Thu, 06 Jan 2022 09:18:29 +0000
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 10841
          http://sourceforge.net/p/phpwiki/code/10841
Author:   vargenau
Date:     2022-01-06 09:18:29 +0000 (Thu, 06 Jan 2022)
Log Message:
-----------
lib/plugin/WikiAdminRemove.php: do not display checkbox when confirming

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

Modified: trunk/lib/plugin/WikiAdminRemove.php
===================================================================
--- trunk/lib/plugin/WikiAdminRemove.php	2022-01-06 09:18:03 UTC (rev 10840)
+++ trunk/lib/plugin/WikiAdminRemove.php	2022-01-06 09:18:29 UTC (rev 10841)
@@ -112,9 +112,10 @@
         $this->preSelectS($args, $request);
 
         $p = $request->getArg('p');
-        if (!$p) $p = $this->_list;
+        if (!$p) {
+            $p = $this->_list;
+        }
         $post_args = $request->getArg('admin_remove');
-
         $next_action = 'select';
         $pages = array();
         if ($p && $request->isPost() &&
@@ -150,17 +151,22 @@
         }
 
         $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_Unselectable($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 following 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")));
         }

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.