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

index ad9414e..59512ae 100644 (file)
@@ -6,10 +6,11 @@ Testdrive is a Friendica addon which implements automatic account expiration so
 
 When an account is created on the site, it is given a hard expiration date of
 
-       [testdrive]
-       expiredays = 30
+       'testdrive' => [
+               'expiredays' => 30,
+       ],
 
-Set this in your config/addon.ini.php file to allow a 30 day test drive period.
+Set this in your `config/addon.config.php` file to allow a 30 day test drive period.
 By default no expiration period is defined in case the addon is activated accidentally.
 
 There is no opportunity to extend an expired account using this addon.
diff --git a/testdrive/config/testdrive.config.php b/testdrive/config/testdrive.config.php
new file mode 100644 (file)
index 0000000..c10acf8
--- /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 [
+       'testdrive' => [
+               // expiredays (Integer)
+               // When an account is created on the site, it is given a hard expiration date of this many days. 0 to disable.
+               'expiredays' => 0,
+       ],
+];
diff --git a/testdrive/config/testdrive.ini.php b/testdrive/config/testdrive.ini.php
deleted file mode 100644 (file)
index 8d3f863..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
-
-[testdrive]
-; expiredays (Integer)
-; When an account is created on the site, it is given a hard expiration date of this many days.
-expiredays =
-
-INI;
-//Keep this line
\ No newline at end of file
index 2a65692..4da5959 100644 (file)
@@ -37,7 +37,7 @@ function testdrive_uninstall() {
 
 function testdrive_load_config(App $a)
 {
-       $a->loadConfigFile(__DIR__. '/config/testdrive.ini.php');
+       $a->loadConfigFile(__DIR__ . '/config/testdrive.config.php');
 }
 
 function testdrive_globaldir_update($a,&$b) {