Inject ROOT_PATH in plugin instead of regenerating it everywhere
This commit is contained in:
parent
7f5250421b
commit
3adbdc2a83
7 changed files with 14 additions and 9 deletions
plugins/archiveorg
|
@ -17,8 +17,7 @@ use Shaarli\Plugin\PluginManager;
|
|||
function hook_archiveorg_render_linklist($data)
|
||||
{
|
||||
$archive_html = file_get_contents(PluginManager::$PLUGINS_PATH . '/archiveorg/archiveorg.html');
|
||||
$rootPath = preg_replace('#/index\.php$#', '', $data['_BASE_PATH_'] ?? '');
|
||||
$path = $rootPath . '/' . PluginManager::$PLUGINS_PATH;
|
||||
$path = ($data['_ROOT_PATH_'] ?? '') . '/' . PluginManager::$PLUGINS_PATH;
|
||||
|
||||
foreach ($data['links'] as &$value) {
|
||||
$isNote = startsWith($value['real_url'], '/shaare/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue