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

Commit

Permalink
Fix error case / default template.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Feb 4, 2016
1 parent daab9a4 commit 5cfac49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
3 changes: 3 additions & 0 deletions core/src/plugins/action.share/class.MinisiteRenderer.php
Expand Up @@ -71,6 +71,9 @@ public static function loadMinisite($data, $hash = '', $error = null)
$templateName = "ajxp_shared_folder";
}
}
if(!isSet($templateName) && isSet($error)){
$templateName = "ajxp_unique_strip";
}
// UPDATE TEMPLATE
$html = file_get_contents(AJXP_INSTALL_PATH."/".AJXP_PLUGINS_FOLDER."/action.share/res/minisite.php");
AJXP_Controller::applyHook("tpl.filter_html", array(&$html));
Expand Down
25 changes: 0 additions & 25 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -845,31 +845,6 @@ public function updateNodeSharedData($oldNode=null, $newNode=null, $copy = false
}
}

/**
* @param array $data
* @param AbstractAccessDriver $accessDriver
* @param Repository $repository
*/
protected function storeSafeCredentialsIfNeeded(&$data, $accessDriver, $repository){
$storeCreds = false;
if ($repository->getOption("META_SOURCES")) {
$options["META_SOURCES"] = $repository->getOption("META_SOURCES");
foreach ($options["META_SOURCES"] as $metaSource) {
if (isSet($metaSource["USE_SESSION_CREDENTIALS"]) && $metaSource["USE_SESSION_CREDENTIALS"] === true) {
$storeCreds = true;
break;
}
}
}
if ($storeCreds || $accessDriver->hasMixin("credentials_consumer")) {
$cred = AJXP_Safe::tryLoadingCredentialsFromSources(array(), $repository);
if (isSet($cred["user"]) && isset($cred["password"])) {
$data["SAFE_USER"] = $cred["user"];
$data["SAFE_PASS"] = $cred["password"];
}
}
}

public static function loadMinisite($data, $hash = '', $error = null)
{
include_once("class.MinisiteRenderer.php");
Expand Down

0 comments on commit 5cfac49

Please sign in to comment.