Пример #1
0
$include_flux = trim(ob_get_contents());
ob_end_clean();
// Liste des module php preconisé
$loadedExtension = \Core\Server::extensions();
foreach (array("mcrypt", "mbstring", "zlib") as $mod) {
    if (!in_array(strtolower($mod), $loadedExtension)) {
        \Core\FirePHP::fbLog("warn", "Warning : module " . strtoupper($mod) . " is not installed");
    }
}
// Set php config
\Core\Config::ApplyIni();
$_REQUEST = \Core\Request::create($_REQUEST);
// Renvoie dans fb les eventuels flux des includes
if ($include_flux !== "") {
    //	info, warn, error, dump, trace, table
    \Core\FirePHP::fbLog("warn", $include_flux);
    \Core\Event::fire("Page_FluxNotNull", $_REQUEST, $include_flux);
}
// Default service et request
// Par défault la page d'accueil se trouve dans services/_default.php, function Main()
$s = "_default";
$r = "main";
// Get security defaultService
$confSecurity = \Core\Config::get("security");
if (!empty($confSecurity) && isset($confSecurity["defaultService"]) && !empty($confSecurity["defaultService"])) {
    $defaultService = $confSecurity["defaultService"];
    $defaultService = preg_replace("/:{1,2}/", "/", $defaultService);
    $defaultService = explode("/", trim($defaultService));
    if (count($defaultService) > 1) {
        $l = array_pop($defaultService);
        $s = implode("_", $defaultService);
Пример #2
0
 /**
 Translate a text
 */
 public static function translateText($str)
 {
     global $PROJECT_TRANSLATION;
     $text = \Core\CString::sanitize($str);
     if (isset($PROJECT_TRANSLATION[$text])) {
         return $PROJECT_TRANSLATION[$text];
     } else {
         if (!empty($PROJECT_TRANSLATION)) {
             \Core\FirePHP::fbLog("warn", "Translation error : " . $str);
         }
     }
     return $str;
 }