Last modified: 2014-05-14 06:42:38 UTC
frontend/specialpages/actions/ConfirmAccount_body.php -----8<-------------------------------------------------------------- protected function showAccountConfirmForm( $msg = '' ) { global $wgAccountRequestTypes; $out = $this->getOutput(); $reqUser = $this->getUser(); $titleObj = $this->getFullTitle(); $accountReq = $this->accountReq; // convenience if ( !$accountReq || $accountReq->isDeleted && !$this->showRejects ) { $out->addHTML( wfMsgHtml('confirmaccount-badid') ); $out->returnToMain( true, $titleObj ); return; } ----->8---------------------------------------------------------- my postgresql has a column: acr_deleted | boolean | not null default false and regardless that particular request is false, it doesn't get reviewed because isDeleted() is true. Is that supposed to be a instance attribute / ORM mapping or a function call? Because treating it as an attribute, it starts working correctly. But I didn't track down its guts, how the instance gets built and what that class contains. Note that this is 119 branch git checkout.
Also note, that that is my current version, WHERE I'VE REMOVED parentheses from isDeleted()
/** * @return bool Request is deleted (either rejected or expired) */ public function isDeleted() { return $this->deleted; } /backend/UserAccountRequest.php, line 286 on git master.
Yup, same here in 119. So it breaks somewhere in ORM?
This is the first time I'm looking at this extension, but the 'deleted' attribute seems pretty clearly mapped to the 'acr_deleted' database field. No idea what could be causing issues. (Grep that file for acr_deleted to see how it's done.)
Don't know. Fact is that it's false in database and it becomes true in that if comparison. I put my money on rotten Postgresql support.
The current version of the schema uses as integer column. Using boolean in PG makes queries return 'f' or 't' which then requires more custom logic. The fix would be to ALTER the column to an INTEGER. I think I backported this to 1.20, maybe it didn't make it to the 1.19 branch.
Why would anyone store true or false as numbers? Boolean exists in all databases and in http://www.php.net/manual/en/language.types.boolean.php also. That doesn't make sense, but maybe it makes a mediawiki release, who knows.
I'm with the same problem under PostgreSQL. I changed the UserAccountRequest.php to make it work: /** * @return bool Request is deleted (either rejected or expired) */ public function isDeleted() { switch($this->deleted) { case 'FALSE': return FALSE; break; case 'TRUE': return TRUE; break; } return $this->deleted; } With this change, I'm able to use the extension as expected.
Such older branches won't be fixed at this point.