Ejegg has uploaded a new change for review.

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

Change subject: Use IDatabase in function signatures
......................................................................

Use IDatabase in function signatures

See Aaron Schulz's comment on Id4e46b65355.

Change-Id: Ib2c96195b360b1cbfb0c18ebe66f04163efe0f0c
---
M includes/Banner.php
1 file changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/73/312073/1

diff --git a/includes/Banner.php b/includes/Banner.php
index 52477b8..634aced 100644
--- a/includes/Banner.php
+++ b/includes/Banner.php
@@ -362,18 +362,18 @@
        /**
         * Helper function to initializeDbForNewBanner()
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         */
-       protected function initializeDbBasicData( $db ) {
+       protected function initializeDbBasicData( IDatabase $db ) {
                $db->insert( 'cn_templates', array( 'tmp_name' => $this->name 
), __METHOD__ );
                $this->id = $db->insertId();
        }
 
        /**
         * Helper function to saveBannerInternal() for saving basic banner 
metadata
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         */
-       protected function saveBasicData( $db ) {
+       protected function saveBasicData( IDatabase $db ) {
                if ( $this->dirtyFlags['basic'] ) {
                        $db->update( 'cn_templates',
                                array(
@@ -482,9 +482,9 @@
        /**
         * Helper function to saveBannerInternal()
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         */
-       protected function saveDeviceTargetData( $db ) {
+       protected function saveDeviceTargetData( IDatabase $db ) {
                if ( $this->dirtyFlags['devices'] ) {
                        // Remove all entries from the table for this banner
                        $db->delete( 'cn_template_devices', array( 'tmp_id' => 
$this->getId() ), __METHOD__ );
@@ -586,9 +586,9 @@
        }
 
        /**
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         */
-       protected function saveMixinData( $db ) {
+       protected function saveMixinData( IDatabase $db ) {
                if ( $this->dirtyFlags['mixins'] ) {
                        $db->delete( 'cn_template_mixins',
                                array( 'tmp_id' => $this->getId() ),
@@ -965,9 +965,9 @@
         * being saved. Intended to create all table rows required such that any
         * additional operation can be an UPDATE statement.
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         */
-       protected function initializeDbForNewBanner( $db ) {
+       protected function initializeDbForNewBanner( IDatabase $db ) {
                $this->initializeDbBasicData( $db );
        }
 
@@ -981,11 +981,11 @@
         *
         * Dirty flags are not globally reset until after this function is 
called.
         *
-        * @param DatabaseBase $db
+        * @param IDatabase $db
         *
         * @throws BannerExistenceException
         */
-       protected function saveBannerInternal( $db ) {
+       protected function saveBannerInternal( IDatabase $db ) {
                $this->saveBasicData( $db );
                $this->saveDeviceTargetData( $db );
                $this->saveMixinData( $db );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2c96195b360b1cbfb0c18ebe66f04163efe0f0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

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

Reply via email to