$ret = in_array($mod, array('admin', 'index', 'login', 'sponsor')); // Then there is a menu!
} else {
// Unsupported state!
- debug_report_bug('This should never be reached.');
+ logDebugMessage(__FUNCTION__, __LINE__, 'This should never be reached.');
}
// Return status
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
// SQL commands to run
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `politician_stop_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- addExtensionAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7);
+ addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7);
// Register filter
registerFilter('page_footer', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, getExtensionDryRun());
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-}
+} // END - if
// Version number
-setThisExtensionVersion('0.0.1');
+setThisExtensionVersion('0.0.2');
// Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2'));
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
case '0.0.2': // SQL queries for v0.0.2
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `uberwach_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- addExtensionAdminMenuSql('config','config_uberwach','Überwach!-Aktion','Einstellungen zur Aktion "Überwach!"', 7);
+ addAdminMenuSql('config','config_uberwach','Überwach!-Aktion','Einstellungen zur Aktion "Überwach!"', 7);
break;
} // END - switch
break;
// Log it away...
logDebugMessage(__FUNCTION__, __LINE__, 'Filter chain ' . $filterName . ' not found!');
} // END - if
- if ($filterName == 'sql_admin_extra_data') debug_report_bug(print_r($GLOBALS['cache_array']['filter'] , true));
// Abort here and return content
return $data;
// Prepares the filter array for usage
function prepareFilterArray () {
+ // Abort here if array is absend (e.g. not cached)
+ if (!isset($GLOBALS['cache_array']['filter']['filter_name'])) {
+ // Abort silently
+ return false;
+ } // END - if
+
// Init dummy array
$filterArray = array(
'chains' => array(),