X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Freadityourself%2Freadityourself.php;h=961c5bda0c2f79347e9e69e63d4eedfde776c6cb;hb=8406a4b670957b7d0450f6ea5e4f2e61c7114e8f;hp=4bfcf50115c98211743539850bb6606ecbd1b318;hpb=51def0d84955c7a951bd091eb5eeb3fce9deabd4;p=github%2Fshaarli%2FShaarli.git diff --git a/plugins/readityourself/readityourself.php b/plugins/readityourself/readityourself.php index 4bfcf501..961c5bda 100644 --- a/plugins/readityourself/readityourself.php +++ b/plugins/readityourself/readityourself.php @@ -8,10 +8,21 @@ // it seems kinda dead. // Not tested. -$riyUrl = $conf->get('plugins.READITYOUSELF_URL'); -if (empty($riyUrl)) { - $GLOBALS['plugin_errors'][] = 'Readityourself plugin error: '. - 'Please define the "READITYOUSELF_URL" setting in the plugin administration page.'; +/** + * Init function, return an error if the server is not set. + * + * @param $conf ConfigManager instance. + * + * @return array Eventual error. + */ +function readityourself_init($conf) +{ + $riyUrl = $conf->get('plugins.READITYOUSELF_URL'); + if (empty($riyUrl)) { + $error = 'Readityourself plugin error: '. + 'Please define the "READITYOUSELF_URL" setting in the plugin administration page.'; + return array($error); + } } /**