Whym has uploaded a new change for review.
https://gerrit.wikimedia.org/r/298458
Change subject: Support Commons app and uploads
......................................................................
Support Commons app and uploads
Change-Id: I06ead8fb975b1586551e8f38af8e0b8f10f65532
---
M MobileApp.hooks.php
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileApp
refs/changes/58/298458/1
diff --git a/MobileApp.hooks.php b/MobileApp.hooks.php
index 586dd37..d94fa9f 100644
--- a/MobileApp.hooks.php
+++ b/MobileApp.hooks.php
@@ -24,11 +24,11 @@
public static function onRecentChange_save( RecentChange $rc ) {
global $wgRequest;
$userAgent = $wgRequest->getHeader( "User-agent" );
- if ( strpos( $userAgent, "WikipediaApp/" ) === 0 ) {
- // This is from the app!
+ if ( strpos( $userAgent, "WikipediaApp/" ) === 0 || strpos(
$userAgent, "Commons/" ) === 0 ) {
+ // This is from an app!
$logType = $rc->getAttribute( 'rc_log_type' );
- // Only apply tag for edits, nothing else
- if ( is_null( $logType ) ) {
+ // Only apply tag for edits and uploads
+ if ( is_null( $logType ) || $log_type == 'upload' ) {
$rcId = $rc->getAttribute( 'rc_id' );
$revId = $rc->getAttribute( 'rc_this_oldid' );
$logId = $rc->getAttribute( 'rc_logid' );
--
To view, visit https://gerrit.wikimedia.org/r/298458
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I06ead8fb975b1586551e8f38af8e0b8f10f65532
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Whym <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits