]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Now non-productive extensions cant be quick-registered any longer (but still installa...
[mailer.git] / inc / wrapper-functions.php
index 036a89b0046f9efa308bd4f9142d422816e752b6..b101e22c8f9632b9575fd889ff8e0f80dcc09227 100644 (file)
@@ -682,7 +682,7 @@ function addPointsDirectly ($subject, $userid, $points) {
        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
@@ -1874,5 +1874,29 @@ function isUrlBlacklistEnabled () {
        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]
 ?>