Legoktm has uploaded a new change for review.

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


Change subject: Remove EchoEvent::updateExtra, MWEchoBackend::updateEventExtra
......................................................................

Remove EchoEvent::updateExtra, MWEchoBackend::updateEventExtra

Unused function, makes implementing Redis backend difficult.
There is also no usecase for this, events shouldn't be altered
after creation except for bundling.

Change-Id: Id175c075d24263119f0455d99342263dd98f9410
---
M includes/DbEchoBackend.php
M includes/EchoBackend.php
M model/Event.php
3 files changed, 0 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo 
refs/changes/59/92259/1

diff --git a/includes/DbEchoBackend.php b/includes/DbEchoBackend.php
index d97eb85..d47a665 100644
--- a/includes/DbEchoBackend.php
+++ b/includes/DbEchoBackend.php
@@ -200,20 +200,6 @@
        }
 
        /**
-        * @param $event EchoEvent
-        */
-       public function updateEventExtra( $event ) {
-               $dbw = MWEchoDbFactory::getDB( DB_MASTER );
-
-               $dbw->update(
-                       'echo_event',
-                       array( 'event_extra' => $event->serializeExtra() ),
-                       array( 'event_id' => $event->getId() ),
-                       __METHOD__
-               );
-       }
-
-       /**
         * @param $user User
         * @param $eventIDs array
         */
diff --git a/includes/EchoBackend.php b/includes/EchoBackend.php
index 2386b60..b1ef708 100644
--- a/includes/EchoBackend.php
+++ b/includes/EchoBackend.php
@@ -97,12 +97,6 @@
        abstract public function loadEvent( $id, $fromMaster );
 
        /**
-        * Update the extra data for an Echo event
-        * @param $event EchoEvent
-        */
-       abstract public function updateEventExtra( $event );
-
-       /**
         * Mark notifications as read for a user
         * @param $user User
         * @param $eventIDs array
diff --git a/model/Event.php b/model/Event.php
index 9f5a096..99629e3 100644
--- a/model/Event.php
+++ b/model/Event.php
@@ -262,18 +262,6 @@
        }
 
        /**
-        * Update extra data
-        */
-       public function updateExtra( $extra ) {
-               global $wgEchoBackend;
-
-               $this->extra = $extra;
-               if ( $this->id && $this->extra ) {
-                       $wgEchoBackend->updateEventExtra( $this );
-               }
-       }
-
-       /**
         * Serialize the extra data for event
         * @return string
         */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id175c075d24263119f0455d99342263dd98f9410
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to