Index: trunk/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | global $wgCategoryTreeHTTPCache, $wgSquidMaxAge, $wgUseSquid; |
108 | 108 | |
109 | 109 | $ct = new CategoryTree; |
110 | | - $response = $ct->ajax( $category, $mode ); |
| 110 | + $response = $ct->ajax( $category, $mode ); //FIXME: would need to pass on depth parameter here. |
111 | 111 | |
112 | 112 | if ( $wgCategoryTreeHTTPCache && $wgSquidMaxAge && $wgUseSquid ) { |
113 | 113 | $response->setCacheDuration( $wgSquidMaxAge ); |
Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | 'page_title' => $dbkey, |
88 | 88 | ), __METHOD__ ); |
89 | 89 | |
90 | | - $mckey = "$wgDBname:categorytree($mode):$dbkey"; |
| 90 | + $mckey = "$wgDBname:categorytree($mode):$dbkey"; //FIXME: would need to add depth parameter. |
91 | 91 | |
92 | 92 | $response = new AjaxResponse(); |
93 | 93 | |
— | — | @@ -98,7 +98,8 @@ |
99 | 99 | return $response; |
100 | 100 | } |
101 | 101 | |
102 | | - $html = $this->renderChildren( $title, $mode ); |
| 102 | + $html = $this->renderChildren( $title, $mode ); //FIXME: would need to pass depth parameter. |
| 103 | + |
103 | 104 | if ( $html == '' ) $html = ' '; #HACK: Safari doesn't like empty responses. |
104 | 105 | #see Bug 7219 and http://bugzilla.opendarwin.org/show_bug.cgi?id=10716 |
105 | 106 | |
— | — | @@ -140,7 +141,7 @@ |
141 | 142 | else { |
142 | 143 | if ( $display != 'hideroot' ) $html .= CategoryTree::renderNode( $title, $mode, $depth>0, $wgCategoryTreeDynamicTag, $depth-1 ); |
143 | 144 | 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 |
145 | 146 | $uniq += 1; |
146 | 147 | $load = 'ct-' . $uniq . '-' . mt_rand( 1, 100000 ); |
147 | 148 | |