[testdrive] Add addon config
- Update mentions of .htconfig.php
This commit is contained in:
parent
9cc5f29dad
commit
9f0a441fe4
|
@ -7,10 +7,10 @@ test bed.
|
||||||
|
|
||||||
When an account is created on the site, it is given a hard expiration date of
|
When an account is created on the site, it is given a hard expiration date of
|
||||||
|
|
||||||
|
[testdrive]
|
||||||
|
expiredays = 30
|
||||||
|
|
||||||
$a->config['testdrive']['expiredays'] = 30;
|
Set this in your config/local.ini.php file to allow a 30 day test drive period. By default no expiration period is defined
|
||||||
|
|
||||||
Set this in your .htconfig.php file to allow a 30 day test drive period. By default no expiration period is defined
|
|
||||||
in case the addon is activated accidentally.
|
in case the addon is activated accidentally.
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,4 +20,3 @@ a limited use test site.
|
||||||
|
|
||||||
An email warning will be sent out approximately five days before the expiration occurs. Once it occurs logins and many
|
An email warning will be sent out approximately five days before the expiration occurs. Once it occurs logins and many
|
||||||
system functions are disabled. Five days later the account is removed completely.
|
system functions are disabled. Five days later the account is removed completely.
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<?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/local.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
|
|
@ -14,6 +14,7 @@ use Friendica\Util\DateTimeFormat;
|
||||||
|
|
||||||
function testdrive_install() {
|
function testdrive_install() {
|
||||||
|
|
||||||
|
Addon::registerHook('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
|
||||||
Addon::registerHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
Addon::registerHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
||||||
Addon::registerHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
Addon::registerHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
||||||
Addon::registerHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
Addon::registerHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
||||||
|
@ -24,6 +25,7 @@ function testdrive_install() {
|
||||||
|
|
||||||
function testdrive_uninstall() {
|
function testdrive_uninstall() {
|
||||||
|
|
||||||
|
Addon::unregisterHook('load_config', 'addon/testdrive/testdrive.php', 'testdrive_load_config');
|
||||||
Addon::unregisterHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
Addon::unregisterHook('register_account', 'addon/testdrive/testdrive.php', 'testdrive_register_account');
|
||||||
Addon::unregisterHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
Addon::unregisterHook('cron', 'addon/testdrive/testdrive.php', 'testdrive_cron');
|
||||||
Addon::unregisterHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
Addon::unregisterHook('enotify','addon/testdrive/testdrive.php', 'testdrive_enotify');
|
||||||
|
@ -31,6 +33,11 @@ function testdrive_uninstall() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testdrive_load_config(\Friendica\App $a)
|
||||||
|
{
|
||||||
|
$a->loadConfigFile(__DIR__. '/config/testdrive.ini.php');
|
||||||
|
}
|
||||||
|
|
||||||
function testdrive_globaldir_update($a,&$b) {
|
function testdrive_globaldir_update($a,&$b) {
|
||||||
$b['url'] = '';
|
$b['url'] = '';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user