Fix RevDel_RevisionItem::getAuthorNameField to work for ips
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 12 Apr 2014 20:40:52 +0000 (22:40 +0200)
committerUmherirrender <umherirrender_de.wp@web.de>
Thu, 24 Apr 2014 21:12:58 +0000 (21:12 +0000)
The user_name column in the database result is null for anon users,
that will always return null when calling getAuthorName.

The function getAuthorName is used when the log_search table is filled
for revision deletion. After this fix the value for 'target_author_ip'
will be there which allows searching for logs where edits of the ip was
suppressed (because the search field 'offender' only works for oversighter)

Change-Id: I611bc56eefac594a28ad4808fe7d9ba48c872922

includes/revisiondelete/RevisionDelete.php

index 0553880..dcec5dd 100644 (file)
@@ -167,7 +167,7 @@ class RevDel_RevisionItem extends RevDel_Item {
        }
 
        public function getAuthorNameField() {
-               return 'user_name'; // see Revision::selectUserFields()
+               return 'rev_user_text';
        }
 
        public function canView() {