Last modified: 2011-04-22 22:23:27 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30381, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28381 - Make ExternalData able to honour DB prefixes
Make ExternalData able to honour DB prefixes
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-02 00:03 UTC by Sam Reed (reedy)
Modified: 2011-04-22 22:23 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Make ExternalData honor DB flags and tableprefix (3.06 KB, patch)
2011-04-16 03:08 UTC, Solitarius
Details
Make ExternalData honor DB flags and tableprefix (version 2) (3.32 KB, patch)
2011-04-17 23:23 UTC, Solitarius
Details

Description Sam Reed (reedy) 2011-04-02 00:03:50 UTC
Currently it doesn't
Comment 1 Jeroen De Dauw 2011-04-02 10:54:27 UTC
(In reply to comment #0)
> Currently it doesn't

Can you describe the issue a little better?
Comment 2 Sam Reed (reedy) 2011-04-02 10:58:37 UTC
As was changed in r85173

 		$db_type = $edgDBServerType[$server_id];
-		$db_server = $edgDBServer[$server_id];
-		$db_name = $edgDBName[$server_id];
-		$db_username = $edgDBUser[$server_id];
-		$db_password = $edgDBPass[$server_id];

There is no support for databases that need a prefix. Unless you're expecting users to just add that themselves when doing queries?
Comment 3 Yaron Koren 2011-04-03 21:16:21 UTC
I just want to note, at least for my own future reference, that this requested feature, while potentially useful, would only apply for MW >= 1.18, when support for table prefixes was added.
Comment 4 Solitarius 2011-04-16 03:08:08 UTC
Created attachment 8408 [details]
Make ExternalData honor DB flags and tableprefix

Two new options are introduced with this patch:

$edgDBFlags['database_name']
$edgDBTablePrefix['database_name']

To use $edgDBFlags you need to use the constants of Defines.php. Example:
$edgDBFlags['database_name'] = DBO_DEBUG;
Comment 5 Solitarius 2011-04-17 23:23:20 UTC
Created attachment 8416 [details]
Make ExternalData honor DB flags and tableprefix (version 2)

New version of my patch after comments from Yaron, Happy-mellon and bawolff.
Comment 6 Yaron Koren 2011-04-22 22:23:27 UTC
Solitarius - thanks for the patch! It's now in the new version of External Data, 1.3. And I'm marking this bug as "fixed".

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links