[geonames] Update config file style/name
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 25 Nov 2018 07:11:53 +0000 (02:11 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 25 Nov 2018 07:11:53 +0000 (02:11 -0500)
geonames/README.md
geonames/config/geonames.config.php [new file with mode: 0644]
geonames/config/geonames.ini.php [deleted file]
geonames/geonames.php

index ba90dc5..443ddf3 100644 (file)
@@ -7,9 +7,10 @@ Use Geonames service to resolve nearest populated location for given latitude, l
 
 ## Installation
 
-Pre-requisite: Register a username at geonames.org and set in config/addon.ini.php
+Pre-requisite: Register a username at geonames.org and set in `config/addon.config.php`
 
-    [geonames]
-    username = your_username
+    'geonames' => [
+        'username' => 'your_username'
+    ],
 
 Also visit http://geonames.org/manageaccount and enable access to the free web services.
\ No newline at end of file
diff --git a/geonames/config/geonames.config.php b/geonames/config/geonames.config.php
new file mode 100644 (file)
index 0000000..6af3634
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+
+// Warning: Don't change this file! It only holds the default config values for this addon.
+// Instead overwrite these config values in config/addon.config.php in your Friendica directory
+
+return [
+       'geonames' => [
+               //username (String)
+               //The geonames.org API username
+               'username' => '',
+       ],
+];
diff --git a/geonames/config/geonames.ini.php b/geonames/config/geonames.ini.php
deleted file mode 100644 (file)
index 280e7a9..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php return <<<INI
-
-; Warning: Don't change this file! It only holds the default config values for this addon.
-; Instead overwrite these config values in config/addon.ini.php in your Friendica directory
-
-[geonames]
-; username (String)
-; The geonames.org API username
-username =
-
-INI;
-//Keep this line
\ No newline at end of file
index 709e015..552ecf5 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * Pre-requisite: Register a username at geonames.org
- * and set in config/addon.ini.php
+ * and set in config/addon.config.php
  *
  * [geonames]
  * username = your_username
@@ -78,7 +78,7 @@ function geonames_uninstall() {
 
 function geonames_load_config(\Friendica\App $a)
 {
-       $a->loadConfigFile(__DIR__. '/config/geonames.ini.php');
+       $a->loadConfigFile(__DIR__. '/config/geonames.config.php');
 }
 
 function geonames_post_hook($a, &$item) {