if (isAdmin()) $ADD = '';
$dummy = substr($search, 0, -4);
if (isAdmin()) $ADD = '';
$dummy = substr($search, 0, -4);
if (!isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
// sql_patches is missing so choose depending on mode
if (isWhatSet()) {
// Use setted what
$what = getWhat();
if (!isExtensionInstalledAndNewer('sql_patches', '0.0.5')) {
// sql_patches is missing so choose depending on mode
if (isWhatSet()) {
// Use setted what
$what = getWhat();
// Guest and member menu is 'main' as the default
if (empty($data['action'])) $data['action'] = 'main';
// Load from database
$result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what`='%s' LIMIT 1",
// Guest and member menu is 'main' as the default
if (empty($data['action'])) $data['action'] = 'main';
// Load from database
$result = SQL_QUERY_ESC("SELECT `action` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what`='%s' LIMIT 1",
- array($mode, $what), __FUNCTION__, __LINE__);
+ array($module, $what), __FUNCTION__, __LINE__);
if (SQL_NUMROWS($result) == 1) {
// Load action value and pray that this one is the right you want... ;-)
$data = SQL_FETCHARRAY($result);
if (SQL_NUMROWS($result) == 1) {
// Load action value and pray that this one is the right you want... ;-)
$data = SQL_FETCHARRAY($result);
// No sql_patches installed, but maybe we need to register an admin?
if (isAdminRegistered()) {
// Redirect to admin area
// No sql_patches installed, but maybe we need to register an admin?
if (isAdminRegistered()) {
// Redirect to admin area