/** * Change ou défini la locale en session. * * @param array $array * @access public * @return string */ protected function setLocale($method, $params) { $this->auth(); $this->log('XmlRpcServer::setLocale called'); I18N::setLocale($params[0]); $_SESSION['locale'] = $params[0]; return I18N::getLocaleCode(); }
* mode d'upload des fichiers et images * [db|path/to/writable/dir] */ if (!defined('UPLOAD_STORAGE')) { define('UPLOAD_STORAGE', 'db'); } // on ajoute les chemins nécessaires au include_path de php $pathes = ini_get('include_path') . PATH_SEPARATOR . PROJECT_ROOT . DIRECTORY_SEPARATOR . WWW_DIR . PATH_SEPARATOR . PROJECT_ROOT . DIRECTORY_SEPARATOR . LIB_DIR . PATH_SEPARATOR . FRAMEWORK_ROOT . PATH_SEPARATOR . FRAMEWORK_ROOT . DIRECTORY_SEPARATOR . 'vendor'; ini_set('include_path', $pathes); // classe de base require_once 'lib/Object.php'; // inclus le système de chargement auto des fichiers requis require_once 'autoload.inc.php'; // i18n if (!function_exists('_')) { // gettext n'est pas disponible function _($msg) { return $msg; } } else { if (I18N_ENABLED) { I18N::setLocale(); } } // inclusion des messages d'erreur/info génériques require_once 'lib/GenericMessages.php'; // point d'arret marquant la fin de l'initialisation du framework pour le timer if (DEV_VERSION) { Timer::stop('Framework initialization'); }