From 0bad5a937498ff9be9613be02f86bec68e298a39 Mon Sep 17 00:00:00 2001 From: Reedy Date: Mon, 16 Jun 2014 00:49:34 +0100 Subject: [PATCH] Collapse duplicate $existingExpiry == 'infinity' case into else Change-Id: I1cc612e9f646dd75f58cc6ae0ae073ebffa7d6d3 --- includes/ProtectionForm.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index d34ee034fb..456e4e6f9b 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -117,15 +117,12 @@ class ProtectionForm { // Expiry selected from list $this->mExpiry[$action] = ''; $this->mExpirySelection[$action] = $requestExpirySelection; - } elseif ( $existingExpiry == 'infinity' ) { - // Existing expiry is infinite, use "infinite" in drop-down - $this->mExpiry[$action] = ''; - $this->mExpirySelection[$action] = 'infinite'; } elseif ( $existingExpiry ) { // Use existing expiry in its own list item $this->mExpiry[$action] = ''; $this->mExpirySelection[$action] = $existingExpiry; } else { + // Catches 'infinity' - Existing expiry is infinite, use "infinite" in drop-down // Final default: infinite $this->mExpiry[$action] = ''; $this->mExpirySelection[$action] = 'infinite'; -- 2.20.1