36 $dbr = $this->loadBalancer->getConnection( DB_REPLICA,
'vslow' );
38 $actorQuery = ActorMigration::newMigration()->getJoin(
'rev_user' );
40 $tables = [
'page',
'revision' ] + $actorQuery[
'tables'];
42 'rev_user_text' => $actorQuery[
'fields'][
'rev_user_text'],
43 'MAX(rev_timestamp) as lastedit',
44 'count(page_id) as count',
47 'page_title' . $dbr->buildLike( $dbr->anyString(),
'/', $code ),
48 'page_namespace' => $this->options->get(
'TranslateMessageNamespaces' ),
51 'GROUP BY' => $actorQuery[
'fields'][
'rev_user_text'],
55 'revision' => [
'JOIN',
'page_id=rev_page' ],
56 ] + $actorQuery[
'joins'];
58 $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $joins );
61 foreach ( $res as $row ) {
64 self::USER_NAME => $row->rev_user_text,
65 self::USER_TRANSLATIONS => (int)$row->count,
66 self::USER_LAST_ACTIVITY => $row->lastedit,
82 $dbr = $this->loadBalancer->getConnection( DB_REPLICA,
'vslow' );
84 $actorQuery = ActorMigration::newMigration()->getJoin(
'rev_user' );
86 $tables = [
'page',
'revision' ] + $actorQuery[
'tables'];
88 'rev_user_text' => $actorQuery[
'fields'][
'rev_user_text'],
89 'substring_index(page_title, \'/\', -1) as lang',
90 'MAX(rev_timestamp) as lastedit',
91 'count(page_id) as count',
94 'page_title' . $dbr->buildLike( $dbr->anyString(),
'/', $dbr->anyString() ),
95 'page_namespace' => $this->options->get(
'TranslateMessageNamespaces' ),
98 'GROUP BY' => [
'lang', $actorQuery[
'fields'][
'rev_user_text'] ],
103 'revision' => [
'JOIN',
'page_id=rev_page' ],
104 ] + $actorQuery[
'joins'];
106 $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $joins );
109 foreach ( $res as $row ) {
111 $data[$row->lang][] = [
112 self::USER_NAME => $row->rev_user_text,
113 self::USER_TRANSLATIONS => (int)$row->count,
114 self::USER_LAST_ACTIVITY => $row->lastedit,