X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-manager.php;h=c1a2bb4607c092ae81f458e92428cf27f6ee482a;hb=d7d40e177e09a7161b79bfc95a1d2e91fdff4691;hp=fd5fa60bc9b39444df044191925e97d07a10e5b4;hpb=5ab0d021f3e96722af5d96d2b9036430200c06cb;p=mailer.git diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index fd5fa60bc9..c1a2bb4607 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -843,6 +843,8 @@ function getActionFromModuleWhat ($module, $what) { $module, $what ), __FUNCTION__, __LINE__); + + // Entry found? if (SQL_NUMROWS($result) == 1) { // Load action value and pray that this one is the right you want... ;-) $data = SQL_FETCHARRAY($result); @@ -901,8 +903,26 @@ function getPaymentTitlePrice ($paymentsId, $full = FALSE) { return $ret; } +// Get payment price +function getPaymentPrice ($paymentsId) { + // Return result + return getPaymentData($paymentsId, 'price'); +} + +// Get payment time +function getPaymentTime ($paymentsId) { + // Return result + return getPaymentData($paymentsId, 'time'); +} + +// Get payment 'payment' +function getPaymentPayment ($paymentsId) { + // Return result + return getPaymentData($paymentsId, 'payment'); +} + // "Getter" for payment data (cached) -function getPaymentData ($paymentsId, $lookFor = 'price') { +function getPaymentData ($paymentsId, $lookFor) { // Default value... $data[$lookFor] = NULL; @@ -980,8 +1000,7 @@ function removeReceiver (&$receivers, $key, $userid, $poolId, $statsId = 0, $isB // Update 'mails_sent' if ext-sql_patches is updated if (isExtensionInstalledAndNewer('sql_patches', '0.7.4')) { // Update the pool - SQL_QUERY_ESC('UPDATE `{?_MYSQL_PREFIX?}_pool` SET `mails_sent`=`mails_sent`+1 WHERE `id`=%s LIMIT 1', - array(bigintval($poolId)), __FUNCTION__, __LINE__); + updatePoolDataById($poolId, 'mails_sent', 1, '+'); } // END - if $ret = 'done'; } else { @@ -1874,7 +1893,7 @@ function createNewTask ($subject, $notes, $taskType, $userid = NULL, $adminId = ), __FUNCTION__, __LINE__, TRUE, $strip); // Return insert id which is the task id - return SQL_INSERTID(); + return SQL_INSERT_ID(); } // Updates last module / online time @@ -2111,14 +2130,14 @@ function doGenericAddEntries ($tableName, $columns = array(), $filterFunctions = SQL_QUERY($sql, __FUNCTION__, __LINE__); // Add id number - setPostRequestElement('id', SQL_INSERTID()); + setPostRequestElement('id', SQL_INSERT_ID()); // Prepare filter data array $filterData = array( 'mode' => 'add', 'table_name' => $tableName, 'content' => postRequestArray(), - 'id' => SQL_INSERTID(), + 'id' => SQL_INSERT_ID(), 'subject' => '', // @TODO Used generic 'userid' here 'userid_column' => array('userid'), @@ -2264,11 +2283,8 @@ function doGenericEditEntriesConfirm ($tableName, $columns = array(), $filterFun continue; } // END - if - // Is the cache file loadable? - if ($GLOBALS['cache_instance']->loadCacheFile($cache)) { - // Then remove it - $GLOBALS['cache_instance']->removeCacheFile(); - } // END - if + // Use rebuildCache() to delete it + rebuildCache($cache); } // END - foreach } // END - if