* Fix Special:Userrights logs for users with special characters in their names. ...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 20 Nov 2007 19:00:55 +0000 (19:00 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Tue, 20 Nov 2007 19:00:55 +0000 (19:00 +0000)
* Whitespace, __METHOD__, documentation for FauxRequest to avoid (hopefully?) a repeat bug
* Todo: look for other instances of the bug

RELEASE-NOTES
includes/SpecialLog.php
includes/SpecialUserrights.php
includes/WebRequest.php

index 8e674d8..e537bdd 100644 (file)
@@ -179,6 +179,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Do not present an image bigger than the source when 'frameless' option is used
   (to be consistent with the 'thumb' option now)
 * Support {{PLURAL}} for import log
+* Make sure that the correct log entries are shown on Special:Userrights even
+  for users with special characters in their names
   
 == Parser changes in 1.12 ==
 
index 4ba0faf..e9dbf81 100644 (file)
@@ -123,6 +123,7 @@ class LogReader {
         */
        function limitTitle( $page , $pattern ) {
                global $wgMiserMode;
+               
                $title = Title::newFromText( $page );
                
                if( strlen( $page ) == 0 || !$title instanceof Title )
@@ -182,7 +183,7 @@ class LogReader {
         * @return ResultWrapper result object to return the relevant rows
         */
        function getRows() {
-               $res = $this->db->query( $this->getQuery(), 'LogReader::getRows' );
+               $res = $this->db->query( $this->getQuery(), __METHOD__ );
                return $this->db->resultObject( $res );
        }
 
index 6af65c3..b9815fd 100644 (file)
@@ -390,7 +390,7 @@ class UserrightsForm extends HTMLForm {
                                new FauxRequest(
                                        array(
                                                'type' => 'rights',
-                                               'page' => $user->getUserPage()->getPrefixedUrl(),
+                                               'page' => $user->getUserPage()->getPrefixedText(),
                                        )
                                )
                        )
index aa9885f..b549b9e 100644 (file)
@@ -579,6 +579,11 @@ class FauxRequest extends WebRequest {
        var $data = null;
        var $wasPosted = false;
 
+       /**
+        * @param array $data Array of *non*-urlencoded key => value pairs, the
+        *   fake GET/POST values
+        * @param bool $wasPosted Whether to treat the data as POST
+        */
        function FauxRequest( $data, $wasPosted = false ) {
                if( is_array( $data ) ) {
                        $this->data = $data;