+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('sql_patches', '0.0.7')) && (getConfig('verbose_sql') == 'Y'));
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// "Getter" for total user points
+function getTotalPoints ($userid) {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$userid])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - countSumTotalData($userid, 'user_data', 'used_points');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__][$userid];
+}
+
+// Wrapper to check if url_blacklist is enabled
+function isUrlBlacklistEnabled () {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getConfig('url_blacklist') == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Checks wether direct payment is allowed in configuration
+function isDirectPaymentEnabled () {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__] = (getConfig('allow_direct_pay') == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__];
+}
+
+// Wrapper to check if current task is for extension (not update)
+function isExtensionTask ($content) {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$content['task_type'] . '_' . $content['infos']])) {
+ // Determine it
+ $GLOBALS[__FUNCTION__][$content['task_type'] . '_' . $content['infos']] = (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos'])));
+ } // END - if
+
+ // Return cache
+ return $GLOBALS[__FUNCTION__][$content['task_type'] . '_' . $content['infos']];
+}
+
+// Wrapper to check if output mode is CSS
+function isCssOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == 1);
+}
+
+// Wrapper to check if output mode is HTML
+function isHtmlOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == 0);
+}
+
+// Wrapper to check if output mode is RAW
+function isRawOutputMode () {
+ // Determine it
+ return (getScriptOutputMode() == -1);
+}
+
+// Wrapper to generate a user email link
+function generateWrappedUserEmailLink ($email) {
+ // Just call the inner function
+ return generateEmailLink($email, 'user_data');
+}
+
+// Wrapper to check if user points are locked
+function ifUserPointsLocked ($userid) {
+ // Do we have cache?
+ if (!isset($GLOBALS[__FUNCTION__][$userid])) {