Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php |
— | — | @@ -137,7 +137,7 @@ |
138 | 138 | } |
139 | 139 | |
140 | 140 | $wgOut->addHTML( "\n <div class=\"drilldown-results\">\n" ); |
141 | | - $rep = new SDBrowseDataPage( $category, $subcategory, $applied_filters, $remaining_filters ); |
| 141 | + $rep = new SDBrowseDataPage( $category, $subcategory, $applied_filters, $remaining_filters, $offset, $limit ); |
142 | 142 | // Handling changed in MW version 1.18. |
143 | 143 | if ( method_exists( $rep, 'execute' ) ) { |
144 | 144 | $num = $rep->execute( $query ); |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | /** |
168 | 168 | * Initialize the variables of this page |
169 | 169 | */ |
170 | | - function __construct( $category, $subcategory, $applied_filters, $remaining_filters ) { |
| 170 | + function __construct( $category, $subcategory, $applied_filters, $remaining_filters, $offset, $limit ) { |
171 | 171 | // Backwards compatibility for pre-version 1.18 |
172 | 172 | if ( $this instanceof SpecialPage ) { |
173 | 173 | parent::__construct( 'BrowseData' ); |
— | — | @@ -175,6 +175,8 @@ |
176 | 176 | $this->subcategory = $subcategory; |
177 | 177 | $this->applied_filters = $applied_filters; |
178 | 178 | $this->remaining_filters = $remaining_filters; |
| 179 | + $this->offset = $offset; |
| 180 | + $this->limit = $limit; |
179 | 181 | |
180 | 182 | $dbr = wfGetDB( DB_SLAVE ); |
181 | 183 | $categorylinks = $dbr->tableName( 'categorylinks' ); |
— | — | @@ -941,7 +943,8 @@ |
942 | 944 | $highest_num_results = max( $subcat_values ); |
943 | 945 | $num_results_midpoint = ( $lowest_num_results + $highest_num_results ) / 2; |
944 | 946 | $font_size_midpoint = ( $sdgFiltersSmallestFontSize + $sdgFiltersLargestFontSize ) / 2; |
945 | | - $num_results_per_font_pixel = ( $highest_num_results + 1 - $lowest_num_results ) / ( $sdgFiltersLargestFontSize + 1 - $sdgFiltersSmallestFontSize ); |
| 947 | + $num_results_per_font_pixel = ( $highest_num_results + 1 - $lowest_num_results ) / |
| 948 | + ( $sdgFiltersLargestFontSize + 1 - $sdgFiltersSmallestFontSize ); |
946 | 949 | } |
947 | 950 | |
948 | 951 | foreach ( $subcat_values as $subcat => $num_results ) { |
— | — | @@ -1090,7 +1093,7 @@ |
1091 | 1094 | SMW_OUTPUT_HTML |
1092 | 1095 | ); |
1093 | 1096 | |
1094 | | - $prtext = is_array( $prresult ) ? $prresult[0] : $prresult; |
| 1097 | + $prtext = is_array( $prresult ) ? $prresult[0] : $prresult; |
1095 | 1098 | |
1096 | 1099 | SMWOutputs::commitToOutputPage( $out ); |
1097 | 1100 | |
— | — | @@ -1107,7 +1110,7 @@ |
1108 | 1111 | } |
1109 | 1112 | // Force one more parser function, so links appear. |
1110 | 1113 | $wgParser->replaceLinkHolders( $prtext ); |
1111 | | - } |
| 1114 | + } |
1112 | 1115 | |
1113 | 1116 | $html = array(); |
1114 | 1117 | $html[] = $prtext; |