X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=plugins%2Freadityourself%2Freadityourself.php;h=961c5bda0c2f79347e9e69e63d4eedfde776c6cb;hb=baec9c402873a716497b591b9756bf5b2c46ed9b;hp=4bfcf50115c98211743539850bb6606ecbd1b318;hpb=b3c039b02f9608802d0ba2cf5b5742caa3b9d430;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); + } } /**