Commit b6fa90d2 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix pagination base url for plans block on dashboard (bug #881718)



Change-Id: I699fe4418e2c21ec227feb8fc5a5940f529c8f73
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent d513d730
......@@ -71,8 +71,10 @@ class PluginBlocktypePlans extends PluginBlocktype {
$pagination = false;
}
else {
$baseurl = $instance->get_view()->get_url();
$baseurl .= ((false === strpos($baseurl, '?')) ? '?' : '&') . 'block=' . $blockid;
$pagination = array(
'baseurl' => $instance->get_view()->get_url() . '&block=' . $blockid,
'baseurl' => $baseurl,
'id' => 'block' . $blockid . '_pagination',
'datatable' => 'tasktable_' . $blockid,
'jsonscript' => 'artefact/plans/viewtasks.json.php',
......
......@@ -46,8 +46,10 @@ if ($blockid = param_integer('block', null)) {
$tasks = ArtefactTypeTask::get_tasks($configdata['artefactid'], $offset, $limit);
$template = 'artefact:plans:taskrows.tpl';
$baseurl = $bi->get_view()->get_url();
$baseurl .= ((false === strpos($baseurl, '?')) ? '?' : '&') . 'block=' . $blockid;
$pagination = array(
'baseurl' => $bi->get_view()->get_url() . '&block=' . $blockid,
'baseurl' => $baseurl,
'id' => 'block' . $blockid . '_pagination',
'datatable' => 'tasktable_' . $blockid,
'jsonscript' => 'artefact/plans/viewtasks.json.php',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment