Merge "move page_restrictions.pr_id to top in tables.sql"
[lhc/web/wiklou.git] / includes / specials / SpecialBlockList.php
index eb25eaf..f1992c0 100644 (file)
@@ -59,6 +59,7 @@ class SpecialBlockList extends SpecialPage {
                        # B/C @since 1.18: Unblock interface is now at Special:Unblock
                        $title = SpecialPage::getTitleFor( 'Unblock', $this->target );
                        $out->redirect( $title->getFullURL() );
+
                        return;
                }
 
@@ -95,7 +96,9 @@ class SpecialBlockList extends SpecialPage {
                                'default' => 50,
                        ),
                );
-               $form = new HTMLForm( $fields, $this->getContext() );
+               $context = new DerivativeContext( $this->getContext() );
+               $context->setTitle( $this->getTitle() ); // Remove subpage
+               $form = new HTMLForm( $fields, $context );
                $form->setMethod( 'get' );
                $form->setWrapperLegendMsg( 'ipblocklist-legend' );
                $form->setSubmitTextMsg( 'ipblocklist-submit' );
@@ -141,7 +144,7 @@ class SpecialBlockList extends SpecialPage {
                                        break;
 
                                case Block::TYPE_USER:
-                                       $conds['ipb_address'] = (string)$this->target;
+                                       $conds['ipb_address'] = $target->getName();
                                        $conds['ipb_auto'] = 0;
                                        break;
                        }
@@ -182,10 +185,8 @@ class SpecialBlockList extends SpecialPage {
                                        $pager->getBody() .
                                        $pager->getNavigationBar()
                        );
-
                } elseif ( $this->target ) {
                        $out->addWikiMsg( 'ipblocklist-no-results' );
-
                } else {
                        $out->addWikiMsg( 'ipblocklist-empty' );
                }
@@ -420,7 +421,7 @@ class BlockListPager extends TablePager {
 
        /**
         * Do a LinkBatch query to minimise database load when generating all these links
-        * @param $result
+        * @param ResultWrapper $result
         */
        function preprocessResults( $result ) {
                wfProfileIn( __METHOD__ );
@@ -482,5 +483,4 @@ class HTMLBlockedUsersItemSelect extends HTMLSelectField {
 
                return true;
        }
-
 }