r76794 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76793‎ | r76794 | r76795 >
Date:14:15, 16 November 2010
Author:demon
Status:resolved (Comments)
Tags:
Comment:
Fix assignment in condition, rename showCloud() to something more descriptive
Modified paths:
  • /trunk/extensions/CodeReview/ui/CodeTagListView.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/SpecialCode.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/WordCloud.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/ui/CodeTagListView.php
@@ -17,7 +17,7 @@
1818 } else {
1919 # Show a cloud made of tags
2020 $tc = new WordCloud( $list, array( $this, 'linkCallback' ) );
21 - $wgOut->addHTML( $tc->showCloud() );
 21+ $wgOut->addHTML( $tc->getCloudHtml() );
2222 }
2323 }
2424
Index: trunk/extensions/CodeReview/ui/WordCloud.php
@@ -84,7 +84,7 @@
8585 *
8686 * @return String
8787 */
88 - public function showCloud() {
 88+ public function getCloudHtml() {
8989 if( 0 === count( $this->wordsArray ) ) {
9090 return;
9191 }
Index: trunk/extensions/CodeReview/ui/SpecialCode.php
@@ -29,7 +29,8 @@
3030 }
3131
3232 // Add subtitle for easy navigation
33 - if ( $view instanceof CodeView && ( $repo = $view->getRepo() ) ) {
 33+ $repo = $view->getRepo();
 34+ if ( $view instanceof CodeView && $repo ) {
3435 $wgOut->setSubtitle(
3536 wfMsgExt( 'codereview-subtitle', 'parse', CodeRepoListView::getNavItem( $repo ) )
3637 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r77016Fix fixme on r76794. Keep assignment from if, just nest it belowreedy13:17, 19 November 2010

Comments

#Comment by Reedy (talk | contribs)   23:13, 16 November 2010

Fatal error: Call to undefined method CodeRepoListView::getRepo() in /home/reedy/mediawiki/trunk/extensions/CodeReview/ui/SpecialCode.php on line 32

#Comment by Reedy (talk | contribs)   23:14, 16 November 2010

$view is a CodeRepoListView

#Comment by Reedy (talk | contribs)   23:15, 16 November 2010

It breaks if you just go to Special:Code (no repo)

Status & tagging log