[MediaWiki-commits] [Gerrit] mediawiki...ConfirmAccount[master]: Move ConfirmAccountsPager to own file

2017-12-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398636 )

Change subject: Move ConfirmAccountsPager to own file
..


Move ConfirmAccountsPager to own file

Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I8a787d8b92603f10c457826ae5e6e3a165269d48
---
M .phpcs.xml
M ConfirmAccount.setup.php
M frontend/specialpages/actions/ConfirmAccount_body.php
A frontend/specialpages/actions/ConfirmAccountsPager.php
4 files changed, 107 insertions(+), 108 deletions(-)

Approvals:
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.phpcs.xml b/.phpcs.xml
index 91b9934..0583c3a 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -8,11 +8,9 @@



-   


.

-   
-   vendor
+   
 
diff --git a/ConfirmAccount.setup.php b/ConfirmAccount.setup.php
index ce65332..31497e0 100644
--- a/ConfirmAccount.setup.php
+++ b/ConfirmAccount.setup.php
@@ -39,7 +39,7 @@
$messagesDirs['RequestAccountPage'] = __DIR__ . 
'/i18n/requestaccount';
# UI to confirm accounts
$classes['ConfirmAccountsPage'] = 
"$spActionDir/ConfirmAccount_body.php";
-   $classes['ConfirmAccountsPager'] = 
"$spActionDir/ConfirmAccount_body.php";
+   $classes['ConfirmAccountsPager'] = 
"$spActionDir/ConfirmAccountsPager.php";
$messagesDirs['ConfirmAccountPage'] = __DIR__ . 
'/i18n/confirmaccount';
# UI to see account credentials
$classes['UserCredentialsPage'] = 
"$spActionDir/UserCredentials_body.php";
diff --git a/frontend/specialpages/actions/ConfirmAccount_body.php 
b/frontend/specialpages/actions/ConfirmAccount_body.php
index 31ffec3..f8ecd0c 100644
--- a/frontend/specialpages/actions/ConfirmAccount_body.php
+++ b/frontend/specialpages/actions/ConfirmAccount_body.php
@@ -827,107 +827,3 @@
return 'users';
}
 }
-
-/**
- * Query to list out pending accounts
- */
-class ConfirmAccountsPager extends ReverseChronologicalPager {
-   public $mForm, $mConds;
-
-   function __construct(
-   $form, $conds, $type, $rejects = false, $showHeld = false, 
$showStale = false
-   ) {
-   $this->mForm = $form;
-   $this->mConds = $conds;
-
-   $this->mConds['acr_type'] = $type;
-
-   $this->rejects = $rejects;
-   $this->stale = $showStale;
-   if ( $rejects || $showStale ) {
-   $this->mConds['acr_deleted'] = 1;
-   } else {
-   $this->mConds['acr_deleted'] = 0;
-   if ( $showHeld ) {
-   $this->mConds[] = 'acr_held IS NOT NULL';
-   } else {
-   $this->mConds[] = 'acr_held IS NULL';
-   }
-
-   }
-   parent::__construct();
-   # Treat 20 as the default limit, since each entry takes up 5 
rows.
-   $urlLimit = $this->mRequest->getInt( 'limit' );
-   $this->mLimit = $urlLimit ? $urlLimit : 20;
-   }
-
-   /**
-* @return Title
-*/
-   function getTitle() {
-   return $this->mForm->getFullTitle();
-   }
-
-   /**
-* @param $row
-* @return string
-*/
-   function formatRow( $row ) {
-   return $this->mForm->formatRow( $row );
-   }
-
-   /**
-* @return string
-*/
-   function getStartBody() {
-   if ( $this->getNumRows() ) {
-   return '';
-   } else {
-   return '';
-   }
-   }
-
-   /**
-* @return string
-*/
-   function getEndBody() {
-   if ( $this->getNumRows() ) {
-   return '';
-   } else {
-   return '';
-   }
-   }
-
-   /**
-* @return array
-*/
-   function getQueryInfo() {
-   $conds = $this->mConds;
-   $tables = [ 'account_requests' ];
-   $fields = [ 'acr_id', 'acr_name', 'acr_real_name', 
'acr_registration', 'acr_held',
-   'acr_user', 'acr_email', 'acr_email_authenticated', 
'acr_bio', 'acr_notes',
-   'acr_urls', 'acr_filename', 'acr_type', 'acr_rejected' 
];
-   # Stale requests have a user ID of zero
-   if ( $this->stale ) {
-   $conds[] = 'acr_user = 0';
-   } elseif ( $this->rejects ) {
-   $conds[] = 'acr_user != 0';
-   $tables[] = 'user';
-   $conds[] = 'acr_user = user_id';
-   $fields[] = 'user_name';
-  

[MediaWiki-commits] [Gerrit] mediawiki...ConfirmAccount[master]: Move ConfirmAccountsPager to own file

2017-12-16 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/398636 )

Change subject: Move ConfirmAccountsPager to own file
..

Move ConfirmAccountsPager to own file

Makes MediaWiki.Files.OneClassPerFile.MultipleFound pass

Change-Id: I8a787d8b92603f10c457826ae5e6e3a165269d48
---
M .phpcs.xml
M ConfirmAccount.setup.php
M frontend/specialpages/actions/ConfirmAccount_body.php
A frontend/specialpages/actions/ConfirmAccountsPager.php
4 files changed, 107 insertions(+), 108 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmAccount 
refs/changes/36/398636/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 91b9934..0583c3a 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -8,11 +8,9 @@



-   


.

-   
-   vendor
+   
 
diff --git a/ConfirmAccount.setup.php b/ConfirmAccount.setup.php
index ce65332..31497e0 100644
--- a/ConfirmAccount.setup.php
+++ b/ConfirmAccount.setup.php
@@ -39,7 +39,7 @@
$messagesDirs['RequestAccountPage'] = __DIR__ . 
'/i18n/requestaccount';
# UI to confirm accounts
$classes['ConfirmAccountsPage'] = 
"$spActionDir/ConfirmAccount_body.php";
-   $classes['ConfirmAccountsPager'] = 
"$spActionDir/ConfirmAccount_body.php";
+   $classes['ConfirmAccountsPager'] = 
"$spActionDir/ConfirmAccountsPager.php";
$messagesDirs['ConfirmAccountPage'] = __DIR__ . 
'/i18n/confirmaccount';
# UI to see account credentials
$classes['UserCredentialsPage'] = 
"$spActionDir/UserCredentials_body.php";
diff --git a/frontend/specialpages/actions/ConfirmAccount_body.php 
b/frontend/specialpages/actions/ConfirmAccount_body.php
index 31ffec3..f8ecd0c 100644
--- a/frontend/specialpages/actions/ConfirmAccount_body.php
+++ b/frontend/specialpages/actions/ConfirmAccount_body.php
@@ -827,107 +827,3 @@
return 'users';
}
 }
-
-/**
- * Query to list out pending accounts
- */
-class ConfirmAccountsPager extends ReverseChronologicalPager {
-   public $mForm, $mConds;
-
-   function __construct(
-   $form, $conds, $type, $rejects = false, $showHeld = false, 
$showStale = false
-   ) {
-   $this->mForm = $form;
-   $this->mConds = $conds;
-
-   $this->mConds['acr_type'] = $type;
-
-   $this->rejects = $rejects;
-   $this->stale = $showStale;
-   if ( $rejects || $showStale ) {
-   $this->mConds['acr_deleted'] = 1;
-   } else {
-   $this->mConds['acr_deleted'] = 0;
-   if ( $showHeld ) {
-   $this->mConds[] = 'acr_held IS NOT NULL';
-   } else {
-   $this->mConds[] = 'acr_held IS NULL';
-   }
-
-   }
-   parent::__construct();
-   # Treat 20 as the default limit, since each entry takes up 5 
rows.
-   $urlLimit = $this->mRequest->getInt( 'limit' );
-   $this->mLimit = $urlLimit ? $urlLimit : 20;
-   }
-
-   /**
-* @return Title
-*/
-   function getTitle() {
-   return $this->mForm->getFullTitle();
-   }
-
-   /**
-* @param $row
-* @return string
-*/
-   function formatRow( $row ) {
-   return $this->mForm->formatRow( $row );
-   }
-
-   /**
-* @return string
-*/
-   function getStartBody() {
-   if ( $this->getNumRows() ) {
-   return '';
-   } else {
-   return '';
-   }
-   }
-
-   /**
-* @return string
-*/
-   function getEndBody() {
-   if ( $this->getNumRows() ) {
-   return '';
-   } else {
-   return '';
-   }
-   }
-
-   /**
-* @return array
-*/
-   function getQueryInfo() {
-   $conds = $this->mConds;
-   $tables = [ 'account_requests' ];
-   $fields = [ 'acr_id', 'acr_name', 'acr_real_name', 
'acr_registration', 'acr_held',
-   'acr_user', 'acr_email', 'acr_email_authenticated', 
'acr_bio', 'acr_notes',
-   'acr_urls', 'acr_filename', 'acr_type', 'acr_rejected' 
];
-   # Stale requests have a user ID of zero
-   if ( $this->stale ) {
-   $conds[] = 'acr_user = 0';
-   } elseif ( $this->rejects ) {
-   $conds[] = 'acr_user != 0';
-   $tables[] = 'user';
-   $conds[] = 'acr_user = user_id';
-   $fields[] =