// Activate exchange
function FILTER_ACTIVATE_EXCHANGE () {
// Is the extension 'user' there?
- if ((!isExtensionActive('user')) || (getConfig('activate_xchange') == '0')) {
+ if ((!isExtensionActive('user')) || (getActivateXchange() == '0')) {
// Silently abort here
return false;
} // END - if
// Check total amount of users
- if (getTotalConfirmedUser() >= getConfig('activate_xchange')) {
+ if (getTotalConfirmedUser() >= getActivateXchange()) {
// Activate System
- setSqlsArray(array(
- "UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1",
- "UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' OR `what`='unconfirmed' LIMIT 2",
- ));
+ addSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1");
+ addSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' OR `what`='unconfirmed' LIMIT 2");
// Run SQLs
runFilterChain('run_sqls');
return $GLOBALS[__FUNCTION__];
}
+// "Getter" for activate_xchange
+function getActivateXchange () {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = getConfig('activate_xchange');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
// Checks wether proxy configuration is used
function isProxyUsed () {
// Do we have cache?