Commit 95a110fe authored by Jonny Bradley's avatar Jonny Bradley

[FIX] trackerfilter: Export line end behaviour seems to have changed (Smarty 3...

[FIX] trackerfilter: Export line end behaviour seems to have changed (Smarty 3 thing maybe?) so now needs a blank line to create a \n for the csv export in the tpl.
Also initialised missing var and added usage note in the php (thanks Geoff)
parent 5457da01
......@@ -25,7 +25,8 @@
{/if}
{assign var='comma' value='n'}
{/if}
{/strip}{* this line break is necessary to make data starts on the line after the headers *}
{/strip}{* this empty line below is necessary to make data starts on the line after the headers *}
{foreach from=$items item=item}
{strip}{* DO NOT ident this strip - the line must not begin with space *}
{assign var='comma' value='n'}
......@@ -59,5 +60,7 @@
{if !$smarty.foreach.list.last}{$separator}{/if}
{/foreach}
{/if}
{/strip}
{/strip}{* this empty line below is necessary to make separate rows *}
{/foreach}
......@@ -5,6 +5,8 @@
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
// still used for export from trackerfilter (only - Tiki 9)
require_once('tiki-setup.php');
$access->check_feature('feature_trackers');
if (!isset($_REQUEST['trackerId'])) {
......@@ -206,6 +208,7 @@ if (isset($tracker_info['defaultOrderDir'])) {
} else {
$sort_mode.= "_asc";
}
$heading = 'y';
$smarty->assign_by_ref('heading', $heading);
while (($items = $trklib->list_items($_REQUEST['trackerId'], $offset, $maxRecords, $sort_mode, $listfields, $filterFields, $values, $_REQUEST['status'], $_REQUEST['initial'], $exactValues)) && !empty($items['data'])) {
// still need to filter the fields that are view only by the admin and the item creator
......
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