Compare commits
No commits in common. "master" and "v0.1.0" have entirely different histories.
3 changed files with 4 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
vendor/
|
vendor/
|
||||||
composer.lock
|
|
||||||
|
|
||||||
node_modules/
|
node_modules/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "yusurko/useragent",
|
"name": "yusurko/useragent",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"version": "0.1.2",
|
"version": "0.1.0",
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
|
|
@ -14,7 +14,5 @@
|
||||||
"email": "sakuragasaki46@gmail.com"
|
"email": "sakuragasaki46@gmail.com"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {}
|
||||||
"phpseclib/phpseclib": "^3.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -194,12 +194,9 @@ a:link, a:visited {color: #39f}
|
||||||
public function getCountry() {
|
public function getCountry() {
|
||||||
if ($this->country === null) {
|
if ($this->country === null) {
|
||||||
if ($this->locator === null) $this->locator = $this->probeLocator();
|
if ($this->locator === null) $this->locator = $this->probeLocator();
|
||||||
if ($this->locator === false) {
|
if ($this->locator === false) $this->country = Country::outerSpace();
|
||||||
$this->country = Country::outerSpace();
|
|
||||||
} else {
|
|
||||||
$this->country = $this->locator->locate($this->getAddr());
|
$this->country = $this->locator->locate($this->getAddr());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return $this->country;
|
return $this->country;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue