rendered paste body function buildExpirySelector( $name, $id = null, $selected = null) { $expiryOptions = wfMsg( 'globalblocking-expiry-options' ); if ($expiryOptions == '-') { $expiryOptions = wfMsg('ipboptions'); } $selector = ''; if ($id == null) { $id = $name; } if ($selected == null) { $selected = 'other'; } $attribs = array( id => $id, name => $name, onchange => 'considerChangingExpiryFocus()' ); $selector .= xml::openElement( 'select', $attribs ); foreach (explode(',', $expiryOptions) as $option) { if ( strpos($option, ":") === false ) $option = "$option:$option"; list($show, $value) = explode(":", $option); $show = htmlspecialchars($show); $value = htmlspecialchars($value); $selector .= Xml::option( $show, $value, $value == $selected ); } $selector .= Xml::option( wfMsg( 'globalblocking-block-expiry-other' ), 'other', 'other' == $selected ); $selector .= Xml::closeElement( 'select' ); return $selector; }