X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fyoomedia_functions.php;h=ff7b85a9b81310d10230f8be74aa23761998d25b;hb=56931cd9321119dd37372bd16d6c552857e40066;hp=5ee18e176610bcff4d93a451de2ea71cee5594f2;hpb=682edce003a1a91f66fb8e2212d7fdb591379843;p=mailer.git diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 5ee18e1766..ff7b85a9b8 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -160,17 +160,7 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) { $result = array(); // Cut off the header - $dummy = $response; - foreach ($response as $line) { - // Remove line - array_shift($dummy); - - // Is this line empty? - if (empty($line)) { - // Then stop here - break; - } // END - if - } // END - foreach + $dummy = removeHttpHeaderFromResponse($response); // If we have no result, abort here if (count($dummy) == 0) { @@ -183,7 +173,9 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) { $responseLine = trim(implode("\n", $dummy)); // Last line should never be a pipe! - if (substr($responseLine, -1, 1) == '|') $responseLine = substr($responseLine, 0, -1); + if (substr($responseLine, -1, 1) == '|') { + $responseLine = substr($responseLine, 0, -1); + } // END - if // Now, explode all in one array $dataArray = explode('|', $responseLine); @@ -273,7 +265,7 @@ function YOOMEDIA_EXCLUDE_MAIL ($data, $mode) { $mode = YOOMEDIA_CONVERT_MODE($mode); // Add the entry - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_yoomedia_reload` (`type`,`y_id`,`y_reload`,`inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_yoomedia_reload` (`type`, `y_id`, `y_reload`, `inserted`) VALUES ('%s',%s,%s,'0000-00-00 00:00')", array( $mode, bigintval($data['id']), @@ -302,8 +294,8 @@ function yoomediaTranslateIndex ($type, $index) { // Use this element $return = $GLOBALS['translation_tables']['yoomedia'][$type][$index]; } else { - // Not found! - logDebugMessage(__FUNCTION__, __LINE__, "type={$type},index={$index} not found."); + // Not found + logDebugMessage(__FUNCTION__, __LINE__, 'type=' . $type . ',index=' . $index . ' not found'); } // Return value @@ -317,7 +309,7 @@ function translateYooMediaError ($errorCode) { // Is the entry there? if (isset($GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode])) { - // Entry found! + // Entry found $return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode]; } else { // Log missing entries @@ -368,7 +360,7 @@ function YOOMEDIA_RELOAD_LOCK ($data, $mode) { $mode = YOOMEDIA_CONVERT_MODE($mode); // Add the entry - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_yoomedia_reload` (`type`,`y_id`,`y_reload`) VALUES ('%s',%s,%s)", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_yoomedia_reload` (`type`, `y_id`, `y_reload`) VALUES ('%s',%s,%s)", array($mode, bigintval($data['id']), bigintval($data['reload'])), __FUNCTION__, __LINE__); } // END - if }