Looking at this, at the very top of /admin/media_manager.php we have
PHP Code:
require('includes/application_top.php');
$action = (isset($_GET['action']) ? $_GET['action'] : '');
$current_category_id = (isset($_GET['current_category_id']) ? $_GET['current_category_id'] : $current_category_id);
Perhaps if we spiced that up a bit...
PHP Code:
require('includes/application_top.php');
$action = (isset($_GET['action']) ? $_GET['action'] : '');
$categories_id_check = $db->Execute("select c.categories_id, cd.categories_name, c.parent_id
from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd
where c.categories_id = cd.categories_id
and cd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and c.parent_id = '0'
order by c.sort_order, cd.categories_name");
if($categories_id_check->RecordCount()>0)
$current_category_id = $categories_id_check->fields['categories_id'];
$current_category_id = (isset($_GET['current_category_id']) ? $_GET['current_category_id'] : $current_category_id);