Commit c121c97b authored by sylvieg's avatar sylvieg

[ENH]tracker: can also download a tracker attachment with itemId and fieldId in the url

parent 5a062153
......@@ -10,11 +10,22 @@ require_once ('tiki-setup.php');
include_once ('lib/trackers/trackerlib.php');
if (!isset($_REQUEST["attId"])) {
if (empty($_REQUEST['attId']) && !empty($_REQUEST['itemId']) && !empty($_REQUEST['fieldId'])) {
$_REQUEST['attId'] = $trklib->get_item_value(0, $_REQUEST['itemId'], $_REQUEST['fieldId']);
}
if (empty($_REQUEST['attId'])) {
$smarty->assign('msg', tra('Incorrect param'));
$smarty->display('error.tpl');
die;
}
$info = $trklib->get_item_attachment($_REQUEST["attId"]);
$info = $trklib->get_item_attachment($_REQUEST['attId']);
if (empty($info)) {
$smarty->assign('msg', tra('Incorrect param'));
$smarty->display('error.tpl');
die;
}
$itemInfo = $trklib->get_tracker_item($info["itemId"]);
$itemUser = $trklib->get_item_creator($itemInfo['trackerId'], $itemInfo['itemId']);
......
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