Last modified: 2009-04-10 16:09:42 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 8361 - OpenID consumer.php broken when database table prefix set
OpenID consumer.php broken when database table prefix set
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
OpenID (Other open bugs)
unspecified
PC All
: Normal normal (vote)
: ---
Assigned To: Sergey Chernyshev
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-23 02:53 UTC by Joe Terranova
Modified: 2009-04-10 16:09 UTC (History)
1 user (show)

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


Attachments

Description Joe Terranova 2006-12-23 02:53:28 UTC
For example, say the prefix was 'prefix', so the name of the table was
'prefixuser_openid'

In the function OpenIDGetUser, it sets the tablename to be
"{$wgDBprefix}user_openid". so $tableName is now 'prefixuser_openid'

It then calls $dbr->selectField to select uoi_user from that table. The problem.
selectField /also/ adds the table prefix to the table. So the end result is:

"select uoi_user from prefixprefixuser_openid ..." You get the idea.

I've removed the {$wfDBprefix} from all the functions, and it now works
correctly. This affects almost all the functions in Consumer.php, but not any of
the other files. I'd make the change and commit it, but I don't know enough
about mediawiki to be sure nothing else will be broken. What was the reason this
was done this way? Did earlier versions (I'm on 1.8.2) of the database functions
not add the table prefix automatically? What about $wgSharedDB (which is also
added to the table names in Consumer.php). Do the database functions deal with
that? Did they not used to?
Comment 1 Sergey Chernyshev 2009-04-10 14:19:02 UTC
I don't think this is still the case. Can you confirm that your changes are already in repository?

Thank you,

        Sergey
Comment 2 Sergey Chernyshev 2009-04-10 16:09:42 UTC
This is no longer broken.

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


Navigation
Links