Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Apply hook before sharing
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 1, 2013
1 parent f37fcbd commit 38886e5
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -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);
Expand Down Expand Up @@ -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('<div style="position: absolute;z-index: 10000; bottom: 0; right: 0; color: #666;font-family: HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size: 13px;text-align: right;padding: 6px; line-height: 20px;text-shadow: 0px 1px 0px white;" class="no_select_bg"><br>Build your own box with AjaXplorer : <a style="color: #000000;" target="_blank" href="http://ajaxplorer.info/">http://ajaxplorer.info/</a><br/>Community - Free non supported version © C. du Jeu 2008-2013 </div>');
$res = ('<div style="position: absolute;z-index: 10000; bottom: 0; right: 0; color: #666;font-family: HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size: 13px;text-align: right;padding: 6px; line-height: 20px;text-shadow: 0px 1px 0px white;" class="no_select_bg"><br>Build your own box with AjaXplorer : <a style="color: #000000;" target="_blank" href="http://ajaxplorer.info/">http://ajaxplorer.info/</a><br/>Community - Free non supported version © C. du Jeu 2008-2013 </div>');
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('<div style="position: absolute;z-index: 10000; bottom: 0; right: 0; color: #666;font-family: HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size: 13px;text-align: right;padding: 6px; line-height: 20px;text-shadow: 0px 1px 0px white;" class="no_select_bg"><br>Build your own box with AjaXplorer : <a style="color: #000000;" target="_blank" href="http://ajaxplorer.info/">http://ajaxplorer.info/</a><br/>Community - Free non supported version © C. du Jeu 2008-2013 </div>');
$res = '<div style="position: absolute;z-index: 10000; bottom: 0; right: 0; color: #666;font-family: HelveticaNeue-Light,Helvetica Neue Light,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;font-size: 13px;text-align: right;padding: 6px; line-height: 20px;text-shadow: 0px 1px 0px white;" class="no_select_bg"><br>Build your own box with AjaXplorer : <a style="color: #000000;" target="_blank" href="http://ajaxplorer.info/">http://ajaxplorer.info/</a><br/>Community - Free non supported version © C. du Jeu 2008-2013 </div>';
AJXP_Controller::applyHook("tpl.filter_html", array(&$res));
echo($res);
return;
}
}
Expand Down

0 comments on commit 38886e5

Please sign in to comment.