@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Respect user/pass flags to bin/storage for direct DatabaseRef-based queries

Summary:
Ref T11893. Previously, we excuted all `bin/storage` queries through `StorageManagementAPI` objects.

After D16848, we execute some queries through `PhabricatorDatabaseRef`. However, the refs we use weren't getting passed the `-u` / `-p` flags correctly, for specifying alternate administrative credentials.

Test Plan:
- Created a second account (`trunk`).
- Ran `bin/storage -u trunk`.
- Made libphutil throw when not connecting as that user.
- Before patch: some connections incorrectly used the default user, "root".
- After patch: all connections correctly used the configured user, "trunk".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11893

Differential Revision: https://secure.phabricator.com/D16901

+3
+3
scripts/sql/manage_storage.php
··· 206 206 ->setDisableUTF8MB4($args->getArg('disable-utf8mb4')); 207 207 PhabricatorEnv::overrideConfig('mysql.user', $api->getUser()); 208 208 209 + $ref->setUser($selected_user); 210 + $ref->setPass($password); 211 + 209 212 try { 210 213 queryfx( 211 214 $api->getConn(null),