Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1002,9 +1002,11 @@ |
1003 | 1003 | 'specialloguserlabel', |
1004 | 1004 | 'speciallogtitlelabel', |
1005 | 1005 | 'log', |
| 1006 | + 'log-search-legend', |
| 1007 | + 'log-search-submit', |
1006 | 1008 | 'alllogstext', |
1007 | 1009 | 'logempty', |
1008 | | - 'title-pattern', |
| 1010 | + 'log-title-wildcard', |
1009 | 1011 | ), |
1010 | 1012 | 'allpages' => array( |
1011 | 1013 | 'nextpage', |
Index: trunk/phase3/includes/SpecialLog.php |
— | — | @@ -401,19 +401,28 @@ |
402 | 402 | */ |
403 | 403 | function showOptions( &$out ) { |
404 | 404 | global $wgScript, $wgMiserMode; |
405 | | - $action = htmlspecialchars( $wgScript ); |
406 | 405 | $title = SpecialPage::getTitleFor( 'Log' ); |
407 | | - $special = htmlspecialchars( $title->getPrefixedDBkey() ); |
408 | | - $out->addHTML( "<form action=\"$action\" method=\"get\">\n" . |
409 | | - '<fieldset>' . |
410 | | - Xml::element( 'legend', array(), wfMsg( 'log' ) ) . |
411 | | - Xml::hidden( 'title', $special ) . "\n" . |
412 | | - $this->getTypeMenu() . "\n" . |
413 | | - $this->getUserInput() . "\n" . |
414 | | - $this->getTitleInput() . "\n" . |
415 | | - (!$wgMiserMode?($this->getTitlePattern()."\n"):"") . |
416 | | - Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" . |
417 | | - "</fieldset></form>" ); |
| 406 | + $form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); |
| 407 | + $form .= Xml::hidden( 'title', $title->getPrefixedDBkey() ); |
| 408 | + $form .= '<fieldset><legend>' . wfMsgHtml( 'log-search-legend' ) . '</legend>'; |
| 409 | + $form .= '<table>'; |
| 410 | + # Log selection |
| 411 | + $form .= '<tr><td> </td><td>' . $this->getTypeMenu() . '</td></tr>'; |
| 412 | + $form .= '<tr><td>' . Xml::label( wfMsg( 'specialloguserlabel' ), 'user' ) . '</td>'; |
| 413 | + # User filter |
| 414 | + $form .= '<td>' . Xml::input( 'user', 30, $this->reader->queryUser(), array( 'id' => 'user' ) ) . '</td></tr>'; |
| 415 | + # Title filter |
| 416 | + $form .= '<tr><td>' . Xml::label( wfMsg( 'speciallogtitlelabel' ), 'page' ) . '</td>'; |
| 417 | + $form .= '<td>' . Xml::input( 'page', 30, $this->reader->queryTitle(), array( 'id' => 'page' ) ) . '</td></tr>'; |
| 418 | + # Title "wildcard" checkbox (if enabled) |
| 419 | + if( !$wgMiserMode ) { |
| 420 | + $form .= '<tr><td> </td><td>' . Xml::checkLabel( wfMsg( 'log-title-wildcard' ), 'pattern', 'pattern', $this->reader->queryPattern() ) . '</td></tr>'; |
| 421 | + } |
| 422 | + $form .= '<tr><td> </td><td>' . Xml::submitButton( wfMsg( 'log-search-submit' ) ) . '</td></tr>'; |
| 423 | + $form .= '</table>'; |
| 424 | + $form .= '</fieldset>'; |
| 425 | + $form .= '</form>'; |
| 426 | + $out->addHtml( $form ); |
418 | 427 | } |
419 | 428 | |
420 | 429 | /** |
— | — | @@ -446,33 +455,6 @@ |
447 | 456 | } |
448 | 457 | |
449 | 458 | /** |
450 | | - * @return string Formatted HTML |
451 | | - * @private |
452 | | - */ |
453 | | - function getUserInput() { |
454 | | - $user = $this->reader->queryUser(); |
455 | | - return Xml::inputLabel( wfMsg( 'specialloguserlabel' ), 'user', 'user', 12, $user ); |
456 | | - } |
457 | | - |
458 | | - /** |
459 | | - * @return string Formatted HTML |
460 | | - * @private |
461 | | - */ |
462 | | - function getTitleInput() { |
463 | | - $title = $this->reader->queryTitle(); |
464 | | - return Xml::inputLabel( wfMsg( 'speciallogtitlelabel' ), 'page', 'page', 20, $title ); |
465 | | - } |
466 | | - |
467 | | - /** |
468 | | - * @return boolean Checkbox |
469 | | - * @private |
470 | | - */ |
471 | | - function getTitlePattern() { |
472 | | - $pattern = $this->reader->queryPattern(); |
473 | | - return Xml::checkLabel( wfMsg( 'title-pattern' ), 'pattern', 'pattern', $pattern ); |
474 | | - } |
475 | | - |
476 | | - /** |
477 | 459 | * @param OutputPage &$out where to send output |
478 | 460 | * @private |
479 | 461 | */ |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1607,10 +1607,12 @@ |
1608 | 1608 | 'specialloguserlabel' => 'User:', |
1609 | 1609 | 'speciallogtitlelabel' => 'Title:', |
1610 | 1610 | 'log' => 'Logs', |
| 1611 | +'log-search-legend' => 'Search for logs', |
| 1612 | +'log-search-submit' => 'Go', |
1611 | 1613 | 'alllogstext' => 'Combined display of all available logs of {{SITENAME}}. |
1612 | 1614 | You can narrow down the view by selecting a log type, the user name, or the affected page.', |
1613 | 1615 | 'logempty' => 'No matching items in log.', |
1614 | | -'title-pattern' => 'Title starts with …', |
| 1616 | +'log-title-wildcard' => 'Search titles starting with this text', |
1615 | 1617 | |
1616 | 1618 | # Special:Allpages |
1617 | 1619 | 'nextpage' => 'Next page ($1)', |