Index: trunk/extensions/ConfirmAccount/dataclasses/UserAccountRequest.php |
— | — | @@ -109,6 +109,22 @@ |
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
| 113 | + * @param $id int |
| 114 | + * @param $from string|null 'master' to use DB master |
| 115 | + * @return UserAccountRequest |
| 116 | + */ |
| 117 | + public static function newFromId( $id, $from = null ) { |
| 118 | + $db = ( $master == 'dbmaster' ) |
| 119 | + ? wfGetDB( DB_MASTER ) |
| 120 | + : wfGetDB( DB_SLAVE ); |
| 121 | + $row = $db->selectRow( 'account_requests', array( 'acr_id' => $id ), __METHOD__ ); |
| 122 | + if ( !$row ) { |
| 123 | + return null; |
| 124 | + } |
| 125 | + return self::newFromRow( $row ); |
| 126 | + } |
| 127 | + |
| 128 | + /** |
113 | 129 | * @return int |
114 | 130 | */ |
115 | 131 | public function getId() { |
Index: trunk/extensions/ConfirmAccount/business/AccountRequestSubmission.php |
— | — | @@ -42,6 +42,9 @@ |
43 | 43 | $this->attachmentTempPath = $params['attachmentTempPath']; |
44 | 44 | } |
45 | 45 | |
| 46 | + /** |
| 47 | + * @return string |
| 48 | + */ |
46 | 49 | public function getAttachmentDidNotForget() { |
47 | 50 | return $this->attachmentDidNotForget; |
48 | 51 | } |
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php |
— | — | @@ -480,6 +480,7 @@ |
481 | 481 | if( !$result->isOk() ) { |
482 | 482 | $error = wfMsg( 'mailerror', $out->parse( $result->getWikiText() ) ); |
483 | 483 | $this->showAccountConfirmForm( $error ); |
| 484 | + $dbw->rollback(); |
484 | 485 | return false; |
485 | 486 | } |
486 | 487 | } |