Skip to content

Commit

Permalink
Whoops, another fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BelleNottelling committed Jan 21, 2024
1 parent 8cf195f commit dd499ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config-sample.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
],

/**
* Use these options to override the default IP address database that FOSSBilling includes which are free of licencing and also includes ASN data rather than just country data, however it does so at a loss to accuracy.
* Use these options to override the default IP address database that FOSSBilling includes which are free of licensing and also includes ASN data rather than just country data, however it does so at a loss to accuracy.
* `custom_path` will define the local path to reference when loading the database.
* `custom_url` can be set to have FOSSBilling update a database of your choosing from the provided URL once daily.
* `included` defines what data types are included in that database. For example, the default ones for FOSSBilling would be ['country', 'asn']. This isn't strictly needed, but may be used by modules to enable / disable functionality.
Expand Down
5 changes: 3 additions & 2 deletions src/library/FOSSBilling/IPDatabase.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public static function update()
return;
}

$localDb = self::getPath(true);
$localDb = self::getPath(false, true);
if (file_exists($localDb)) {
$dbAge = time() - filemtime($localDb);
} else {
Expand Down Expand Up @@ -78,7 +78,8 @@ public static function whatIsIncluded(): array
/**
* Returns the correct path for the actively used database.
*
* @param bool $defaults Set to true to only have the default DB paths returned.
* @param bool $default set to true to only have the default DB paths returned
* @param bool $skipUpdate set to true to have the system skip trying to call our updater do download the DB if it doesn't exist
*/
public static function getPath(bool $default = false, bool $skipUpdate = false): string
{
Expand Down

0 comments on commit dd499ea

Please sign in to comment.