Last modified: 2011-07-26 21:34:15 UTC
Remove the /* private */ declarations in Mediawiki core, replacing it with 'private' wherever necessary. If any extensions in trunk/extensions are accessing the methods/variables marked private, fix them as necessary.
Created attachment 8411 [details] ImagePage.php, SearchUpdate.php and LinkCache.php cleanup
Created attachment 8412 [details] Extension DeleteBatch cleanup Depended on private $img of ImagePage.
SVN Search permalink (on trunk): /* private (with space): http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=171&hash=90d2840e2afb35018ce103c771fad6fe /*private (without space) http://toolserver.org/~krinkle/wikimedia-svn-search/view.php?id=172&hash=38d49fcf8be1f9de656da4fff2838d7b
Created attachment 8413 [details] ImagePage.php, SearchUpdate.php and LinkCache.php cleanup Fixed misunderstanding of var keyword.
Created attachment 8414 [details] ImagePage.php, SearchUpdate.php, LinkCache.php and (partial) Title.php cleanup
Created attachment 8415 [details] Extension DeleteBatch cleanup
(In reply to comment #6) > Created attachment 8415 [details] > Extension DeleteBatch cleanup The change in DeleteBatch seems to substantially change the codeflow, going to File::delete() directly instead of through FileDeleteForm. Since ImagePage::delete() calls ImagePage::loadFile(), invalidating the removed comment, is it necessary to manually delete the file separately from the ImagePage?
(In reply to comment #6) > Created attachment 8415 [details] > Extension DeleteBatch cleanup The other two changes in this look good. I wouldn't have been able to resist the temptation to do more major refactoring in DPL, but I guess you have more restraint than me :D
I just followed what maintenance/deleteBatch.php did (http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/maintenance/deleteBatch.php?view=markup#l88). Extension:DeleteBatch specified that it was just an extension form of the maintenance script. And laziness can sometimes be mistaken for restraint :D
Patches 8415 and 8413 applied in r86335. How many more of these are there?
The ones remaining are for the various database doQuery methods (which I'm sane enough not to touch), LoadBalancer.php (which I'm investigating now) and the constructor for Title (which is weirding me out, needs more investigation).
Created attachment 8423 [details] Fix for LoadBalancer.php Added new setter method.
Created attachment 8424 [details] Fixes access to private members of LoadBalancer in Extensions.
Created attachment 8425 [details] Fixes for constructor of Title
Created attachment 8426 [details] Extension Fixes for making Title's constructor Private Removed line 90 in Wikilog/WikilogCommentsPage.php since it is noted in comments that setPermalinkTitle is 'optional'.
Created attachment 8427 [details] Fix for LoadBalancer.php Typo :D
Comment on attachment 8423 [details] Fix for LoadBalancer.php >Index: maintenance/eval.php >=================================================================== >--- maintenance/eval.php (revision 86345) >+++ maintenance/eval.php (working copy) >@@ -45,8 +45,11 @@ > } > if ( $d > 1 ) { > $lb = wfGetLB(); >- foreach ( $lb->mServers as $i => $server ) { >- $lb->mServers[$i]['flags'] |= DBO_DEBUG; >+ $serverCount = $lb->getServerCount(); >+ for ( $i = 0; $i < $serverCount; $i++ ) { >+ $server = $lb->getServerInfo( $i ); >+ $server['flags'] |= DBO_DEBUG; >+ $lb->setServerInfo( $i, $server ); > } > } > if ( $d > 2 ) { >Index: includes/db/LoadBalancer.php >=================================================================== >--- includes/db/LoadBalancer.php (revision 86345) >+++ includes/db/LoadBalancer.php (working copy) >@@ -13,13 +13,13 @@ > * @ingroup Database > */ > class LoadBalancer { >- /* private */ var $mServers, $mConns, $mLoads, $mGroupLoads; >- /* private */ var $mErrorConnection; >- /* private */ var $mReadIndex, $mAllowLagged; >- /* private */ var $mWaitForPos, $mWaitTimeout; >- /* private */ var $mLaggedSlaveMode, $mLastError = 'Unknown error'; >- /* private */ var $mParentInfo, $mLagTimes; >- /* private */ var $mLoadMonitorClass, $mLoadMonitor; >+ private $mServers, $mConns, $mLoads, $mGroupLoads; >+ private $mErrorConnection; >+ private $mReadIndex, $mAllowLagged; >+ private $mWaitForPos, $mWaitTimeout; >+ private $mLaggedSlaveMode, $mLastError = 'Unknown error'; >+ private $mParentInfo, $mLagTimes; >+ private $mLoadMonitorClass, $mLoadMonitor; > > /** > * @param $params Array with keys: >@@ -740,6 +740,13 @@ > } > > /** >+ * Sets the server info structure for the given index. Entry at index $i is created if it doesn't exist >+ */ >+ function getServerInfo( $i, $serverInfo ) { >+ $this->mServers[i] = $serverInfo; >+ } >+ >+ /** > * Get the current master position for chronology control purposes > * @return mixed > */
LoadBalancer - r86363 Extension Title - r86365 phase3 Title - r86367
SpecialPage::mName made explicitly private with r93249 Extensions corrected with r93250
Using: ack '\/\*\s*private' I have only found one occurrence of /* private */ in languages/Names.php and it is there for a good reason. Marking bug as FIXED.