protected static function formatString($string)
 {
     if (isCLIMode()) {
         return $string;
     }
     return stringForLabel($string);
 }
示例#2
0
$user_defined_atags = array();
// This also can be modified in local.php.
$pageheaders = array(100 => "<link rel='ICON' type='image/x-icon' href='?module=chrome&uri=pix/favicon.ico' />");
addCSS('css/pi.css');
if (!isset($script_mode) or $script_mode !== TRUE) {
    // A successful call to authenticate() always generates autotags and somethimes
    // even given/implicit tags. It also sets remote_username and remote_displayname.
    authenticate();
    // Authentication passed.
    // Note that we don't perform autorization here, so each 1st level page
    // has to do it in its way, e.g. by calling authorize() after fixContext().
} elseif (!isset($remote_username)) {
    // Some functions require remote_username to be set to something to act correctly,
    // even though they don't use the value itself.
    $admin_account = spotEntity('user', 1);
    if (isCLIMode() && FALSE !== ($env_user = getenv('USER'))) {
        // use USER env var if we are in CLI mode
        $remote_username = $env_user;
    } else {
        $remote_username = $admin_account['user_name'];
    }
    unset($env_user);
    unset($admin_account);
}
$virtual_obj_types = explode(',', getConfigVar('VIRTUAL_OBJ_LISTSRC'));
alterConfigWithUserPreferences();
$op = '';
// load additional plugins
ob_start();
foreach (glob("{$racktables_plugins_dir}/*.php") as $filename) {
    require_once $filename;