more global removal

This commit is contained in:
Shish
2015-08-02 20:39:41 +01:00
parent c17250b6b9
commit 18490ed488
9 changed files with 55 additions and 60 deletions

View File

@ -240,10 +240,9 @@ class NumericScore extends Extension {
array("ns_user_id"=>$iid)));
}
else if(preg_match("/^order[=|:](numeric_)?(score)[_]?(desc|asc)?$/i", $event->term, $matches)){
global $order_sql;
$default_order_for_column = "DESC";
$sort = isset($matches[3]) ? strtoupper($matches[3]) : $default_order_for_column;
$order_sql = "images.numeric_score $sort";
Image::$order_sql = "images.numeric_score $sort";
$event->add_querylet(new Querylet("1=1")); //small hack to avoid metatag being treated as normal tag
}
}