| Index: trunk/phase3/RELEASE-NOTES-1.19 |
| — | — | @@ -149,6 +149,7 @@ |
| 150 | 150 | * (bug 32086) Special:PermanentLink now show an error message when no subpage |
| 151 | 151 | was specified. |
| 152 | 152 | * (bug 30368) Special:Newpages now shows the new page name for moved pages |
| | 153 | +* (bug 1697) The way to search blocked usernames in block log should be clearer |
| 153 | 154 | |
| 154 | 155 | === API changes in 1.19 === |
| 155 | 156 | * (bug 19838) siprop=interwikimap can now use the interwiki cache. |
| Index: trunk/phase3/includes/specials/SpecialLog.php |
| — | — | @@ -30,6 +30,17 @@ |
| 31 | 31 | */ |
| 32 | 32 | class SpecialLog extends SpecialPage { |
| 33 | 33 | |
| | 34 | + /** |
| | 35 | + * List log type for which the target is a user |
| | 36 | + * Thus if the given target is in NS_MAIN we can alter it to be an NS_USER |
| | 37 | + * Title user instead. |
| | 38 | + */ |
| | 39 | + private $typeOnUser = array( |
| | 40 | + 'block', |
| | 41 | + 'newusers', |
| | 42 | + 'right', |
| | 43 | + ); |
| | 44 | + |
| 34 | 45 | public function __construct() { |
| 35 | 46 | parent::__construct( 'Log' ); |
| 36 | 47 | } |
| — | — | @@ -85,6 +96,20 @@ |
| 86 | 97 | } |
| 87 | 98 | } |
| 88 | 99 | |
| | 100 | + # Some log types are only for a 'User:' title but we might have been given |
| | 101 | + # only the username instead of the full title 'User:username'. This part try |
| | 102 | + # to lookup for a user by that name and eventually fix user input. See bug 1697. |
| | 103 | + if( in_array( $opts->getValue( 'type' ), $this->typeOnUser ) ) { |
| | 104 | + # ok we have a type of log which expect a user title. |
| | 105 | + $target = Title::newFromText( $opts->getValue( 'page' ) ); |
| | 106 | + if( $target->getNamespace() === NS_MAIN ) { |
| | 107 | + # User forgot to add 'User:', we are adding it for him |
| | 108 | + $opts->setValue( 'page', |
| | 109 | + Title::makeTitleSafe( NS_USER, $opts->getValue( 'page' ) ) |
| | 110 | + ); |
| | 111 | + } |
| | 112 | + } |
| | 113 | + |
| 89 | 114 | $this->show( $opts, $qc ); |
| 90 | 115 | } |
| 91 | 116 | |
| Index: trunk/phase3/languages/messages/MessagesEn.php |
| — | — | @@ -2573,8 +2573,8 @@ |
| 2574 | 2574 | 'pubmedurl' => '//www.ncbi.nlm.nih.gov/pubmed/$1?dopt=Abstract', # do not translate or duplicate this message to other languages |
| 2575 | 2575 | |
| 2576 | 2576 | # Special:Log |
| 2577 | | -'specialloguserlabel' => 'User:', |
| 2578 | | -'speciallogtitlelabel' => 'Title:', |
| | 2577 | +'specialloguserlabel' => 'Performer:', |
| | 2578 | +'speciallogtitlelabel' => 'Target (title or user):', |
| 2579 | 2579 | 'log' => 'Logs', |
| 2580 | 2580 | 'all-logs-page' => 'All public logs', |
| 2581 | 2581 | 'alllogstext' => 'Combined display of all available logs of {{SITENAME}}. |