X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=blobdiff_plain;f=includes%2FBlock.php;h=bdc6702f917d82d992dd280301de44acd35c5303;hb=2791fb08619545b12e58dd576ee6a98c38082c64;hp=0999ad20634fe93880f252e6972ddd1c3da1dd89;hpb=6bd1e23f4a281b05e6c171653a715c394aac36d6;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Block.php b/includes/Block.php index 0999ad2063..bdc6702f91 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -222,7 +222,7 @@ class Block { 'ipb_block_email', 'ipb_allow_usertalk', 'ipb_parent_block_id', - ] + CommentStore::newKey( 'ipb_reason' )->getFields(); + ] + CommentStore::getStore()->getFields( 'ipb_reason' ); } /** @@ -235,7 +235,7 @@ class Block { * - joins: (array) to include in the `$join_conds` to `IDatabase->select()` */ public static function getQueryInfo() { - $commentQuery = CommentStore::newKey( 'ipb_reason' )->getJoin(); + $commentQuery = CommentStore::getStore()->getJoin( 'ipb_reason' ); return [ 'tables' => [ 'ipblocks' ] + $commentQuery['tables'], 'fields' => [ @@ -460,9 +460,9 @@ class Block { // I wish I didn't have to do this $db = wfGetDB( DB_REPLICA ); $this->mExpiry = $db->decodeExpiry( $row->ipb_expiry ); - $this->mReason = CommentStore::newKey( 'ipb_reason' ) + $this->mReason = CommentStore::getStore() // Legacy because $row may have come from self::selectFields() - ->getCommentLegacy( $db, $row )->text; + ->getCommentLegacy( $db, 'ipb_reason', $row )->text; $this->isHardblock( !$row->ipb_anon_only ); $this->isAutoblocking( $row->ipb_enable_autoblock ); @@ -654,7 +654,7 @@ class Block { 'ipb_block_email' => $this->prevents( 'sendemail' ), 'ipb_allow_usertalk' => !$this->prevents( 'editownusertalk' ), 'ipb_parent_block_id' => $this->mParentBlockId - ] + CommentStore::newKey( 'ipb_reason' )->insert( $dbw, $this->mReason ); + ] + CommentStore::getStore()->insert( $dbw, 'ipb_reason', $this->mReason ); return $a; } @@ -670,7 +670,7 @@ class Block { 'ipb_create_account' => $this->prevents( 'createaccount' ), 'ipb_deleted' => (int)$this->mHideName, // typecast required for SQLite 'ipb_allow_usertalk' => !$this->prevents( 'editownusertalk' ), - ] + CommentStore::newKey( 'ipb_reason' )->insert( $dbw, $this->mReason ); + ] + CommentStore::getStore()->insert( $dbw, 'ipb_reason', $this->mReason ); } /**