Merge "Add tests for API's assert={user|bot}"
[lhc/web/wiklou.git] / includes / ProtectionForm.php
index d34ee03..456e4e6 100644 (file)
@@ -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';