jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/369443 )

Change subject: Fix overzealous addQuotes for rc_source field in 
rebuildrecentchanges.php
......................................................................


Fix overzealous addQuotes for rc_source field in rebuildrecentchanges.php

Those quotes aren't needed since those constants are being used as an array
value and the database methods already quotes them. It caused the field to
be double-quoted and being inserted with quotes on the database.

Bug: T172205
Change-Id: I050f8d477600ee44794b7525a119b3d4451e5a28
---
M maintenance/rebuildrecentchanges.php
1 file changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Umherirrender: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/maintenance/rebuildrecentchanges.php 
b/maintenance/rebuildrecentchanges.php
index 142a4e5..5df432e 100644
--- a/maintenance/rebuildrecentchanges.php
+++ b/maintenance/rebuildrecentchanges.php
@@ -156,9 +156,7 @@
                                        'rc_this_oldid' => $row->rev_id,
                                        'rc_last_oldid' => 0, // is this ok?
                                        'rc_type' => $row->page_is_new ? RC_NEW 
: RC_EDIT,
-                                       'rc_source' => $row->page_is_new
-                                               ? $dbw->addQuotes( 
RecentChange::SRC_NEW )
-                                               : $dbw->addQuotes( 
RecentChange::SRC_EDIT )
+                                       'rc_source' => $row->page_is_new ? 
RecentChange::SRC_NEW : RecentChange::SRC_EDIT
                                        ,
                                        'rc_deleted' => $row->rev_deleted
                                ],
@@ -239,9 +237,7 @@
                                                'rc_last_oldid' => $lastOldId,
                                                'rc_new' => $new,
                                                'rc_type' => $new ? RC_NEW : 
RC_EDIT,
-                                               'rc_source' => $new === 1
-                                                       ? $dbw->addQuotes( 
RecentChange::SRC_NEW )
-                                                       : $dbw->addQuotes( 
RecentChange::SRC_EDIT ),
+                                               'rc_source' => $new === 1 ? 
RecentChange::SRC_NEW : RecentChange::SRC_EDIT,
                                                'rc_old_len' => $lastSize,
                                                'rc_new_len' => $size,
                                        ],
@@ -325,7 +321,7 @@
                                        'rc_this_oldid' => 0,
                                        'rc_last_oldid' => 0,
                                        'rc_type' => RC_LOG,
-                                       'rc_source' => $dbw->addQuotes( 
RecentChange::SRC_LOG ),
+                                       'rc_source' => RecentChange::SRC_LOG,
                                        'rc_cur_id' => $field->isNullable()
                                                ? $row->page_id
                                                : (int)$row->page_id, // NULL 
=> 0,

-- 
To view, visit https://gerrit.wikimedia.org/r/369443
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I050f8d477600ee44794b7525a119b3d4451e5a28
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Martineznovo <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to