Nuria has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/383392 )

Change subject: Removing logging of PageContentSaveComplete
......................................................................

Removing logging of PageContentSaveComplete

This also removes logging of NewEditorEdit.

Bug: T177101
Change-Id: If373d52a8c518a8a9802a2d3f79142b0a0c8c37e
---
M WikimediaEventsHooks.php
1 file changed, 0 insertions(+), 49 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/92/383392/1

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 7e868ae..d1c7e85 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -76,7 +76,6 @@
         * @param Status $status
         * @param int $baseRevId
         * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/PageContentSaveComplete
-        * @see https://meta.wikimedia.org/wiki/Schema:PageContentSaveComplete
         */
        public static function onPageContentSaveComplete(
                $article, $user, $content, $summary,
@@ -134,54 +133,6 @@
                        );
                }
 
-               $isAPI = defined( 'MW_API' );
-               $isMobile = class_exists( 'MobileContext' )
-                       && 
MobileContext::singleton()->shouldDisplayMobileView();
-               $revId = $revision->getId();
-
-               $event = [
-                       'revisionId' => $revId,
-                       'isAPI'      => $isAPI,
-                       'isMobile'   => $isMobile,
-               ];
-
-               if ( isset( $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
-                       $event[ 'userAgent' ] = $_SERVER[ 'HTTP_USER_AGENT' ];
-               }
-               EventLogging::logEvent( 'PageContentSaveComplete', 5588433, 
$event );
-
-               if ( $user->isAnon() ) {
-                       return;
-               }
-
-               // Get the user's age, measured in seconds since registration.
-               $age = time() - wfTimestampOrNull( TS_UNIX, 
$user->getRegistration() );
-
-               $editCount = $user->getEditCount();
-
-               // Check if this edit brings the user's total edit count to a 
value
-               // that is a factor of ten. We consider these 'milestones'. The 
rate
-               // at which editors are hitting such milestones and the time it 
takes
-               // are important indicators of community health.
-               if ( $editCount === 0 || preg_match( '/^9+$/', "$editCount" ) ) 
{
-                       $milestone = $editCount + 1;
-                       $stats->increment( "editor.milestones.{$milestone}" );
-                       $stats->timing( 
"editor.milestones.timing.{$milestone}", $age );
-               }
-
-               // If the editor signed up in the last thirty days, and if this 
is an
-               // NS_MAIN edit, log a NewEditorEdit event.
-               if ( $age <= 2592000 && $title->inNamespace( NS_MAIN ) ) {
-                       EventLogging::logEvent( 'NewEditorEdit', 6792669, [
-                                       'userId'    => $user->getId(),
-                                       'userAge'   => $age,
-                                       'editCount' => $editCount,
-                                       'pageId'    => $article->getId(),
-                                       'revId'     => $revId,
-                                       'isAPI'     => $isAPI,
-                                       'isMobile'  => $isMobile,
-                               ] );
-               }
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If373d52a8c518a8a9802a2d3f79142b0a0c8c37e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: Nuria <[email protected]>

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

Reply via email to