X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=4cd9373bec8338167d3e97019aadd59a7a490d38;hp=0ae32cc285d5ae0374d50b71a14a1f7937b22027;hb=155492a5b96cec674846973a8524238b0365a848;hpb=da5c63bacddced77a951cbe7b223f314885a6c87 diff --git a/inc/functions.php b/inc/functions.php index 0ae32cc285..4cd9373bec 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1688,9 +1688,9 @@ function doShutdown () { runFilterChain('shutdown', NULL); // Check if link is up - if (SQL_IS_LINK_UP()) { + if (isSqlLinkUp()) { // Close link - SQL_CLOSE(__FUNCTION__, __LINE__); + sqlCloseLink(__FUNCTION__, __LINE__); } elseif (!isInstallationPhase()) { // No database link reportBug(__FUNCTION__, __LINE__, 'Database link is already down, while shutdown is running.'); @@ -1889,7 +1889,7 @@ function mapModuleToTable ($moduleName) { // Map only these, still lame code... switch ($moduleName) { case 'index': // 'index' is the guest's menu - $moduleName = 'guest'; + $moduleName = 'guest'; break; case 'login': // ... and 'login' the member's menu @@ -1909,7 +1909,7 @@ function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { // Check it and cache it in $GLOBALS $GLOBALS['debug_sql_available'] = ((isConfigurationLoaded()) && (isDisplayDebugSqlEnabled())); } // END - if - + // Don't execute anything here if we don't need or ext-other is missing if ($GLOBALS['debug_sql_available'] === FALSE) { return; @@ -1926,8 +1926,8 @@ function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { // Generate record $record = array( - 'num_rows' => SQL_NUMROWS($result), - 'affected' => SQL_AFFECTEDROWS(), + 'num_rows' => sqlNumRows($result), + 'affected' => sqlAffectedRows(), 'sql_str' => $sqlString, 'timing' => $timing, 'file' => basename($F), @@ -2210,7 +2210,7 @@ function generateAdminMailLinks ($mailType, $mailId) { // Is the mail type supported? if (!empty($table)) { // Query for the mail - $result = SQL_QUERY_ESC("SELECT `id`, `%s` AS `mail_status` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `id`=%s LIMIT 1", + $result = sqlQueryEscaped("SELECT `id`, `%s` AS `mail_status` FROM `{?_MYSQL_PREFIX?}_%s` WHERE `id`=%s LIMIT 1", array( $statusColumn, $table, @@ -2218,9 +2218,9 @@ function generateAdminMailLinks ($mailType, $mailId) { ), __FILE__, __LINE__); // Is there one entry there? - if (SQL_NUMROWS($result) == 1) { + if (sqlNumRows($result) == 1) { // Load the entry - $content = SQL_FETCHARRAY($result); + $content = sqlFetchArray($result); // Add output and type $content['type'] = $mailType; @@ -2234,7 +2234,7 @@ function generateAdminMailLinks ($mailType, $mailId) { } // END - if // Free result - SQL_FREERESULT($result); + sqlFreeResult($result); } // END - if // Return generated HTML code @@ -2447,7 +2447,7 @@ function memberAddEntries ($tableName, $columns = array(), $filterFunctions = ar doGenericAddEntries($tableName, $columns, $filterFunctions, $extraValues, $timeColumns, $columnIndex); // Entry has been added? - if ((!SQL_HASZEROAFFECTED()) && ($GLOBALS['__XML_PARSE_RESULT'] === TRUE)) { + if ((!ifSqlHasZeroAffectedRows()) && ($GLOBALS['__XML_PARSE_RESULT'] === TRUE)) { // Display success message displayMessage('{--MEMBER_ENTRY_ADDED--}'); } else { @@ -2529,7 +2529,7 @@ function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunc displayMessage('{--MEMBER_ALL_ENTRIES_REMOVED--}'); } else { // Some are still there :( - displayMessage(sprintf(getMessage('MEMBER_SOME_ENTRIES_NOT_DELETED'), SQL_AFFECTEDROWS(), countPostSelection($idColumn[0]))); + displayMessage(sprintf(getMessage('MEMBER_SOME_ENTRIES_NOT_DELETED'), sqlAffectedRows(), countPostSelection($idColumn[0]))); } } else { // List for deletion confirmation @@ -2635,7 +2635,7 @@ function getArrayFromArrayIndex ($array, $key) { /** * Compress given data and encodes it into BASE64 to be stored in database with - * SQL_QUERY_ESC() + * sqlQueryEscaped() * * @param $data Data to be compressed and encoded * @return $data Compressed+encoded data