* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
$errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response);
// Log the response if failed
- if (count($response) == '0') {
+ if (count($response) == 0) {
// Queries depleted (as we count here!)
logDebugMessage(__FUNCTION__, __LINE__, 'Requested depleted. Maxmimum was: ' . getConfig('yoomedia_requests_total'));
$errorCode = -1;
// Is the reward below one?
if ($data['reward'] < 1) $data['reward'] = 1;
- // Add website id
- $data['sid'] = getConfig('yoomedia_sid');
-
- // Add total receivers
- $data['all'] = translateComma(getTotalReceivers());
-
- // Add categories
- $data['categories'] = generateCategoryOptionsList('normal');
-
- // Decode entities
- $data['text'] = decodeEntities($data['text']);
-
// Load template
loadTemplate('admin_send_yoomedia', false, $data);
}
$return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode];
} else {
// Log missing entries
- debug_report_bug(sprintf("Unknown error code <strong>%s</strong> detected.", $errorCode));
+ debug_report_bug(__FUNCTION__, __LINE__, sprintf("Unknown error code <strong>%s[%s]</strong> detected.", $errorCode, gettype($errorCode)));
}
// Return value
if (((time() - $time) >= ($reload * 60*60)) && ($time > 0)) {
// Remove entry
SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_yoomedia_reload` WHERE `id`=%s LIMIT 1",
- array($id), __FUNCTION__, __LINE__);
+ array($id), __FUNCTION__, __LINE__);
} else {
// Dont' sent again this mail
$reloaded = $time;
// Remove carrige-return
$code = str_replace("\n", '', $code);
+
} else {
// Should not happen!
- debug_report_bug('Cannot parse response. Raw response:<pre>' . print_r($response, true) . '</pre>');
+ debug_report_bug(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response:<pre>' . print_r($response, true) . '</pre>');
}
+ // Fix empty code to bad
+ if (empty($code)) {
+ $code = -999;
+ } // END - if
+
// Return error code
return $code;
}