1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-21 13:52:35 +02:00

Fixes #470 Download pagination template and SEF Urls.

This commit is contained in:
Cameron
2014-01-04 10:14:10 -08:00
parent dd140d8e69
commit 7f1a946562
3 changed files with 28 additions and 8 deletions

View File

@@ -625,19 +625,28 @@ class download
</div>";
}
global $nextprev_parms;
// $newUrl = e_SELF . "?action=list&id={$this->qry['id']}&from=[FROM]&view={$this->qry['view']}&order={$this->qry['order']}&sort={$this->qry['sort']}.";
$nextprevQry = $this->qry;
$nextprevQry['from'] = '[FROM]';
$newUrl = e107::getUrl()->create('download/list/category',$nextprevQry);
$nextprev_parms = $total_downloads . "," . $this->qry['view'] . "," . $this->qry['from'] . "," . $newUrl;
$nextprev = array(
'tmpl_prefix' =>'default',
'total' => $total_downloads,
'amount' => intval($this->qry['view']),
'current' => $this->qry['from'],
'url' => urldecode($newUrl)
);
global $nextprev_parms;
$nextprev_parms = http_build_query($nextprev,false,'&'); // 'tmpl_prefix='.deftrue('NEWS_NEXTPREV_TMPL', 'default').'&total='. $total_downloads.'&amount='.$amount.'&current='.$newsfrom.$nitems.'&url='.$url;
$text .= $tp->parseTemplate($DOWNLOAD_LIST_NEXTPREV, TRUE, $sc);
return $text;
}