39 $dbr = $this->loadBalancer->getConnection( DB_REPLICA,
'vslow' );
41 $actorQuery = ActorMigration::newMigration()->getJoin(
'rev_user' );
43 $tables = [
'page',
'revision' ] + $actorQuery[
'tables'];
45 'rev_user_text' => $actorQuery[
'fields'][
'rev_user_text'],
46 'MAX(rev_timestamp) as lastedit',
47 'count(page_id) as count',
50 'page_title' . $dbr->buildLike( $dbr->anyString(),
'/', $code ),
51 'page_namespace' => $this->options->get(
'TranslateMessageNamespaces' ),
54 'GROUP BY' => $actorQuery[
'fields'][
'rev_user_text'],
58 'revision' => [
'JOIN',
'page_id=rev_page' ],
59 ] + $actorQuery[
'joins'];
61 $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $joins );
64 foreach ( $res as $row ) {
67 self::USER_NAME => $row->rev_user_text,
68 self::USER_TRANSLATIONS => (int)$row->count,
69 self::USER_LAST_ACTIVITY => $row->lastedit,
85 $dbr = $this->loadBalancer->getConnection( DB_REPLICA,
'vslow' );
87 $actorQuery = ActorMigration::newMigration()->getJoin(
'rev_user' );
89 $tables = [
'page',
'revision' ] + $actorQuery[
'tables'];
91 'rev_user_text' => $actorQuery[
'fields'][
'rev_user_text'],
92 'substring_index(page_title, \'/\', -1) as lang',
93 'MAX(rev_timestamp) as lastedit',
94 'count(page_id) as count',
97 'page_title' . $dbr->buildLike( $dbr->anyString(),
'/', $dbr->anyString() ),
98 'page_namespace' => $this->options->get(
'TranslateMessageNamespaces' ),
101 'GROUP BY' => [
'lang', $actorQuery[
'fields'][
'rev_user_text'] ],
102 'ORDER BY' =>
'NULL',
106 'revision' => [
'JOIN',
'page_id=rev_page' ],
107 ] + $actorQuery[
'joins'];
109 $res = $dbr->select( $tables, $fields, $conds, __METHOD__, $options, $joins );
112 foreach ( $res as $row ) {
114 $data[$row->lang][] = [
115 self::USER_NAME => $row->rev_user_text,
116 self::USER_TRANSLATIONS => (int)$row->count,
117 self::USER_LAST_ACTIVITY => $row->lastedit,