Harej has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/351569 )
Change subject: Converting underscores to spaces when querying querycachetwo
and back again.
......................................................................
Converting underscores to spaces when querying querycachetwo and
back again.
I want to die.
Bug: T164160
Change-Id: I4b865c9b36385678cbd6e800120c4bb487564db3
---
M includes/content/CollaborationListContent.php
1 file changed, 5 insertions(+), 2 deletions(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit
refs/changes/69/351569/1
diff --git a/includes/content/CollaborationListContent.php
b/includes/content/CollaborationListContent.php
index c60c1c7..80fd221 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -1117,7 +1117,10 @@
*/
private function filterActiveUsers( $userList ) {
if ( count( $userList ) > 0 ) {
- $users = array_keys( $userList );
+ $users = [];
+ foreach( array_keys( $userList ) as $user ) {
+ $users[] = str_replace( '_', ' ', $user );
+ }
$dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select(
'querycachetwo',
@@ -1133,7 +1136,7 @@
$active = [];
foreach ( $res as $row ) {
- $active[$row->qcc_title] =
$userList[$row->qcc_title];
+ $active[$row->qcc_title] =
$userList[str_replace( ' ', '_', $row->qcc_title )];
unset( $userList[$row->qcc_title] );
}
return [ 'active' => $active, 'inactive' => $userList ];
--
To view, visit https://gerrit.wikimedia.org/r/351569
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b865c9b36385678cbd6e800120c4bb487564db3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Harej <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits