* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
// Query the database about this
$result = SQL_QUERY('SELECT
- `id` AS admin_id, `login`, `password`, `email`' . $add . '
+ `id` AS admin_id, `login`,`password`,`email`' . $add . '
FROM
`{?_MYSQL_PREFIX?}_admins`
ORDER BY
`login` ASC', __FILE__, __LINE__);
- while ($dummy = SQL_FETCHARRAY($result)) {
+ while ($row = SQL_FETCHARRAY($result)) {
// Save row
- $GLOBALS['cache_instance']->addRow($dummy);
+ $GLOBALS['cache_instance']->addRow($row);
} // END - while
// Free memory
$GLOBALS['cache_instance']->removeCacheFile();
unset($GLOBALS['cache_array']['admin_acls']);
}
- } else {
+ } elseif (count($GLOBALS['cache_array']['admin_acls']) > 0) {
// Nope, cache file is corrupted!
$GLOBALS['cache_instance']->removeCacheFile();
unset($GLOBALS['cache_array']['admin_acls']);
+ } elseif (isDebugModeEnabled()) {
+ // This may drive a lot messages to the logfile
+ //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'No entry found in admin_acls to rewrite.');
}
} elseif (isHtmlOutputMode()) {
// Create cache file here
$GLOBALS['cache_instance']->init();
- // Load all modules and their data (column 'id' is no longer required)
- $result = SQL_QUERY('SELECT `admin_id`, `action_menu`, `what_menu`, `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` ORDER BY `admin_id` ASC, `action_menu` ASC, `what_menu` ASC', __FILE__, __LINE__);
+ // Load all admins and their data
+ $result = SQL_QUERY('SELECT * FROM `{?_MYSQL_PREFIX?}_admins_acls` ORDER BY `admin_id` ASC, `action_menu` ASC, `what_menu` ASC', __FILE__, __LINE__);
// Add all rows
while ($content = SQL_FETCHARRAY($result)) {