Skip to content

Commit 5f14396

Browse files
committed
[plugin:tracker] fix bug of tracker_list limit option
tracker_list プラグインで、表示件数のオプション指定をすると、ページが表示されない問題の修正。
1 parent 60aa785 commit 5f14396

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

xoops_trust_path/modules/xpwiki/plugin/tracker.inc.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,8 @@ function plugin_tracker_get_fields($base,$refer,&$config)
271271
) as $fieldname => $type)
272272
{
273273
if (isset($fields[$fieldname])) continue;
274-
$field = array($fieldname, xpwiki_plugin_tracker::plugin_tracker_message('btn' . $fieldname), '', '20', '');
274+
$tracker = $this->func->get_plugin_instance('tracker');
275+
$field = array($fieldname, $tracker->plugin_tracker_message('btn' . $fieldname), '', '20', '');
275276
$class = 'XpWikiTracker_field_' . $type;
276277
$fields[$fieldname] = new $class($this->xpwiki, $field, $base, $refer, $config);
277278
}
@@ -1254,12 +1255,13 @@ function toString($limit = 0)
12541255
$limit = intval($limit);
12551256
if ($limit != 0) $limit = max(1, $limit);
12561257
if ($limit != 0 && $count > $limit) {
1258+
$tracker = $this->func->get_plugin_instance('tracker');
12571259
$source[] = str_replace(
12581260
array('$1', '$2' ),
12591261
array($count, $limit),
1260-
$this->func->plugin_tracker_message('msg_limit')
1262+
$tracker->plugin_tracker_message('msg_limit')
12611263
) . "\n";
1262-
$rows = array_slice($this->rows, 0, $limit);
1264+
$rows = array_slice($rows, 0, $limit);
12631265
}
12641266

12651267
// Loading template

0 commit comments

Comments
 (0)