X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fyoomedia_functions.php;h=ff7b85a9b81310d10230f8be74aa23761998d25b;hb=56931cd9321119dd37372bd16d6c552857e40066;hp=814db3dbb49044f56dea68c8246dce95f6980e37;hpb=c4823d28fd0bd22250b16d73f2034f36fc54abda;p=mailer.git diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 814db3dbb4..ff7b85a9b8 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -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']), @@ -303,7 +295,7 @@ function yoomediaTranslateIndex ($type, $index) { $return = $GLOBALS['translation_tables']['yoomedia'][$type][$index]; } else { // Not found - logDebugMessage(__FUNCTION__, __LINE__, "type={$type},index={$index} not found."); + logDebugMessage(__FUNCTION__, __LINE__, 'type=' . $type . ',index=' . $index . ' not found'); } // Return value @@ -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 }