Last modified: 2009-04-10 16:09:42 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 T10361, the corresponding Phabricator task for complete and up-to-date bug report information.
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