Index: trunk/phase3/includes/api/ApiQueryAllUsers.php |
— | — | @@ -116,7 +116,6 @@ |
117 | 117 | |
118 | 118 | $res = $this->select( __METHOD__ ); |
119 | 119 | |
120 | | - $data = array(); |
121 | 120 | $count = 0; |
122 | 121 | $lastUserData = false; |
123 | 122 | $lastUser = false; |
Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -247,7 +247,6 @@ |
248 | 248 | $this->pageLatest = $pageSet->getCustomField( 'page_latest' ); |
249 | 249 | $this->pageLength = $pageSet->getCustomField( 'page_len' ); |
250 | 250 | |
251 | | - $db = $this->getDB(); |
252 | 251 | // Get protection info if requested |
253 | 252 | if ( $this->fld_protection ) { |
254 | 253 | $this->getProtectionInfo(); |
— | — | @@ -563,8 +562,6 @@ |
564 | 563 | if ( !count( $pageIds ) ) { |
565 | 564 | return; |
566 | 565 | } |
567 | | - |
568 | | - $db = $this->getDB(); |
569 | 566 | |
570 | 567 | $this->resetQueryParams(); |
571 | 568 | $this->addTables( 'page_props' ); |
Index: trunk/phase3/includes/api/ApiQueryTags.php |
— | — | @@ -55,10 +55,6 @@ |
56 | 56 | $this->limit = $params['limit']; |
57 | 57 | $this->result = $this->getResult(); |
58 | 58 | |
59 | | - $pageSet = $this->getPageSet(); |
60 | | - $titles = $pageSet->getTitles(); |
61 | | - $data = array(); |
62 | | - |
63 | 59 | $this->addTables( 'change_tag' ); |
64 | 60 | $this->addFields( 'ct_tag' ); |
65 | 61 | |
Index: trunk/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -102,7 +102,6 @@ |
103 | 103 | * AND pl_title='Foo' AND pl_namespace=0 |
104 | 104 | * LIMIT 11 ORDER BY pl_from |
105 | 105 | */ |
106 | | - $db = $this->getDB(); |
107 | 106 | $this->addTables( array( $this->bl_table, 'page' ) ); |
108 | 107 | $this->addWhere( "{$this->bl_from}=page_id" ); |
109 | 108 | if ( is_null( $resultPageSet ) ) { |
— | — | @@ -206,7 +205,6 @@ |
207 | 206 | $this->processContinue(); |
208 | 207 | $this->prepareFirstQuery( $resultPageSet ); |
209 | 208 | |
210 | | - $db = $this->getDB(); |
211 | 209 | $res = $this->select( __METHOD__ . '::firstQuery' ); |
212 | 210 | |
213 | 211 | $count = 0; |
Index: trunk/phase3/includes/api/ApiQueryIWBacklinks.php |
— | — | @@ -97,7 +97,6 @@ |
98 | 98 | |
99 | 99 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
100 | 100 | |
101 | | - $db = $this->getDB(); |
102 | 101 | $res = $this->select( __METHOD__ ); |
103 | 102 | |
104 | 103 | $pages = array(); |
Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -252,8 +252,7 @@ |
253 | 253 | |
254 | 254 | $this->addOption( 'ORDER BY', 'iw_prefix' ); |
255 | 255 | |
256 | | - $db = $this->getDB(); |
257 | | - $res = $this->select( __METHOD__ ); |
| 256 | + $res = $this->select( __METHOD__ ); |
258 | 257 | |
259 | 258 | $data = array(); |
260 | 259 | $langNames = Language::getLanguageNames(); |
Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -50,7 +50,6 @@ |
51 | 51 | $this->dieUsage( 'The page parameter cannot be used together with the text and title parameters', 'params' ); |
52 | 52 | } |
53 | 53 | $prop = array_flip( $params['prop'] ); |
54 | | - $revid = false; |
55 | 54 | |
56 | 55 | if ( isset( $params['section'] ) ) { |
57 | 56 | $this->section = $params['section']; |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -843,7 +843,7 @@ |
844 | 844 | public static function truncateArray( &$arr, $limit ) { |
845 | 845 | $modified = false; |
846 | 846 | while ( count( $arr ) > $limit ) { |
847 | | - $junk = array_pop( $arr ); |
| 847 | + array_pop( $arr ); |
848 | 848 | $modified = true; |
849 | 849 | } |
850 | 850 | return $modified; |
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -56,8 +56,6 @@ |
57 | 57 | $this->fld_details = isset( $prop['details'] ); |
58 | 58 | $this->fld_tags = isset( $prop['tags'] ); |
59 | 59 | |
60 | | - list( $tbl_logging, $tbl_page, $tbl_user ) = $db->tableNamesN( 'logging', 'page', 'user' ); |
61 | | - |
62 | 60 | $hideLogs = LogEventsList::getExcludeClause( $db ); |
63 | 61 | if ( $hideLogs !== false ) { |
64 | 62 | $this->addWhere( $hideLogs ); |
Index: trunk/phase3/includes/api/ApiMove.php |
— | — | @@ -84,21 +84,18 @@ |
85 | 85 | } |
86 | 86 | |
87 | 87 | // Move the page |
88 | | - $hookErr = null; |
89 | 88 | $retval = $fromTitle->moveTo( $toTitle, true, $params['reason'], !$params['noredirect'] ); |
90 | 89 | if ( $retval !== true ) { |
91 | 90 | $this->dieUsageMsg( reset( $retval ) ); |
92 | 91 | } |
93 | 92 | |
94 | 93 | $r = array( 'from' => $fromTitle->getPrefixedText(), 'to' => $toTitle->getPrefixedText(), 'reason' => $params['reason'] ); |
95 | | - if ( !$params['noredirect'] || !$wgUser->isAllowed( 'suppressredirect' ) ) |
96 | | - { |
| 94 | + if ( !$params['noredirect'] || !$wgUser->isAllowed( 'suppressredirect' ) ) { |
97 | 95 | $r['redirectcreated'] = ''; |
98 | 96 | } |
99 | 97 | |
100 | 98 | // Move the talk page |
101 | | - if ( $params['movetalk'] && $fromTalk->exists() && !$fromTitle->isTalkPage() ) |
102 | | - { |
| 99 | + if ( $params['movetalk'] && $fromTalk->exists() && !$fromTitle->isTalkPage() ) { |
103 | 100 | $retval = $fromTalk->moveTo( $toTalk, true, $params['reason'], !$params['noredirect'] ); |
104 | 101 | if ( $retval === true ) { |
105 | 102 | $r['talkfrom'] = $fromTalk->getPrefixedText(); |
Index: trunk/phase3/includes/api/ApiQueryLangLinks.php |
— | — | @@ -78,7 +78,6 @@ |
79 | 79 | $res = $this->select( __METHOD__ ); |
80 | 80 | |
81 | 81 | $count = 0; |
82 | | - $db = $this->getDB(); |
83 | 82 | foreach ( $res as $row ) { |
84 | 83 | if ( ++$count > $params['limit'] ) { |
85 | 84 | // We've reached the one extra which shows that |
Index: trunk/phase3/includes/api/ApiQueryCategories.php |
— | — | @@ -125,7 +125,6 @@ |
126 | 126 | $this->addOption( 'ORDER BY', "cl_from, cl_to" ); |
127 | 127 | } |
128 | 128 | |
129 | | - $db = $this->getDB(); |
130 | 129 | $res = $this->select( __METHOD__ ); |
131 | 130 | |
132 | 131 | if ( is_null( $resultPageSet ) ) { |
Index: trunk/phase3/includes/api/ApiQueryCategoryInfo.php |
— | — | @@ -74,7 +74,6 @@ |
75 | 75 | } |
76 | 76 | $this->addOption( 'ORDER BY', 'cat_title' ); |
77 | 77 | |
78 | | - $db = $this->getDB(); |
79 | 78 | $res = $this->select( __METHOD__ ); |
80 | 79 | |
81 | 80 | $catids = array_flip( $cattitles ); |
Index: trunk/phase3/includes/api/ApiQueryDuplicateFiles.php |
— | — | @@ -89,7 +89,6 @@ |
90 | 90 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
91 | 91 | |
92 | 92 | $res = $this->select( __METHOD__ ); |
93 | | - $db = $this->getDB(); |
94 | 93 | $count = 0; |
95 | 94 | $titles = array(); |
96 | 95 | foreach ( $res as $row ) { |
Index: trunk/phase3/includes/api/ApiQueryImages.php |
— | — | @@ -83,7 +83,6 @@ |
84 | 84 | } |
85 | 85 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
86 | 86 | |
87 | | - $db = $this->getDB(); |
88 | 87 | $res = $this->select( __METHOD__ ); |
89 | 88 | |
90 | 89 | if ( is_null( $resultPageSet ) ) { |
Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -62,7 +62,6 @@ |
63 | 63 | $result = $this->getResult(); |
64 | 64 | $pageSet = $this->getPageSet(); |
65 | 65 | $titles = $pageSet->getTitles(); |
66 | | - $data = array(); |
67 | 66 | |
68 | 67 | // This module operates in three modes: |
69 | 68 | // 'revs': List deleted revs for certain titles |
Index: trunk/phase3/includes/api/ApiQueryWatchlistRaw.php |
— | — | @@ -93,7 +93,6 @@ |
94 | 94 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
95 | 95 | $res = $this->select( __METHOD__ ); |
96 | 96 | |
97 | | - $db = $this->getDB(); |
98 | 97 | $titles = array(); |
99 | 98 | $count = 0; |
100 | 99 | foreach ( $res as $row ) { |
Index: trunk/phase3/includes/api/ApiQueryRandom.php |
— | — | @@ -64,7 +64,6 @@ |
65 | 65 | } |
66 | 66 | |
67 | 67 | protected function runQuery( &$resultPageSet ) { |
68 | | - $db = $this->getDB(); |
69 | 68 | $res = $this->select( __METHOD__ ); |
70 | 69 | $count = 0; |
71 | 70 | foreach ( $res as $row ) { |
Index: trunk/phase3/includes/api/ApiQueryFilearchive.php |
— | — | @@ -54,7 +54,6 @@ |
55 | 55 | $params = $this->extractRequestParams(); |
56 | 56 | |
57 | 57 | $prop = array_flip( $params['prop'] ); |
58 | | - $fld_id = isset( $prop['id'] ); |
59 | 58 | $fld_sha1 = isset( $prop['sha1'] ); |
60 | 59 | $fld_timestamp = isset( $prop['timestamp'] ); |
61 | 60 | $fld_user = isset( $prop['user'] ); |
— | — | @@ -118,7 +117,6 @@ |
119 | 118 | |
120 | 119 | $res = $this->select( __METHOD__ ); |
121 | 120 | |
122 | | - $titles = array(); |
123 | 121 | $count = 0; |
124 | 122 | $result = $this->getResult(); |
125 | 123 | foreach ( $res as $row ) { |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -318,7 +318,6 @@ |
319 | 319 | $this->addOption( 'LIMIT', $limit + 1 ); |
320 | 320 | $this->addOption( 'USE INDEX', $index ); |
321 | 321 | |
322 | | - $data = array(); |
323 | 322 | $count = 0; |
324 | 323 | $res = $this->select( __METHOD__ ); |
325 | 324 | |
Index: trunk/phase3/includes/api/ApiQueryExternalLinks.php |
— | — | @@ -63,7 +63,6 @@ |
64 | 64 | $this->addOption( 'OFFSET', $params['offset'] ); |
65 | 65 | } |
66 | 66 | |
67 | | - $db = $this->getDB(); |
68 | 67 | $res = $this->select( __METHOD__ ); |
69 | 68 | |
70 | 69 | $count = 0; |
Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php |
— | — | @@ -104,9 +104,6 @@ |
105 | 105 | $limit = $params['limit']; |
106 | 106 | $this->addOption( 'LIMIT', $limit + 1 ); |
107 | 107 | |
108 | | - $db = $this->getDB(); |
109 | | - |
110 | | - $data = array(); |
111 | 108 | $count = 0; |
112 | 109 | $lastSortKey = null; |
113 | 110 | $res = $this->select( __METHOD__ ); |
Index: trunk/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -78,7 +78,6 @@ |
79 | 79 | } |
80 | 80 | |
81 | 81 | // Get all requested messages and print the result |
82 | | - $messages = array(); |
83 | 82 | $skip = !is_null( $params['from'] ); |
84 | 83 | $result = $this->getResult(); |
85 | 84 | foreach ( $messages_target as $message ) { |
Index: trunk/phase3/includes/api/ApiQueryUsers.php |
— | — | @@ -73,7 +73,6 @@ |
74 | 74 | public function execute() { |
75 | 75 | $params = $this->extractRequestParams(); |
76 | 76 | $result = $this->getResult(); |
77 | | - $r = array(); |
78 | 77 | |
79 | 78 | if ( !is_null( $params['prop'] ) ) { |
80 | 79 | $this->prop = array_flip( $params['prop'] ); |
— | — | @@ -104,7 +103,6 @@ |
105 | 104 | } |
106 | 105 | |
107 | 106 | if ( count( $goodNames ) ) { |
108 | | - $db = $this->getDb(); |
109 | 107 | $this->addTables( 'user', 'u1' ); |
110 | 108 | $this->addFields( 'u1.*' ); |
111 | 109 | $this->addWhereFld( 'u1.user_name', $goodNames ); |
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -61,7 +61,6 @@ |
62 | 62 | |
63 | 63 | // TODO: if the query is going only against the revision table, should this be done? |
64 | 64 | $this->selectNamedDB( 'contributions', DB_SLAVE, 'contributions' ); |
65 | | - $db = $this->getDB(); |
66 | 65 | |
67 | 66 | if ( isset( $this->params['userprefix'] ) ) { |
68 | 67 | $this->prefixMode = true; |
Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -116,7 +116,6 @@ |
117 | 117 | * AND rc_timestamp < $end AND rc_namespace = $namespace |
118 | 118 | * AND rc_deleted = '0' |
119 | 119 | */ |
120 | | - $db = $this->getDB(); |
121 | 120 | $this->addTables( 'recentchanges' ); |
122 | 121 | $index = array( 'recentchanges' => 'rc_timestamp' ); // May change |
123 | 122 | $this->addWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] ); |
— | — | @@ -250,7 +249,6 @@ |
251 | 250 | |
252 | 251 | $count = 0; |
253 | 252 | /* Perform the actual query. */ |
254 | | - $db = $this->getDB(); |
255 | 253 | $res = $this->select( __METHOD__ ); |
256 | 254 | |
257 | 255 | /* Iterate through the rows, adding data extracted from them to our query result. */ |
Index: trunk/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -60,9 +60,6 @@ |
61 | 61 | $fld_flags = isset( $prop['flags'] ); |
62 | 62 | |
63 | 63 | $result = $this->getResult(); |
64 | | - $pageSet = $this->getPageSet(); |
65 | | - $titles = $pageSet->getTitles(); |
66 | | - $data = array(); |
67 | 64 | |
68 | 65 | $this->addTables( 'ipblocks' ); |
69 | 66 | $this->addFields( 'ipb_auto' ); |
Index: trunk/phase3/includes/api/ApiQueryProtectedTitles.php |
— | — | @@ -48,7 +48,6 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | private function run( $resultPageSet = null ) { |
52 | | - $db = $this->getDB(); |
53 | 52 | $params = $this->extractRequestParams(); |
54 | 53 | |
55 | 54 | $this->addTables( 'protected_titles' ); |
Index: trunk/phase3/includes/api/ApiQueryIWLinks.php |
— | — | @@ -83,7 +83,6 @@ |
84 | 84 | $res = $this->select( __METHOD__ ); |
85 | 85 | |
86 | 86 | $count = 0; |
87 | | - $db = $this->getDB(); |
88 | 87 | foreach ( $res as $row ) { |
89 | 88 | if ( ++$count > $params['limit'] ) { |
90 | 89 | // We've reached the one extra which shows that |
Index: trunk/phase3/includes/api/ApiQueryLinks.php |
— | — | @@ -138,7 +138,6 @@ |
139 | 139 | $this->addOption( 'USE INDEX', "{$this->prefix}_from" ); |
140 | 140 | $this->addOption( 'LIMIT', $params['limit'] + 1 ); |
141 | 141 | |
142 | | - $db = $this->getDB(); |
143 | 142 | $res = $this->select( __METHOD__ ); |
144 | 143 | |
145 | 144 | if ( is_null( $resultPageSet ) ) { |