original_string: public function isAvailable()
      {
          if (function_exists('apache_get_modules')) {
              foreach (apache_get_modules() as $name) {
                  if (strpos($name, 'maxminddb') !== false) {
                      return true;
                  }
              }
          }
  
          $settings = self::getGeoIpServerVars();
  
          $available = array_key_exists($settings[self::CONTINENT_CODE_KEY], $_SERVER)
              || array_key_exists($settings[self::COUNTRY_CODE_KEY], $_SERVER)
              || array_key_exists($settings[self::REGION_CODE_KEY], $_SERVER)
              || array_key_exists($settings[self::CITY_NAME_KEY], $_SERVER);
  
          if ($available) {
              return true;
          }
  
          // if not available return message w/ extra info
          if (!function_exists('apache_get_modules')) {
              return Piwik::translate('General_Note') . ':&nbsp;' . Piwik::translate('UserCountry_AssumingNonApache');
          }
  
          $message = "<strong>" . Piwik::translate('General_Note') . ':&nbsp;'
              . Piwik::translate('UserCountry_FoundApacheModules')
              . "</strong>:<br/><br/>\n<ul style=\"list-style:disc;margin-left:24px\">\n";
          foreach (apache_get_modules() as $name) {
              $message .= "<li>$name</li>\n";
          }
          $message .= "</ul>";
          return $message;
      }
code: public function isAvailable()
      {
          if (function_exists('apache_get_modules')) {
              foreach (apache_get_modules() as $name) {
                  if (strpos($name, 'maxminddb') !== false) {
                      return true;
                  }
              }
          }
  
          $settings = self::getGeoIpServerVars();
  
          $available = array_key_exists($settings[self::CONTINENT_CODE_KEY], $_SERVER)
              || array_key_exists($settings[self::COUNTRY_CODE_KEY], $_SERVER)
              || array_key_exists($settings[self::REGION_CODE_KEY], $_SERVER)
              || array_key_exists($settings[self::CITY_NAME_KEY], $_SERVER);
  
          if ($available) {
              return true;
          }
  
          // if not available return message w/ extra info
          if (!function_exists('apache_get_modules')) {
              return Piwik::translate('General_Note') . ':&nbsp;' . Piwik::translate('UserCountry_AssumingNonApache');
          }
  
          $message = "<strong>" . Piwik::translate('General_Note') . ':&nbsp;'
              . Piwik::translate('UserCountry_FoundApacheModules')
              . "</strong>:<br/><br/>\n<ul style=\"list-style:disc;margin-left:24px\">\n";
          foreach (apache_get_modules() as $name) {
              $message .= "<li>$name</li>\n";
          }
          $message .= "</ul>";
          return $message;
      }
code_tokens: public function isAvailable ( ) { if ( function_exists ( 'apache_get_modules' ) ) { foreach ( apache_get_modules ( ) as $ name ) { if ( strpos ( $ name , 'maxminddb' ) !== false ) { return true ; } } } $ settings = self :: getGeoIpServerVars ( ) ; $ available = array_key_exists ( $ settings [ self :: CONTINENT_CODE_KEY ] , $ _SERVER ) || array_key_exists ( $ settings [ self :: COUNTRY_CODE_KEY ] , $ _SERVER ) || array_key_exists ( $ settings [ self :: REGION_CODE_KEY ] , $ _SERVER ) || array_key_exists ( $ settings [ self :: CITY_NAME_KEY ] , $ _SERVER ) ; if ( $ available ) { return true ; } // if not available return message w/ extra info if ( ! function_exists ( 'apache_get_modules' ) ) { return Piwik :: translate ( 'General_Note' ) . ':&nbsp;' . Piwik :: translate ( 'UserCountry_AssumingNonApache' ) ; } $ message = "<strong>" . Piwik :: translate ( 'General_Note' ) . ':&nbsp;' . Piwik :: translate ( 'UserCountry_FoundApacheModules' ) . "</strong>:<br/><br/>\n<ul style=\"list-style:disc;margin-left:24px\">\n" ; foreach ( apache_get_modules ( ) as $ name ) { $ message .= "<li>$name</li>\n" ; } $ message .= "</ul>" ; return $ message ; }
docstring: Checks if an mod_maxminddb has been installed and MMDB_ADDR server variable is defined.
  
  There's a special check for the Apache module, but we can't check specifically
  for anything else.
  
  @return bool|string
docstring_tokens: Checks if an mod_maxminddb has been installed and MMDB_ADDR server variable is defined .