Page MenuHomePhabricator

0001-api-Only-add-actor-table-to-table-list-when-querying.patch

Authored By
Zabe
Jan 5 2023, 11:42 AM
Size
1 KB
Referenced Files
None
Subscribers
None

0001-api-Only-add-actor-table-to-table-list-when-querying.patch

From 2e8aa8a5d6ce22173cda51f3e67f0f9539e1c36a Mon Sep 17 00:00:00 2001
From: Alexander Vorwerk <zabe@avorwerk.net>
Date: Thu, 5 Jan 2023 12:41:09 +0100
Subject: [PATCH] api: Only add actor table to table list when querying from it
Bug: T233004
Bug: T326293
Change-Id: I88bf55a672c91f50e5945221b52226ec7cf4cd0d
---
src/Api/ApiQueryCheckUserLog.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/Api/ApiQueryCheckUserLog.php b/src/Api/ApiQueryCheckUserLog.php
index 8379771a..c0f00b80 100644
--- a/src/Api/ApiQueryCheckUserLog.php
+++ b/src/Api/ApiQueryCheckUserLog.php
@@ -31,7 +31,7 @@ class ApiQueryCheckUserLog extends ApiQueryBase {
$continue = $params['continue'];
$dir = $params['dir'];
- $this->addTables( [ 'cu_log', 'actor' ] );
+ $this->addTables( [ 'cu_log' ] );
$this->addOption( 'LIMIT', $limit + 1 );
$this->addTimestampWhereRange( 'cul_timestamp', $dir, $params['from'], $params['to'] );
$fields = [
@@ -39,6 +39,7 @@ class ApiQueryCheckUserLog extends ApiQueryBase {
];
if ( $this->getConfig()->get( 'CheckUserLogActorMigrationStage' ) & SCHEMA_COMPAT_READ_NEW ) {
+ $this->addTables( [ 'actor' ] );
$this->addJoinConds( [ 'actor' => [ 'JOIN', 'actor_id=cul_actor' ] ] );
$fields[] = 'actor_name';
} else {
--
2.17.1

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
10051353
Default Alt Text
0001-api-Only-add-actor-table-to-table-list-when-querying.patch (1 KB)

Event Timeline