ip2country.inc is a set of procedural functions for managing the ip2country database:

function ip2country_update_database($registry = 'arin')
function ip2country_empty_database()
function _ip2country_fetch_page($url)

Additional procedural functions are found in ip2country.module - these are intended to be part of the module's API:

function ip2country_get_country($ip_address)
function ip2country_get_count()

The purpose of this issue is to put this functionality into services and mark the procedural functions as deprecated.

The services I propose are the ip2country.lookup service, to handle the ip2country_get_country() API function, and the ip2country.manager service to handle the other four functions.

Comments

TR created an issue. See original summary.

tr’s picture

Status: Active » Needs review
StatusFileSize
new37.77 KB

Patch.

tr’s picture

StatusFileSize
new37.82 KB

A few coding standards.

  • TR committed 2cbe493 on 8.x-1.x
    Issue #3076484 by TR: Refactor procedural code into ip2country.manager...
tr’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.