(bug 16507) Not setting "other time" on creation unprotection error removed
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 3 Jan 2009 16:33:15 +0000 (16:33 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 3 Jan 2009 16:33:15 +0000 (16:33 +0000)
includes/ProtectionForm.php

index a957a70..372edfc 100644 (file)
@@ -242,6 +242,8 @@ class ProtectionForm {
                $expiry = array();
                foreach( $this->mApplicableTypes as $action ) {
                        $expiry[$action] = $this->getExpiry( $action );
+                       if( empty($this->mRestrictions[$action]) )
+                               continue; // unprotected
                        if ( !$expiry[$action] ) {
                                $this->show( wfMsg( 'protect_expiry_invalid' ) );
                                return false;