Phuedx has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/282182

Change subject: Remove MobileOptionsTracking event logging
......................................................................

Remove MobileOptionsTracking event logging

Following on 664696f (and its dependencies), remove the server-side-only
logging of MobileOptionsTracking events.

Bug: T122504
Change-Id: I4b92e869b2a228f735c3b2b4c8635aa0c1f1a43a
---
M includes/MobileFrontend.body.php
M includes/specials/SpecialMobileOptions.php
2 files changed, 0 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/82/282182/1

diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 5b67396..c85358f 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -11,19 +11,6 @@
  */
 class ExtMobileFrontend {
        /**
-        * Uses EventLogging when available to record an event on server side
-        *
-        * @param string $schema The name of the schema
-        * @param int $revision The revision of the schema
-        * @param array $data The data to be recorded against the schema
-        */
-       public static function eventLog( $schema, $revision, $data ) {
-               if ( is_callable( 'EventLogging::logEvent' ) ) {
-                       EventLogging::logEvent( $schema, $revision, $data );
-               }
-       }
-
-       /**
         * Transforms content to be mobile friendly version.
         * Filters out various elements and runs the MobileFormatter.
         * @param OutputPage $out
diff --git a/includes/specials/SpecialMobileOptions.php 
b/includes/specials/SpecialMobileOptions.php
index a7f2bd7..77a6c0c 100644
--- a/includes/specials/SpecialMobileOptions.php
+++ b/includes/specials/SpecialMobileOptions.php
@@ -209,13 +209,6 @@
         * of returnto or, if not set, back to this special page
         */
        private function submitSettingsForm() {
-               $schema = 'MobileOptionsTracking';
-               $schemaRevision = 14003392;
-               $schemaData = array(
-                       'action' => 'success',
-                       'images' => "nochange",
-                       'beta' => "nochange",
-               );
                $context = MobileContext::singleton();
                $request = $this->getRequest();
                $user = $this->getUser();
@@ -228,9 +221,6 @@
                                . $this->msg( "mobile-frontend-save-error" 
)->parse()
                                . '</div>'
                        );
-                       $schemaData['action'] = 'error';
-                       $schemaData['errorText'] = $errorText;
-                       ExtMobileFrontend::eventLog( $schema, $schemaRevision, 
$schemaData );
                        $this->getSettingsForm();
                        return;
                }
@@ -238,23 +228,11 @@
 
                if ( $request->getBool( 'enableBeta' ) ) {
                        $group = 'beta';
-                       if ( !$context->isBetaGroupMember() ) {
-                               // The request was to turn on beta
-                               $schemaData['beta'] = "on";
-                       }
                } else {
                        $group = '';
-                       if ( $context->isBetaGroupMember() ) {
-                               // beta was turned off
-                               $schemaData['beta'] = "off";
-                       }
                }
                $context->setMobileMode( $group );
                $imagesDisabled = !$request->getBool( 'enableImages' );
-               if ( $context->imagesDisabled() !== $imagesDisabled ) {
-                       // Only record when the state has changed
-                       $schemaData['images'] = $imagesDisabled ? "off" : "on";
-               }
                $context->setDisableImagesCookie( $imagesDisabled );
 
                $returnToTitle = Title::newFromText( $request->getText( 
'returnto' ) );
@@ -263,7 +241,6 @@
                } else {
                        $url = $this->getPageTitle()->getFullURL( 'success' );
                }
-               ExtMobileFrontend::eventLog( $schema, $schemaRevision, 
$schemaData );
                $context->getOutput()->redirect( 
MobileContext::singleton()->getMobileUrl( $url ) );
        }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b92e869b2a228f735c3b2b4c8635aa0c1f1a43a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx <[email protected]>

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

Reply via email to