compileAllConfig() public method

Compile all config files
public compileAllConfig ( string $extension = '.conf', boolean $force_compile = false, integer $time_limit, integer $max_errors = null ) : integer
$extension string file extension
$force_compile boolean force all to recompile
$time_limit integer
$max_errors integer
return integer number of template files recompiled
Example #1
0
    } else {
        $locale = "en";
    }
    $_SESSION['userlocale'] = $locale;
}
// if detected locale doesnt have a corresponding langfile , use system default locale
// if, for whatever reason, no system default language is set, default to english as a last resort
if (!file_exists(CL_ROOT . "/language/{$locale}/lng.conf")) {
    $locale = $settings['locale'];
    $_SESSION['userlocale'] = $locale;
}
// Set locale directory
$template->config_dir = CL_ROOT . "/language/{$locale}/";
//Smarty 3 seems to have a problem with re-compiling the config if the user config is different than the system config.
//this forces a compile of the config.
$template->compileAllConfig('.config', true);
// read language file into PHP array
$langfile = readLangfile($locale);
$template->assign("langfile", $langfile);
$template->assign("locale", $locale);
// css classes for headmenue
// this indicates which of the 3 main stages the user is on
$mainclasses = array("desktop" => "desktop", "profil" => "profil", "admin" => "admin");
$template->assign("mainclasses", $mainclasses);
$they = date("Y");
$them = date("n");
$template->assign("theM", $them);
$template->assign("theY", $they);
// Get the user's projects for the quickfinder in the sidebar
if (isset($userid)) {
    $project = new project();