diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-16 13:06:06 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-10-16 13:06:06 +0200 |
commit | 3adbdc2a83e6b77a4ca62094c5d857524e39d211 (patch) | |
tree | 5e6dd92c7e47edeb4f2917f7718ad7ad7113e23f /plugins/archiveorg | |
parent | 7f5250421be4832b9679d8140bc4a71c8005dfa3 (diff) | |
download | Shaarli-3adbdc2a83e6b77a4ca62094c5d857524e39d211.tar.gz Shaarli-3adbdc2a83e6b77a4ca62094c5d857524e39d211.tar.zst Shaarli-3adbdc2a83e6b77a4ca62094c5d857524e39d211.zip |
Inject ROOT_PATH in plugin instead of regenerating it everywhere
Diffstat (limited to 'plugins/archiveorg')
-rw-r--r-- | plugins/archiveorg/archiveorg.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/archiveorg/archiveorg.php b/plugins/archiveorg/archiveorg.php index a7b595e1..ed271532 100644 --- a/plugins/archiveorg/archiveorg.php +++ b/plugins/archiveorg/archiveorg.php | |||
@@ -17,8 +17,7 @@ use Shaarli\Plugin\PluginManager; | |||
17 | function hook_archiveorg_render_linklist($data) | 17 | function hook_archiveorg_render_linklist($data) |
18 | { | 18 | { |
19 | $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html'); | 19 | $archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html'); |
20 | $rootPath = preg_replace('#/index\.php$#', '', $data['_BASE_PATH_'] ?? ''); | 20 | $path = ($data['_ROOT_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH; |
21 | $path = $rootPath . '/' . PluginManager::$PLUGINS_PATH; | ||
22 | 21 | ||
23 | foreach ($data['links'] as &$value) { | 22 | foreach ($data['links'] as &$value) { |
24 | $isNote = startsWith($value['real_url'], '/shaare/'); | 23 | $isNote = startsWith($value['real_url'], '/shaare/'); |