unset($GLOBALS['ref_level']);
// Call more complicated method (due to more parameters)
- return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, false, 'direct');
+ return addPointsThroughReferalSystem($subject, $userid, $points, false, 0, 'direct');
}
// Wrapper for redirectToUrl but URL comes from a configuration entry
return $GLOBALS['is_url_blacklist_enabled'];
}
+// Checks wether direct payment is allowed in configuration
+function isDirectPaymentAllowed () {
+ // Do we have cache?
+ if (!isset($GLOBALS['is_direct_payment_allowed'])) {
+ // Determine it
+ $GLOBALS['is_direct_payment_allowed'] = (getConfig('allow_direct_pay') == 'Y');
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['is_direct_payment_allowed'];
+}
+
+// Wrapper to check if current task is for extension (not update)
+function isExtensionTask ($content) {
+ // Do we have cache?
+ if (!isset($GLOBALS['is_extension_task'][$content['task_type'] . '_' . $content['infos']])) {
+ // Determine it
+ $GLOBALS['is_extension_task'][$content['task_type'] . '_' . $content['infos']] = (($content['task_type'] == 'EXTENSION') && (isExtensionNameValid($content['infos'])) && (!isExtensionInstalled($content['infos'])));
+ } // END - if
+
+ // Return cache
+ return $GLOBALS['is_extension_task'][$content['task_type'] . '_' . $content['infos']];
+}
+
// [EOF]
?>