r20840 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20839‎ | r20840 | r20841 >
Date:13:43, 30 March 2007
Author:daniel
Status:old
Tags:
Comment:
added several comments for incomplete support for depth parameter in ajax mode (follow-up for changes to CategoryTree.php that accidentally slipped into the previous commit)
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTree.php (modified) (history)
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTree.php
@@ -106,7 +106,7 @@
107107 global $wgCategoryTreeHTTPCache, $wgSquidMaxAge, $wgUseSquid;
108108
109109 $ct = new CategoryTree;
110 - $response = $ct->ajax( $category, $mode );
 110+ $response = $ct->ajax( $category, $mode ); //FIXME: would need to pass on depth parameter here.
111111
112112 if ( $wgCategoryTreeHTTPCache && $wgSquidMaxAge && $wgUseSquid ) {
113113 $response->setCacheDuration( $wgSquidMaxAge );
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -86,7 +86,7 @@
8787 'page_title' => $dbkey,
8888 ), __METHOD__ );
8989
90 - $mckey = "$wgDBname:categorytree($mode):$dbkey";
 90+ $mckey = "$wgDBname:categorytree($mode):$dbkey"; //FIXME: would need to add depth parameter.
9191
9292 $response = new AjaxResponse();
9393
@@ -98,7 +98,8 @@
9999 return $response;
100100 }
101101
102 - $html = $this->renderChildren( $title, $mode );
 102+ $html = $this->renderChildren( $title, $mode ); //FIXME: would need to pass depth parameter.
 103+
103104 if ( $html == '' ) $html = ' '; #HACK: Safari doesn't like empty responses.
104105 #see Bug 7219 and http://bugzilla.opendarwin.org/show_bug.cgi?id=10716
105106
@@ -140,7 +141,7 @@
141142 else {
142143 if ( $display != 'hideroot' ) $html .= CategoryTree::renderNode( $title, $mode, $depth>0, $wgCategoryTreeDynamicTag, $depth-1 );
143144 else if ( !$wgCategoryTreeDynamicTag ) $html .= $this->renderChildren( $title, $mode, $depth-1 );
144 - else {
 145+ else { //FIXME: depth would need to be propagated here. this would imact the cache key, too
145146 $uniq += 1;
146147 $load = 'ct-' . $uniq . '-' . mt_rand( 1, 100000 );
147148