Skip to content

Commit

Permalink
[plugin:tracker] fix bug of tracker_list limit option
Browse files Browse the repository at this point in the history
tracker_list プラグインで、表示件数のオプション指定をすると、ページが表示されない問題の修正。
  • Loading branch information
nao-pon committed Jun 27, 2013
1 parent 60aa785 commit 5f14396
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xoops_trust_path/modules/xpwiki/plugin/tracker.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ function plugin_tracker_get_fields($base,$refer,&$config)
) as $fieldname => $type)
{
if (isset($fields[$fieldname])) continue;
$field = array($fieldname, xpwiki_plugin_tracker::plugin_tracker_message('btn' . $fieldname), '', '20', '');
$tracker = $this->func->get_plugin_instance('tracker');
$field = array($fieldname, $tracker->plugin_tracker_message('btn' . $fieldname), '', '20', '');
$class = 'XpWikiTracker_field_' . $type;
$fields[$fieldname] = new $class($this->xpwiki, $field, $base, $refer, $config);
}
Expand Down Expand Up @@ -1254,12 +1255,13 @@ function toString($limit = 0)
$limit = intval($limit);
if ($limit != 0) $limit = max(1, $limit);
if ($limit != 0 && $count > $limit) {
$tracker = $this->func->get_plugin_instance('tracker');
$source[] = str_replace(
array('$1', '$2' ),
array($count, $limit),
$this->func->plugin_tracker_message('msg_limit')
$tracker->plugin_tracker_message('msg_limit')
) . "\n";
$rows = array_slice($this->rows, 0, $limit);
$rows = array_slice($rows, 0, $limit);
}

// Loading template
Expand Down

0 comments on commit 5f14396

Please sign in to comment.