| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: simple_paypal.install,v 1.1 2008/10/01 21:59:37 kbahey Exp $ 3 4 /** 5 * Check that the cURL extension exists for PHP. 6 */ 7 function simple_paypal_requirements($phase) { 8 $requirements = array(); 9 $t = get_t(); 10 11 $has_curl = function_exists('curl_init'); 12 13 switch ($phase) { 14 case 'runtime': 15 $requirements['simple_paypal'] = array( 16 'title' => $t('cURL'), 17 'value' => $has_curl ? $t('Enabled') : $t('Not found'), 18 'severity' => $has_curl ? REQUIREMENT_OK : REQUIREMENT_ERROR, 19 ); 20 break; 21 case 'install': 22 if ($has_curl) { 23 $requirements['simple_paypal'] = array( 24 'title' => $t('cURL'), 25 'severity' => REQUIREMENT_OK, 26 ); 27 } 28 else { 29 $requirements['simple_paypal'] = array( 30 'title' => $t('cURL'), 31 'severity' => REQUIREMENT_ERROR, 32 'description' => $t('Simple Paypal could not be installed because the PHP <a href="!curl_url">cURL</a> library is not available.', array('!curl_url' => 'http://php.net/manual/en/curl.setup.php')), 33 ); 34 } 35 break; 36 } 37 38 return $requirements; 39 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |