forked from friendica/friendica-addons
cookienotice addon - added default values for config data
This commit is contained in:
parent
15b0b67dc8
commit
145fb69eb6
1 changed files with 4 additions and 11 deletions
|
@ -7,7 +7,6 @@
|
||||||
* Author: Peter Liebetrau <https://socivitas/profile/peerteer>
|
* Author: Peter Liebetrau <https://socivitas/profile/peerteer>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
use Friendica\Core\Addon;
|
|
||||||
use Friendica\Core\Hook;
|
use Friendica\Core\Hook;
|
||||||
use Friendica\Core\Config;
|
use Friendica\Core\Config;
|
||||||
use Friendica\Core\L10n;
|
use Friendica\Core\L10n;
|
||||||
|
@ -63,14 +62,8 @@ function cookienotice_addon_settings(\Friendica\App $a, &$s)
|
||||||
$stylesheetPath = 'addon/cookienotice/cookienotice.css';
|
$stylesheetPath = 'addon/cookienotice/cookienotice.css';
|
||||||
$a->registerStylesheet($stylesheetPath);
|
$a->registerStylesheet($stylesheetPath);
|
||||||
|
|
||||||
$text = Config::get('cookienotice', 'text');
|
$text = Config::get('cookienotice', 'text', L10n::t('This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.'));
|
||||||
if (!$text) {
|
$oktext = Config::get('cookienotice', 'oktext', L10n::t('OK'));
|
||||||
$text = '';
|
|
||||||
}
|
|
||||||
$oktext = Config::get('cookienotice', 'oktext');
|
|
||||||
if (!$oktext) {
|
|
||||||
$oktext = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/cookienotice/");
|
$t = Renderer::getMarkupTemplate("settings.tpl", "addon/cookienotice/");
|
||||||
$s .= Renderer::replaceMacros($t, [
|
$s .= Renderer::replaceMacros($t, [
|
||||||
|
|
Loading…
Reference in a new issue