Author: joeterranova
Description:
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?
Version: unspecified
Severity: normal
Platform: PC