Merge branch 'master' of github.com:alchemy-fr/Phraseanet

This commit is contained in:
Romain Neutron
2012-03-30 15:17:11 +02:00
2 changed files with 22 additions and 4 deletions

View File

@@ -76,6 +76,7 @@
</li> </li>
{# MODULE #} {# MODULE #}
{% if user.ACL.has_access_to_module('upload') %}
<li> <li>
<a target="_blank" href="/upload/"> <a target="_blank" href="/upload/">
<span class="{% if module == "upload" %}selected{% endif %}"> <span class="{% if module == "upload" %}selected{% endif %}">
@@ -83,6 +84,7 @@
</span> </span>
</a> </a>
</li> </li>
{% endif %}
{# MODULE #} {# MODULE #}
{% if module == "prod" or module == "client" %} {% if module == "prod" or module == "client" %}

View File

@@ -14,11 +14,27 @@
* @license http://opensource.org/licenses/gpl-3.0 GPLv3 * @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link www.phraseanet.com * @link www.phraseanet.com
*/ */
$Core = include_once __DIR__ . '/../../lib/bootstrap.php'; $request = Symfony\Component\HttpFoundation\Request::createFromGlobals();
$appbox = appbox::get_instance($Core); $locales = \Alchemy\Phrasea\Core::getAvailableLanguages();
$session = $appbox->get_session();
phrasea::use_i18n(Session_Handler::get_locale()); $current_locale = \Session_Handler::get_locale();
if (!$current_locale)
{
foreach ($locales as $code => $locale)
{
if ($request->getLocale() == $locale)
{
$current_locale = $locale;
break;
}
}
if (!$current_locale)
$current_locale = 'fr_FR';
}
phrasea::use_i18n($current_locale);
$request = http_request::getInstance(); $request = http_request::getInstance();