More complete rewrite to use wrapper function isExtensionInstalledAndNewer(), some...
[mailer.git] / inc / pool / pool-bonus.php
index d904d52758b135fc7c2b0b800601fac29dea639c..6276de68290a22b048c95350d8d1a6663c92cd8a 100644 (file)
@@ -124,7 +124,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                                // Count one up and remove entry from dummy array
                                                $GLOBALS['pool_cnt']++; unset($dummy[$key]);
 
-                                               if (getExtensionVersion('user') >= '0.1.4') {
+                                               if (isExtensionInstalledAndNewer('user', '0.1.4')) {
                                                        // Update mails received for receiver
                                                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `emails_received`=`emails_received`+1 WHERE `userid`=%s LIMIT 1",
                                                        array(bigintval($userid)), __FILE__, __LINE__);
@@ -141,7 +141,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                        } // END - foreach
 
                        // Update mediadata if version is 0.0.4 or higher
-                       if (getExtensionVersion('mediadata') >= '0.0.4') {
+                       if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
                                // Update entry (or add missing
                                $P = $GLOBALS['pool_cnt'];
                                if (!empty($cnt2) && empty($GLOBALS['pool_cnt'])) $P = $cnt2;
@@ -158,7 +158,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                //* DEBUG: */ print("*L:".__LINE__."*<br />");
 
                                // Update mediadata if version is 0.0.4 or higher
-                               if (getExtensionVersion('mediadata') >= '0.0.4') {
+                               if (isExtensionInstalledAndNewer('mediadata', '0.0.4')) {
                                        // Update entry (or add missing)
                                        //* DEBUG: */ print("*MEDIA/L:".__LINE__."*<br />");
                                        updateMediadataEntry(array('total_orders', 'bonus_orders'), 'add', 1);