roundcubemail/program/lib/Roundcube/rcube_config.php
public function get($name, $def = null)
    {
        if (isset($this->prop[$name])) {
            $result = $this->prop[$name];
        }
        else {
            $result = $def;
        }

        $result = $this->getenv_default('ROUNDCUBE_' . strtoupper($name), $result);
        $rcube  = rcube::get_instance();

        if ($name == 'timezone') {
            if (empty($result) || $result == 'auto') {
                $result = $this->client_timezone();
            }
        }
        else if ($name == 'client_mimetypes') {
            if (!$result && !$def) {
                $result = 'text/plain,text/html,text/xml'
                    . ',image/jpeg,image/gif,image/png,image/bmp,image/tiff,image/webp'
                    . ',application/x-javascript,application/pdf,application/x-shockwave-flash';
            }
            if ($result && is_string($result)) {
                $result = explode(',', $result);
            }
        }

        $plugin = $rcube->plugins->exec_hook('config_get', array(
            'name' => $name, 'default' => $def, 'result' => $result));

        return $plugin['result'];
    }
public function get($name, $def = null)
    {
        if (isset($this->prop[$name])) {
            $result = $this->prop[$name];
        }
        else {
            $result = $def;
        }

        $result = $this->getenv_default('ROUNDCUBE_' . strtoupper($name), $result);
        $rcube  = rcube::get_instance();

        if ($name == 'timezone') {
            if (empty($result) || $result == 'auto') {
                $result = $this->client_timezone();
            }
        }
        else if ($name == 'client_mimetypes') {
            if (!$result && !$def) {
                $result = 'text/plain,text/html,text/xml'
                    . ',image/jpeg,image/gif,image/png,image/bmp,image/tiff,image/webp'
                    . ',application/x-javascript,application/pdf,application/x-shockwave-flash';
            }
            if ($result && is_string($result)) {
                $result = explode(',', $result);
            }
        }

        $plugin = $rcube->plugins->exec_hook('config_get', array(
            'name' => $name, 'default' => $def, 'result' => $result));

        return $plugin['result'];
    }
public function get ( $ name , $ def = null ) { if ( isset ( $ this -> prop [ $ name ] ) ) { $ result = $ this -> prop [ $ name ] ; } else { $ result = $ def ; } $ result = $ this -> getenv_default ( 'ROUNDCUBE_' . strtoupper ( $ name ) , $ result ) ; $ rcube = rcube :: get_instance ( ) ; if ( $ name == 'timezone' ) { if ( empty ( $ result ) || $ result == 'auto' ) { $ result = $ this -> client_timezone ( ) ; } } else if ( $ name == 'client_mimetypes' ) { if ( ! $ result && ! $ def ) { $ result = 'text/plain,text/html,text/xml' . ',image/jpeg,image/gif,image/png,image/bmp,image/tiff,image/webp' . ',application/x-javascript,application/pdf,application/x-shockwave-flash' ; } if ( $ result && is_string ( $ result ) ) { $ result = explode ( ',' , $ result ) ; } } $ plugin = $ rcube -> plugins -> exec_hook ( 'config_get' , array ( 'name' => $ name , 'default' => $ def , 'result' => $ result ) ) ; return $ plugin [ 'result' ] ; }
Getter for a specific config parameter

@param  string $name Parameter name
@param  mixed  $def  Default value if not set

@return mixed  The requested config value
Getter for a specific config parameter