jenkins-bot has submitted this change and it was merged.

Change subject: Voter eligibility form is inconsistent in dates it suggests and 
uses
......................................................................


Voter eligibility form is inconsistent in dates it suggests and uses

Bug: T147962
Change-Id: Ib83d5a051ff4d587a3efbf1cc5ac6f0ef4087449
---
M includes/pages/VoterEligibilityPage.php
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/includes/pages/VoterEligibilityPage.php 
b/includes/pages/VoterEligibilityPage.php
index acc54af..bfde069 100644
--- a/includes/pages/VoterEligibilityPage.php
+++ b/includes/pages/VoterEligibilityPage.php
@@ -362,6 +362,8 @@
                $date = $this->election->getProperty( 'max-registration', '' );
                if ( $date !== '' ) {
                        $date = gmdate( 'Y-m-d', wfTimestamp( TS_UNIX, $date ) 
);
+               } else {
+                       $date = gmdate( 'Y-m-d', strtotime( 'yesterday' ) );
                }
                $formItems['max-registration'] = array(
                        'section' => 'basic',
@@ -501,6 +503,8 @@
                                $date = $this->election->getProperty( 
'list_edits-before-date', '' );
                                if ( $date !== '' ) {
                                        $date = gmdate( 'Y-m-d', wfTimestamp( 
TS_UNIX, $date ) );
+                               } else {
+                                       $date = gmdate( 'Y-m-d', strtotime( 
'yesterday' ) );
                                }
                                $formItems['list_edits-before-date'] = array(
                                        'section' => 'lists',
@@ -538,7 +542,10 @@
 
                                $dates = $this->election->getProperty( 
'list_edits-between-dates', '' );
                                if ( $dates === '' ) {
-                                       $dates = array();
+                                       $dates = array(
+                                               gmdate( 'Y-m-d', strtotime( '2 
days ago' ) ),
+                                               gmdate( 'Y-m-d', strtotime( 
'yesterday' ) )
+                                       );
                                } else {
                                        $dates = explode( '|', $dates );
                                        $dates = array(

-- 
To view, visit https://gerrit.wikimedia.org/r/315558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib83d5a051ff4d587a3efbf1cc5ac6f0ef4087449
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Huji <huji.h...@gmail.com>
Gerrit-Reviewer: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to