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

Commit

Permalink
Default language is a bit broken in download pages
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne CHAMPETIER <etienne.champetier@fiducial.net>
  • Loading branch information
Etienne CHAMPETIER committed Feb 19, 2014
1 parent b549285 commit 19c5817
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions core/src/plugins/action.share/class.ShareCenter.php
Expand Up @@ -751,12 +751,10 @@ public function initPublicFolder($downloadFolder)
$messages = array();
if (is_file($pDir."/res/i18n/".$language.".php")) {
include($pDir."/res/i18n/".$language.".php");
if (isSet($mess)) {
$messages = $mess;
}
} else {
include($pDir."/res/i18n/en.php");
}
if (isSet($mess)) $messages = $mess;
$sTitle = sprintf($messages[1], ConfService::getCoreConf("APPLICATION_TITLE"));
$sLegend = $messages[20];

Expand Down Expand Up @@ -868,17 +866,17 @@ public static function loadPubliclet($data)
exit();
}
// Load language messages
$language = "en";
$language = ConfService::getLanguage();
if (isSet($_GET["lang"])) {
$language = $_GET["lang"];
$language = basename($_GET["lang"]);
}
$messages = array();
if (is_file(dirname(__FILE__)."/res/i18n/".$language.".php")) {
include(dirname(__FILE__)."/res/i18n/".$language.".php");
if(isSet($mess)) $messages = $mess;
} else {
include(dirname(__FILE__)."/res/i18n/en.php");
}
if(isSet($mess)) $messages = $mess;

$AJXP_LINK_HAS_PASSWORD = false;
$AJXP_LINK_BASENAME = SystemTextEncoding::toUTF8(basename($data["FILE_PATH"]));
Expand Down

0 comments on commit 19c5817

Please sign in to comment.