From 38886e5cf29e77dab0d876ce3d171ce76cf26bc4 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Mon, 1 Jul 2013 15:50:24 +0200 Subject: [PATCH] Apply hook before sharing --- core/src/plugins/action.share/class.ShareCenter.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/src/plugins/action.share/class.ShareCenter.php b/core/src/plugins/action.share/class.ShareCenter.php index a8070c1391..42ee48b394 100644 --- a/core/src/plugins/action.share/class.ShareCenter.php +++ b/core/src/plugins/action.share/class.ShareCenter.php @@ -573,7 +573,9 @@ function initPublicFolder($downloadFolder){ static function loadMinisite($data){ $repository = $data["REPOSITORY"]; + AJXP_PluginsService::getInstance()->initActivePlugins(); $html = file_get_contents(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/action.share/res/minisite.php"); + AJXP_Controller::applyHook("tpl.filter_html", array(&$html)); $html = AJXP_XMLWriter::replaceAjxpXmlKeywords($html); $html = str_replace("AJXP_START_REPOSITORY", $repository, $html); $html = str_replace("AJXP_REPOSITORY_LABEL", ConfService::getRepositoryById($repository)->getDisplay(), $html); @@ -677,16 +679,22 @@ static function loadPubliclet($data) { if (!isSet($_POST['password']) || ($_POST['password'] != $data["PASSWORD"])) { + AJXP_PluginsService::getInstance()->initActivePlugins(); $AJXP_LINK_HAS_PASSWORD = true; $AJXP_LINK_WRONG_PASSWORD = (isSet($_POST['password']) && ($_POST['password'] != $data["PASSWORD"])); include (AJXP_INSTALL_PATH."/plugins/action.share/res/public_links.php"); - echo('

Build your own box with AjaXplorer : http://ajaxplorer.info/
Community - Free non supported version © C. du Jeu 2008-2013
'); + $res = ('

Build your own box with AjaXplorer : http://ajaxplorer.info/
Community - Free non supported version © C. du Jeu 2008-2013
'); + AJXP_Controller::applyHook("tpl.filter_html", array(&$res)); + echo($res); return; } }else{ if (!isSet($_GET["dl"])){ + AJXP_PluginsService::getInstance()->initActivePlugins(); include (AJXP_INSTALL_PATH."/plugins/action.share/res/public_links.php"); - echo('

Build your own box with AjaXplorer : http://ajaxplorer.info/
Community - Free non supported version © C. du Jeu 2008-2013
'); + $res = '

Build your own box with AjaXplorer : http://ajaxplorer.info/
Community - Free non supported version © C. du Jeu 2008-2013
'; + AJXP_Controller::applyHook("tpl.filter_html", array(&$res)); + echo($res); return; } }