X-Git-Url: http://git.cyclocoop.org/%22.%20generer_url_ecrire%28%22sites_tous%22%2C%22%22%29.%20%22?a=blobdiff_plain;f=includes%2Fchanges%2FRecentChange.php;h=e18482505cbec20b5fcec483c44c88cfb99c20ae;hb=432cc11fae9e8b30e1d9e180fd61bfc28016ab82;hp=c3b472845e949a2c8cf9eab78b760485a0659179;hpb=b7b9cea32981e9bc1425b771b910b7f2ba1d0bde;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index c3b472845e..e18482505c 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -90,16 +90,17 @@ class RecentChange implements Taggable { */ const SEND_FEED = false; + /** @var array */ public $mAttribs = []; public $mExtra = []; /** - * @var Title + * @var Title|false */ public $mTitle = false; /** - * @var User + * @var User|false */ private $mPerformer = false; @@ -220,55 +221,6 @@ class RecentChange implements Taggable { } } - /** - * Return the list of recentchanges fields that should be selected to create - * a new recentchanges object. - * @deprecated since 1.31, use self::getQueryInfo() instead. - * @return array - */ - public static function selectFields() { - global $wgActorTableSchemaMigrationStage; - - wfDeprecated( __METHOD__, '1.31' ); - if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) { - // If code is using this instead of self::getQueryInfo(), there's a - // decent chance it's going to try to directly access - // $row->rc_user or $row->rc_user_text and we can't give it - // useful values here once those aren't being used anymore. - throw new BadMethodCallException( - 'Cannot use ' . __METHOD__ - . ' when $wgActorTableSchemaMigrationStage has SCHEMA_COMPAT_READ_NEW' - ); - } - - return [ - 'rc_id', - 'rc_timestamp', - 'rc_user', - 'rc_user_text', - 'rc_actor' => 'NULL', - 'rc_namespace', - 'rc_title', - 'rc_minor', - 'rc_bot', - 'rc_new', - 'rc_cur_id', - 'rc_this_oldid', - 'rc_last_oldid', - 'rc_type', - 'rc_source', - 'rc_patrolled', - 'rc_ip', - 'rc_old_len', - 'rc_new_len', - 'rc_deleted', - 'rc_logid', - 'rc_log_type', - 'rc_log_action', - 'rc_params', - ] + CommentStore::getStore()->getFields( 'rc_comment' ); - } - /** * Return the tables, fields, and join conditions to be selected to create * a new recentchanges object. @@ -391,7 +343,7 @@ class RecentChange implements Taggable { } # If our database is strict about IP addresses, use NULL instead of an empty string - $strictIPs = in_array( $dbw->getType(), [ 'oracle', 'postgres' ] ); // legacy + $strictIPs = $dbw->getType() === 'postgres'; // legacy if ( $strictIPs && $this->mAttribs['rc_ip'] == '' ) { unset( $this->mAttribs['rc_ip'] ); }