Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | parent :: __construct($query, $moduleName, 'uc'); |
41 | 41 | } |
42 | 42 | |
43 | | - private $params, $userTitle; |
| 43 | + private $params, $username; |
44 | 44 | private $fld_ids = false, $fld_title = false, $fld_timestamp = false, |
45 | 45 | $fld_comment = false, $fld_flags = false; |
46 | 46 | |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | $db = $this->getDB(); |
62 | 62 | |
63 | 63 | // Prepare query |
64 | | - $this->getUserTitle(); |
| 64 | + $this->prepareUsername(); |
65 | 65 | $this->prepareQuery(); |
66 | 66 | |
67 | 67 | //Do the actual query. |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | * Validate the 'user' parameter and set the value to compare |
98 | 98 | * against `revision`.`rev_user_text` |
99 | 99 | */ |
100 | | - private function getUserTitle() { |
| 100 | + private function prepareUsername() { |
101 | 101 | $user = $this->params['user']; |
102 | 102 | if( $user ) { |
103 | 103 | $name = User::isIP( $user ) |
— | — | @@ -105,7 +105,7 @@ |
106 | 106 | if( $name === false ) { |
107 | 107 | $this->dieUsage( "User name {$user} is not valid", 'param_user' ); |
108 | 108 | } else { |
109 | | - $this->userTitle = $name; |
| 109 | + $this->username = $name; |
110 | 110 | } |
111 | 111 | } else { |
112 | 112 | $this->dieUsage( 'User parameter may not be empty', 'param_user' ); |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | $this->addWhereFld('rev_deleted', 0); |
127 | 127 | |
128 | 128 | // We only want pages by the specified user. |
129 | | - $this->addWhereFld( 'rev_user_text', $this->userTitle ); |
| 129 | + $this->addWhereFld( 'rev_user_text', $this->username ); |
130 | 130 | |
131 | 131 | // ... and in the specified timeframe. |
132 | 132 | $this->addWhereRange('rev_timestamp', |