Fix issue when modifying groups in Special:Userrights
[lhc/web/wiklou.git] / includes / specials / SpecialUserrights.php
index fd066ac..e62731f 100644 (file)
@@ -873,6 +873,10 @@ class UserrightsPage extends SpecialPage {
                                                } else {
                                                        $expiryHtml = $this->msg( 'userrights-expiry-none' )->text();
                                                }
+                                               // T171345: Add a hidden form element so that other groups can still be manipulated,
+                                               // otherwise saving errors out with an invalid expiry time for this group.
+                                               $expiryHtml .= Html::Hidden( "wpExpiry-$group",
+                                                       $currentExpiry ? 'existing' : 'infinite' );
                                                $expiryHtml .= "<br />\n";
                                        } else {
                                                $expiryHtml = Xml::element( 'span', null,