1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-14 02:24:08 +02:00

Ability to order media items.

This commit is contained in:
Lóna Lore
2016-03-29 11:44:50 +02:00
parent 6b9838ae99
commit c54cc47832
4 changed files with 27 additions and 11 deletions

View File

@@ -165,8 +165,11 @@ class plugin_gallery_index_controller extends eControllerFront
$sc->amount = e107::getPlugPref('gallery','perpage', 12); // TODO Add Pref. amount per page.
$sc->curCat = $cid;
$sc->from = $request->getRequestParam('frm', 0);
$list = e107::getMedia()->getImages($cid,$sc->from,$sc->amount);
$plugPrefs = e107::getPlugConfig('gallery')->getPref();
$orderBy = varset($plugPrefs['orderby'], 'media_id DESC');
$list = e107::getMedia()->getImages($cid,$sc->from,$sc->amount,null,$orderBy);
$catname = $tp->toHtml($this->catList[$cid]['media_cat_title'],false,'defs');
$cat = $this->catList[$cid];