Ticket #1630: admin_access.patch
| File admin_access.patch, 1.9 KB (added by , 7 years ago) |
|---|
-
admin/includes/column_left.php
17 17 --------------------------------------------------------------*/ 18 18 defined( '_VALID_XTC' ) or die( 'Direct Access to this location is not allowed.' ); 19 19 20 // Some plugins such as magnalister render the admin html inside of a function. 21 // So variables that are expected to have a global scope will have a local scope instead, 22 // if the file is included inside of a function. 23 // Annotate variables that are required to have a global scope as global even if they're 24 // usually included in a procedual fashion. This has no effect if the file is included 25 // in a global scope but fixes missing initialisations if the file is included inside 26 // of a function. 27 global $admin_access; 20 28 $admin_access = array(); 21 29 if (($_SESSION['customers_status']['customers_status_id'] == '0')) { 22 30 $admin_access_query = xtc_db_query("SELECT * FROM " . TABLE_ADMIN_ACCESS . " WHERE customers_id = ".(int)$_SESSION['customer_id']); -
admin/includes/extra_menu.php
25 25 function subMenue($admin_access_name = '', $filename = '', $linktext= '', $parameters = '', $ssl = 'NONSSL'){ 26 26 global $admin_access; 27 27 28 ## magnalister29 if (!is_array($admin_access) || count($admin_access) < 1) {30 $admin_access = array();31 if (($_SESSION['customers_status']['customers_status_id'] == '0')) {32 $admin_access_query = xtc_db_query("SELECT * FROM " . TABLE_ADMIN_ACCESS . " WHERE customers_id = ".(int)$_SESSION['customer_id']);33 $admin_access = xtc_db_fetch_array($admin_access_query);34 }35 }36 ## magnalister37 38 28 $html = ''; 39 29 if (isset($admin_access[$admin_access_name]) && $admin_access[$admin_access_name] == '1') { 40 30
