Skip to content
Permalink
Browse files

[plugin:tracker] fix bug of tracker_list limit option

tracker_list プラグインで、表示件数のオプション指定をすると、ページが表示されない問題の修正。
  • Loading branch information
nao-pon committed Jun 27, 2013
1 parent 60aa785 commit 5f14396199ff4599064c091367e5c2a0b3ade84e
Showing with 5 additions and 3 deletions.
  1. +5 −3 xoops_trust_path/modules/xpwiki/plugin/tracker.inc.php
@@ -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);
}
@@ -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

0 comments on commit 5f14396

Please sign in to comment.
You can’t perform that action at this time.