Changeset 98229 in spip-zone for _dev_


Ignore:
Timestamp:
Jun 7, 2016, 8:11:06 AM (3 years ago)
Author:
cedric@…
Message:

eviter une erreur fatale en collision de http://php.net/manual/en/function.geoip-country-code-by-name.php

Location:
_dev_/univers_spip
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _dev_/univers_spip/geoip/geoip.php

    r38334 r98229  
    367367  return geoip_country_id_by_addr($gi, $addr);
    368368}
    369 
    370 function geoip_country_code_by_name($gi, $name) {
    371   $country_id = geoip_country_id_by_name($gi,$name);
    372   if ($country_id !== false) {
    373         return $gi->GEOIP_COUNTRY_CODES[$country_id];
    374   }
    375   return false;
     369if (!function_exists('geoip_country_code_by_name')){
     370  function geoip_country_code_by_name($gi, $name) {
     371    $country_id = geoip_country_id_by_name($gi,$name);
     372    if ($country_id !== false) {
     373          return $gi->GEOIP_COUNTRY_CODES[$country_id];
     374    }
     375    return false;
     376  }
    376377}
    377378
  • _dev_/univers_spip/plugin.xml

    r98106 r98229  
    44        <licence>GPL</licence>
    55        <etat>test</etat>
    6         <version>0.2.20</version>
     6        <version>0.2.21</version>
    77        <version_base>0.1.9</version_base>
    88        <install>base/univers.php</install>
Note: See TracChangeset for help on using the changeset viewer.