roundcubemail/program/include/rcmail_install.php
public function load_config_file($file)
    {
        if (!is_readable($file)) {
            return;
        }

        include $file;

        // read comments from config file
        if (function_exists('token_get_all')) {
            $tokens    = token_get_all(file_get_contents($file));
            $in_config = false;
            $buffer    = '';

            for ($i = 0; $i < count($tokens); $i++) {
                $token = $tokens[$i];
                if ($token[0] == T_VARIABLE && ($token[1] == '$config' || $token[1] == '$rcmail_config')) {
                    $in_config = true;
                    if ($buffer && $tokens[$i+1] == '[' && $tokens[$i+2][0] == T_CONSTANT_ENCAPSED_STRING) {
                        $propname = trim($tokens[$i+2][1], "'\"");
                        $this->comments[$propname] = $buffer;
                        $buffer = '';
                        $i += 3;
                    }
                }
                else if ($in_config && $token[0] == T_COMMENT) {
                    $buffer .= strtr($token[1], array('\n' => "\n"));
                }
            }
        }

        // deprecated name of config variable
        if (is_array($rcmail_config)) {
            return $rcmail_config;
        }

        return $config;
    }
public function load_config_file($file)
    {
        if (!is_readable($file)) {
            return;
        }

        include $file;

        // read comments from config file
        if (function_exists('token_get_all')) {
            $tokens    = token_get_all(file_get_contents($file));
            $in_config = false;
            $buffer    = '';

            for ($i = 0; $i < count($tokens); $i++) {
                $token = $tokens[$i];
                if ($token[0] == T_VARIABLE && ($token[1] == '$config' || $token[1] == '$rcmail_config')) {
                    $in_config = true;
                    if ($buffer && $tokens[$i+1] == '[' && $tokens[$i+2][0] == T_CONSTANT_ENCAPSED_STRING) {
                        $propname = trim($tokens[$i+2][1], "'\"");
                        $this->comments[$propname] = $buffer;
                        $buffer = '';
                        $i += 3;
                    }
                }
                else if ($in_config && $token[0] == T_COMMENT) {
                    $buffer .= strtr($token[1], array('\n' => "\n"));
                }
            }
        }

        // deprecated name of config variable
        if (is_array($rcmail_config)) {
            return $rcmail_config;
        }

        return $config;
    }
public function load_config_file ( $ file ) { if ( ! is_readable ( $ file ) ) { return ; } include $ file ; // read comments from config file if ( function_exists ( 'token_get_all' ) ) { $ tokens = token_get_all ( file_get_contents ( $ file ) ) ; $ in_config = false ; $ buffer = '' ; for ( $ i = 0 ; $ i < count ( $ tokens ) ; $ i ++ ) { $ token = $ tokens [ $ i ] ; if ( $ token [ 0 ] == T_VARIABLE && ( $ token [ 1 ] == '$config' || $ token [ 1 ] == '$rcmail_config' ) ) { $ in_config = true ; if ( $ buffer && $ tokens [ $ i + 1 ] == '[' && $ tokens [ $ i + 2 ] [ 0 ] == T_CONSTANT_ENCAPSED_STRING ) { $ propname = trim ( $ tokens [ $ i + 2 ] [ 1 ] , "'\"" ) ; $ this -> comments [ $ propname ] = $ buffer ; $ buffer = '' ; $ i += 3 ; } } else if ( $ in_config && $ token [ 0 ] == T_COMMENT ) { $ buffer .= strtr ( $ token [ 1 ] , array ( '\n' => "\n" ) ) ; } } } // deprecated name of config variable if ( is_array ( $ rcmail_config ) ) { return $ rcmail_config ; } return $ config ; }
Read the default config file and store properties

@param string $file File name with path
Read the default config file and store properties