jenkins-bot has submitted this change and it was merged.
Change subject: Set calling function name in OAIHook::updatePage()
......................................................................
Set calling function name in OAIHook::updatePage()
Previously, it was set to an old function name before the OOP refactoring.
Now, all callers that cause a 'modify' action identify themselves clearly
in SQL log.
Change-Id: Ifac725734f10d9b4440d887691a11f8b03c94241
(cherry picked from commit ecd8d33c9ab7cc43da1e4712ff091210e18187a1)
---
M OAIHooks.php
1 file changed, 6 insertions(+), 6 deletions(-)
Approvals:
Legoktm: Looks good to me, approved
jenkins-bot: Verified
diff --git a/OAIHooks.php b/OAIHooks.php
index e9ff9e4..a57a23f 100644
--- a/OAIHooks.php
+++ b/OAIHooks.php
@@ -1,6 +1,6 @@
<?php
class OAIHook {
- static function updatePage( $id, $action ) {
+ static function updatePage( $id, $action, $fname = __METHOD__ ) {
$dbw = wfGetDB( DB_MASTER );
$dbw->replace( 'updates',
array( 'up_page' ),
@@ -8,7 +8,7 @@
'up_action' => $action,
'up_timestamp' => $dbw->timestamp(),
'up_sequence' => null ), # FIXME
- 'oaiUpdatePage' );
+ $fname );
return true;
}
@@ -56,7 +56,7 @@
if( $revision ) {
// Only save a record for real updates, not null edits.
$id = $article->getID();
- self::updatePage( $id, 'modify' );
+ self::updatePage( $id, 'modify', __METHOD__ );
}
return true;
}
@@ -75,8 +75,8 @@
}
static function updateMove( $from, $to, $user, $fromid, $toid ) {
- self::updatePage( $fromid, 'modify' );
- self::updatePage( $toid, 'modify' );
+ self::updatePage( $fromid, 'modify', __METHOD__ . '-from' );
+ self::updatePage( $toid, 'modify', __METHOD__ . '-to' );
return true;
}
@@ -93,7 +93,7 @@
static function updateUndelete( $title, $isnewid ) {
$article = new Article($title);
$id = $article->getID();
- self::updatePage( $id, 'modify' );
+ self::updatePage( $id, 'modify', __METHOD__ );
return true;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/205608
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifac725734f10d9b4440d887691a11f8b03c94241
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAI
Gerrit-Branch: wmf/1.26wmf1
Gerrit-Owner: Legoktm <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits