diff options
author | ArthurHoaro <arthur@hoa.ro> | 2016-06-09 20:04:32 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2016-06-11 09:30:56 +0200 |
commit | 51def0d84955c7a951bd091eb5eeb3fce9deabd4 (patch) | |
tree | 466c24f215ee4d25bdcce67100b11e2fd3b0c78b /plugins/readityourself/readityourself.php | |
parent | 278d9ee2836df7d805845077f26f8cecd16f0f4f (diff) | |
download | Shaarli-51def0d84955c7a951bd091eb5eeb3fce9deabd4.tar.gz Shaarli-51def0d84955c7a951bd091eb5eeb3fce9deabd4.tar.zst Shaarli-51def0d84955c7a951bd091eb5eeb3fce9deabd4.zip |
PluginManager no longer uses singleton pattern
Diffstat (limited to 'plugins/readityourself/readityourself.php')
-rw-r--r-- | plugins/readityourself/readityourself.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/readityourself/readityourself.php b/plugins/readityourself/readityourself.php index 9ca73e01..4bfcf501 100644 --- a/plugins/readityourself/readityourself.php +++ b/plugins/readityourself/readityourself.php | |||
@@ -8,24 +8,22 @@ | |||
8 | // it seems kinda dead. | 8 | // it seems kinda dead. |
9 | // Not tested. | 9 | // Not tested. |
10 | 10 | ||
11 | $conf = ConfigManager::getInstance(); | ||
12 | $riyUrl = $conf->get('plugins.READITYOUSELF_URL'); | 11 | $riyUrl = $conf->get('plugins.READITYOUSELF_URL'); |
13 | if (empty($riyUrl)) { | 12 | if (empty($riyUrl)) { |
14 | $GLOBALS['plugin_errors'][] = 'Readityourself plugin error: '. | 13 | $GLOBALS['plugin_errors'][] = 'Readityourself plugin error: '. |
15 | 'Please define "$GLOBALS[\'plugins\'][\'READITYOUSELF_URL\']" '. | 14 | 'Please define the "READITYOUSELF_URL" setting in the plugin administration page.'; |
16 | 'in "plugins/readityourself/config.php" or in your Shaarli config.php file.'; | ||
17 | } | 15 | } |
18 | 16 | ||
19 | /** | 17 | /** |
20 | * Add readityourself icon to link_plugin when rendering linklist. | 18 | * Add readityourself icon to link_plugin when rendering linklist. |
21 | * | 19 | * |
22 | * @param mixed $data - linklist data. | 20 | * @param mixed $data Linklist data. |
21 | * @param ConfigManager $conf Configuration Manager instance. | ||
23 | * | 22 | * |
24 | * @return mixed - linklist data with readityourself plugin. | 23 | * @return mixed - linklist data with readityourself plugin. |
25 | */ | 24 | */ |
26 | function hook_readityourself_render_linklist($data) | 25 | function hook_readityourself_render_linklist($data, $conf) |
27 | { | 26 | { |
28 | $conf = ConfigManager::getInstance(); | ||
29 | $riyUrl = $conf->get('plugins.READITYOUSELF_URL'); | 27 | $riyUrl = $conf->get('plugins.READITYOUSELF_URL'); |
30 | if (empty($riyUrl)) { | 28 | if (empty($riyUrl)) { |
31 | return $data; | 29 | return $data; |