- Introduced addConfigDropSql() and addConfigChangeSql() to encapsulate dropping
and changing database configuration entries
- Refactured header (abort lines) for all loaders
- TODOs.txt updated
./inc/extensions/ext-yoomedia.php:121: // @TODO Can this be moved into a database table?
./inc/extensions/ext-yoomedia.php:54:// @TODO Only deprecated when 'ext-network' is ready! setExtensionDeprecated('Y');
./inc/extensions-functions.php:155: // @TODO Do we still need this? setExtensionUpdateNotes('');
-./inc/extensions-functions.php:1915:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
+./inc/extensions-functions.php:1939:// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
./inc/extensions-functions.php:437:// @TODO Change from ext_id to ext_name (not just even the variable! ;-) )
./inc/extensions-functions.php:567: // @TODO Extension is loaded, what next?
./inc/filter/bonus_filter.php:55: // @TODO This query isn't right, it will only update if the user was for a longer time away!
./inc/language/de.php:1083: // @TODO Rewrite these two constants
./inc/language/de.php:1104: // @TODO Rewrite these three constants
./inc/language/de.php:778:// @TODO Are these constants longer used?
-./inc/language-functions.php:250: // @TODO These are all valid languages, again hard-coded
+./inc/language-functions.php:255: // @TODO These are all valid languages, again hard-coded
./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no *
./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings *
./inc/modules/admin/what-list_links.php:85: // @TODO Find a way to rewrite this. See some lines above for different queries
./inc/modules/admin/what-list_links.php:94: // @TODO Rewrite this to includes/filter
./inc/modules/admin/what-list_refs.php:107: // @TODO Try to rewrite some to EL
-./inc/modules/admin/what-list_unconfirmed.php:80: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
-./inc/modules/admin/what-list_unconfirmed.php:99: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
+./inc/modules/admin/what-list_unconfirmed.php:107: // @TODO "Please do not call me directly." Should be rewritten to a nice selection depending on ext-bonus
+./inc/modules/admin/what-list_unconfirmed.php:84: // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', '{--ADMIN_LIST_UNCONFIRMED_BONUS_LINKS--}');
./inc/modules/admin/what-list_user.php:153: // @TODO Rewrite these to filters
./inc/modules/admin/what-list_user.php:261: // @TODO Rewrite this into a filter
./inc/modules/admin/what-list_user.php:309: // @TODO Rewrite this into a filter
}
}
+// Drop configuration entry if found for actual extension
+function addConfigDropSql ($columnName) {
+ // Is the column there?
+ if (isSqlTableColumnFound('{?_MYSQL_PREFIX?}_config', $columnName)) {
+ // Found, so add it
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `' . $columnName . '`');
+ } else {
+ // Add debug line, debug_report_bug() would cause some extenion updates fail
+ logDebugMessage(__FUNCTION__, __LINE__, 'Configuration entry ' . $columnName . ' not found.');
+ }
+}
+
+// Change configuration entry for actual extension
+function addConfigChangeSql ($oldColumnName, $newColumnName, $columnSql) {
+ // Is the old column there?
+ if (isSqlTableColumnFound('{?_MYSQL_PREFIX?}_config', $oldColumnName)) {
+ // Found so add it
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `' . $oldColumnName . '` `' . $newColumnName . '` ' . $columnSql);
+ } else {
+ // Add debug line, debug_report_bug() would cause some extenion updates fail
+ logDebugMessage(__FUNCTION__, __LINE__, 'Configuration entry ' . $oldColumnName . ' not found.');
+ }
+}
+
// Enables/disables productive mode for current extension (used only while
// registration).
// @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable'
break;
case '0.2.7': // SQL queries for v0.2.7
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_new_mem_notify` `beg_new_member_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigChangeSql('beg_ral_en_notify', 'beg_ral_enable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigChangeSql('beg_ral_di_notify', 'beg_ral_disable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigChangeSql('beg_new_mem_notify', 'beg_new_member_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_en_notify` `beg_ral_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_di_notify` `beg_ral_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Umbenannt nach neuer Namenskonvention");
break;
case '0.2.8': // SQL queries for v0.2.8
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_enable_notify` `beg_rallye_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `beg_ral_disable_notify` `beg_rallye_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_enable_notify` `beg_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_disable_notify` `beg_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigChangeSql('beg_ral_enable_notify', 'beg_rallye_enable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigChangeSql('beg_ral_disable_notify', 'beg_rallye_disable_notify`', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_enable_notify` `beg_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `beg_ral_disable_notify` `beg_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Umbenannt nach neuer Namenskonvention");
case '0.2.8': // SQL queries for v0.2.8
addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_bonus` SET `timestamp`=0 WHERE `timestamp`='0000000000'");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` CHANGE `points` `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `turbo_bonus` `turbo_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `login_bonus` `login_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `turbo_bonus` `turbo_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `login_bonus` `login_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ // For configuration, we need different entries
+ addConfigChangeSql('turbo_bonus', 'turbo_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+ addConfigChangeSql('login_bonus', 'login_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("5 Nachkommastellen implementiert");
break;
break;
case '0.9.1': // SQL queries for v0.9.1
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_en_notify` `bonus_enable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_di_notify` `bonus_disable_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `bonus_new_mem_notify` `bonus_new_member_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigChangeSql('bonus_en_notify', 'bonus_enable_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigChangeSql('bonus_di_notify', 'bonus_disable_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigChangeSql('bonus_new_mem_notify', 'bonus_new_member_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
// Update notes
setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");
break;
case '0.9.2': // SQL queries for v0.9.2
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_en_notify` `bonus_ralley_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_di_notify` `bonus_ralley_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_notify` `bonus_rallley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_en_notify` `bonus_ralley_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_di_notify` `bonus_ralley_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ral_notify` `bonus_rallley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes
setExtensionUpdateNotes("Umbenannt nach neuer Konvention (bitte Einstellungen kontrollieren).");
break;
case '0.9.3': // SQL queries for v0.9.3
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ralley_enable_notify` `bonus_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ralley_disable_notify` `bonus_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `bonus_ralley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ralley_enable_notify` `bonus_rallye_enable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `bonus_ralley_disable_notify` `bonus_rallye_disable_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `bonus_ralley_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes
setExtensionUpdateNotes("Typos gefixt.");
break;
case '0.9.4': // SQL queries for v0.9.4
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `bonus_id` `bonus_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL");
- addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `bonus_id`=NULL WHERE `bonus_id`=0");
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `bonus_id` `bonus_id` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL');
+ addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `bonus_id`=NULL WHERE `bonus_id`=0');
// Update notes
setExtensionUpdateNotes("Konfliktierende SQL-Befehle aus ext-user verschoben.");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_cache' LIMIT 1");
// Remove config entries
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_themes`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_admins`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_acls`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_exts`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_config`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_modreg`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_refdepth`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `cache_refsys`");
+ addConfigDropSql('cache_themes');
+ addConfigDropSql('cache_admins');
+ addConfigDropSql('cache_acls');
+ addConfigDropSql('cache_exts');
+ addConfigDropSql('cache_config');
+ addConfigDropSql('cache_modreg');
+ addConfigDropSql('cache_refdepth');
+ addConfigDropSql('cache_refsys');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Der Cache hat keine Konfiguration mehr.");
) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Coupon->user connection'");
// Configuration entries
+ //addConfigAddSql('', "");
// Menu systems:
// - Admin entries
addAdminMenuSql('network','list_network_error_types','Fehlertypen','<strong>Experten-Einstellungen!</strong> Hier stellen Sie die Namen von Fehlercodes ein, die Scripte zurückliefern können. <strong>Dies sind INTERNE Daten und sollten nur vom Entwicklerteam angepasst werden.</strong> Stellen Sie an diesen Einstellungen bitte nichts um. Sie sollten hier generell nichts einstellen und <a href="http://forum.mxchange.org/forum-43.html" target="_blank" title="Direktlink zum Forum">im Forum</a> um Hilfe fragen, wenn Sie selber ein Werbenetzwerk einrichten möchten.',12);
// Configuration entries
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `network_cache_refresh` BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 15) . '');
+ addConfigAddSql('network_cache_refresh', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (60 * 15));
break;
case 'remove': // Do stuff when removing extension
break;
case '0.5.2': // SQL queries for v0.5.2
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_text`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_subj`");
+ addConfigDropSql('test_text');
+ addConfigDropSql('test_subj');
addConfigAddSql('allow_url_in_text', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
addConfigAddSql('allow_url_in_subject', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
break;
case '0.2.0': // SQL queries for v0.2.0
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `mailid_error_redirect` `mailid_error_redirect` ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
+ addConfigChangeSql('mailid_error_redirect', 'mailid_error_redirect', "ENUM('INDEX','REJECT') NOT NULL DEFAULT 'INDEX'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden.");
break;
case '0.0.2': // SQL queries for v0.0.2
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `auto_purge` `auto_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*14)."");
+ addConfigChangeSql('auto_purge', 'auto_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay()*14));
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("In der Tabelle <strong>{?_MYSQL_PREFIX?}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)");
break;
case '0.6.5': // SQL queries for v0.6.5
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `css_php` `css_php` ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
+ addConfigChangeSql('css_php', 'css_php', "ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
break;
case '0.6.7': // SQL queries for v0.6.7
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `index_delay` `index_delay` TINYINT(3) NOT NULL DEFAULT 0");
+ addConfigChangeSql('index_delay', 'index_delay', 'TINYINT(3) NOT NULL DEFAULT 0');
+
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Die Weiterleitungseinstellung muss auch Werte kleiner Null akzeptieren.");
break;
) ENGINE = {?_TABLE_TYPE?}");
// Configuration
- addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `dns_cache_timeout` BIGINT(20) NOT NULL DEFAULT ' . (60*60*24));
+ addConfigAddSql('dns_cache_timeout', 'BIGINT(20) NOT NULL DEFAULT ' . (60*60*24));
// Register filter
registerFilter('reset', 'CLEANUP_DNS_CACHE', false, true, isExtensionDryRun());
break;
case '0.7.6': // SQL queries for v0.7.6
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `last_month` `last_month` TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `last_week` `last_week` TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00");
+ addConfigChangeSql('last_month', 'last_month', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+ addConfigChangeSql('last_week', 'last_week', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Spaltentyp fuer kleine Zahlen sollten auch z.B. TINYINT sein.");
$GLOBALS['language'] = (string) $language;
}
+// Checks wether current language is set
+function isCurrentLanguageSet () {
+ return (isset($GLOBALS['language']));
+}
+
// "Getter" for language
function getLanguage () {
// Do we have cache?
- if (!isset($GLOBALS['language'])) {
+ if (!isCurrentLanguageSet()) {
// Default is 'de'. DO NOT CHANGE THIS!!!
$ret = 'de';
} // END - if
// Is the variable set
- if (isGetRequestParameterSet('mx_lang')) {
+ if (isGetRequestParameterSet('mailer_lang')) {
// Accept only first 2 chars
- $ret = substr(getRequestParameter('mx_lang'), 0, 2);
- } elseif (isset($GLOBALS['language'])) {
+ $ret = substr(getRequestParameter('mailer_lang'), 0, 2);
+ } elseif (isCurrentLanguageSet()) {
// Use cached
$ret = getCurrentLanguage();
- } elseif (isSessionVariableSet('mx_lang')) {
+ } elseif (isSessionVariableSet('mailer_lang')) {
// Return stored value from cookie
- $ret = getSession('mx_lang');
+ $ret = getSession('mailer_lang');
- // Fixes a warning before the session has the mx_lang constant
+ // Fixes a warning before the session has the mailer_lang constant
if (empty($ret)) {
$ret = getDefaultLanguage();
} // END - if
$lang = substr(secureString($lang), 0, 2);
// Set cookie
- setSession('mx_lang', $lang);
+ setSession('mailer_lang', $lang);
}
// Checks wether a language file is there for optional extension
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-//if (isInstallationPhase()) return;
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
+}
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('foo')) && ($GLOBALS['cache_instance']->extensionVersionMatches('foo'))) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
+}
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('admin')) && ($GLOBALS['cache_instance']->extensionVersionMatches('admins'))) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
}
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
// Next cached table is the configuration (config)...
if (($GLOBALS['cache_instance']->loadCacheFile('config')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load config from cache
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
+}
// Next cached table is the extension
if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
+}
// Next cached table is the filteruration (filter)...
if (($GLOBALS['cache_instance']->loadCacheFile('filter')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
} elseif (!isExtensionInstalled('imprint')) {
// Not not cache if not installed!
return;
}
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
// Let's start with the admins table...
if (($GLOBALS['cache_instance']->loadCacheFile('imprint')) && ($GLOBALS['cache_instance']->extensionVersionMatches('imprint'))) {
// Load cache
// Some security stuff...
if (!defined('__SECURITY')) {
die();
-} // END - if
-
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
+}
// Next cached table is the module registry (mod_reg)...
if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Some security stuff...
if (!defined('__SECURITY')) {
die();
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
}
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
// Next cached table is the referal system (refdepths)...
if (($GLOBALS['cache_instance']->loadCacheFile('refdepths')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load referal system from cache
// Some security stuff...
if (!defined('__SECURITY')) {
die();
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
}
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
// Next cached table is the referal system (refsystem)...
if (($GLOBALS['cache_instance']->loadCacheFile('refsystem')) && ($GLOBALS['cache_instance']->extensionVersionMatches('sql_patches'))) {
// Load referal system from cache
// Some security stuff...
if (!defined('__SECURITY')) {
die();
+} elseif (isInstallationPhase()) {
+ // Use this code if you don't want to run this cache loader on installation phase
+ return;
} elseif (!isExtensionActive('theme')) {
// Skip this loader
return false;
}
-// Use this code if you don't want to run this cache loader on installation phase
-if (isInstallationPhase()) return;
-
// Next cached table is the referal system (themes)...
if (($GLOBALS['cache_instance']->loadCacheFile('themes')) && ($GLOBALS['cache_instance']->extensionVersionMatches('theme'))) {
// Load referal system from cache