diff --git a/e107_handlers/application.php b/e107_handlers/application.php index 475925a3f..fa6e4c34e 100644 --- a/e107_handlers/application.php +++ b/e107_handlers/application.php @@ -3583,6 +3583,16 @@ class eRequest define("e_SELF", e_REQUEST_SELF); define("e_QUERY", $qstring); $_SERVER['QUERY_STRING'] = e_QUERY; + + if(strpos(e_QUERY,"=")!==false ) // Fix for legacyQuery using $_GET ie. ?x=y&z=1 etc. + { + parse_str(e_QUERY,$tmp); + foreach($tmp as $key=>$value) + { + $_GET[$key] = $value; + } + } + return $this; } diff --git a/e107_plugins/download/handlers/download_class.php b/e107_plugins/download/handlers/download_class.php index af34e4579..1cc0b0005 100644 --- a/e107_plugins/download/handlers/download_class.php +++ b/e107_plugins/download/handlers/download_class.php @@ -625,19 +625,28 @@ class download "; } - 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.'¤t='.$newsfrom.$nitems.'&url='.$url; + $text .= $tp->parseTemplate($DOWNLOAD_LIST_NEXTPREV, TRUE, $sc); - + return $text; } diff --git a/e107_plugins/download/url/sef_url.php b/e107_plugins/download/url/sef_url.php index 13f58ba72..d3f79f1f8 100644 --- a/e107_plugins/download/url/sef_url.php +++ b/e107_plugins/download/url/sef_url.php @@ -31,10 +31,11 @@ class plugin_download_sef_url extends eUrlConfig ), 'rules' => array( - '/' => array('list/index', 'legacyQuery' => '', ), - 'Category//' => array('list/category', 'allowVars'=> array('order','view','sort'), 'legacyQuery' => 'list.{id}.{view}.{order}.{sort}', ), + 'Category//' => array('list/category', 'allowVars'=> array('order','from','view','sort'), 'legacyQuery' => 'action=list&id={id}2&from={from}&view={view}&order={order}&sort={sort}'), // list.{id}.{view}.{order}.{sort}', ), '/' => array('view/item', 'legacyQuery' => 'view.{id}' ), 'Get//' => array('request/item', 'legacy'=> '{e_PLUGIN}download/request.php', 'legacyQuery' => 'view.{id}' ), + '/' => array('list/index', 'legacyQuery' => '', ), + ) // rule set array ); }