/* ------------------------------ Advanced premium sorting -------------------------------------*/
//modify search to be able to sort ads first by premium (is / not) and then by date
function bo_mgr_sort_by_premium() {
Search::newInstance()->order('b_premium DESC, dt_pub_date DESC', '');
}
$enchance_search = osc_get_preference('bo_mgr_enchance_premium_search', 'anchor-bo_mgr') <> '' ? osc_get_preference('bo_mgr_enchance_premium_search', 'anchor-bo_mgr') : 1;
if($enchance_search == 1 && strlen(strstr ($_SERVER['REQUEST_URI'],'sOrder')) == 0) {
osc_add_hook('search_conditions', 'bo_mgr_sort_by_premium');
}
/* ----------------------------------------------------------------------------------------------*/
$_SERVER['REQUEST_URI'],
above is the chunk of code - index.php
getting error- Undefined index: REQUEST_URI
please, correct me if am wrong-
i have implement $url
$url =$_SERVER['REQUEST_URI']
now am not getting error in debug.log
is it the right way. pls, correct me....if am wrong