[phpmix-cvs] drupal/modules/akismet akismet.module,1.13,1.14
Status: Pre-Alpha
Brought to you by:
markus_petrux
From: <php...@li...> - 2006-06-10 02:19:21
|
Update of /cvsroot/phpmix/drupal/modules/akismet In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26228 Modified Files: akismet.module Log Message: Reviewed useragent strings. Index: akismet.module =================================================================== RCS file: /cvsroot/phpmix/drupal/modules/akismet/akismet.module,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** akismet.module 10 Jun 2006 01:51:37 -0000 1.13 --- akismet.module 10 Jun 2006 02:19:17 -0000 1.14 *************** *** 17,20 **** --- 17,21 ---- define('AKISMET_MODULE_VERSION', '1.0.0 beta'); define('AKISMET_MODULE_HOMEURL', 'http://www.phpmix.org/projects/drupal/4_7/akismet'); + define('AKISMET_MODULE_USERAGENT', 'phpMiX Version Checker | projects/drupal/4_7/akismet | '. AKISMET_MODULE_VERSION); *************** *** 25,29 **** define('AKISMET_API_PORT', 80); define('AKISMET_API_VERSION', '1.1'); ! define('AKISMET_USERAGENT', 'Drupal/'. AKISMET_DRUPAL_VERSION .' | akismet.module/'. AKISMET_MODULE_VERSION); define('AKISMET_API_RESULT_ERROR', -1); define('AKISMET_API_RESULT_SUCCESS', 0); --- 26,30 ---- define('AKISMET_API_PORT', 80); define('AKISMET_API_VERSION', '1.1'); ! define('AKISMET_API_USERAGENT', 'Drupal/'. AKISMET_DRUPAL_VERSION .' | akismet.module/'. AKISMET_MODULE_VERSION); define('AKISMET_API_RESULT_ERROR', -1); define('AKISMET_API_RESULT_SUCCESS', 0); *************** *** 58,62 **** if ($refresh) { $version_url = AKISMET_MODULE_HOMEURL .'/version'; ! $result = drupal_http_request($version_url, array('User-Agent' => AKISMET_USERAGENT, 'Referer' => $base_url . base_path())); if (!isset($result->code) || !in_array($result->code, array(200,302,307)) || empty($result->data)) { watchdog('version check', t('Could not check version of akismet module, due to "%error".', array('%error' => theme('placeholder', $result->code .' '. $result->error))), WATCHDOG_ERROR, l(t('check'), $version_url, array('target'=>'_blank'), NULL, NULL, TRUE)); --- 59,63 ---- if ($refresh) { $version_url = AKISMET_MODULE_HOMEURL .'/version'; ! $result = drupal_http_request($version_url, array('User-Agent' => AKISMET_MODULE_USERAGENT, 'Referer' => $base_url . base_path())); if (!isset($result->code) || !in_array($result->code, array(200,302,307)) || empty($result->data)) { watchdog('version check', t('Could not check version of akismet module, due to "%error".', array('%error' => theme('placeholder', $result->code .' '. $result->error))), WATCHDOG_ERROR, l(t('check'), $version_url, array('target'=>'_blank'), NULL, NULL, TRUE)); *************** *** 1609,1613 **** ."Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n" ."Content-Length: ". strlen($request) ."\r\n" ! ."User-Agent: ". AKISMET_USERAGENT ."\r\n" ."\r\n" .$request; --- 1610,1614 ---- ."Content-Type: application/x-www-form-urlencoded; charset=utf-8\r\n" ."Content-Length: ". strlen($request) ."\r\n" ! ."User-Agent: ". AKISMET_API_USERAGENT ."\r\n" ."\r\n" .$request; |