roundcubemail/program/include/rcmail_install.php
public function check_config()
    {
        $this->load_config();

        if (!$this->configured) {
            return;
        }

        $out = $seen = array();

        // iterate over the current configuration
        foreach (array_keys($this->config) as $prop) {
            if ($replacement = $this->replaced_config[$prop]) {
                $out['replaced'][]  = array('prop' => $prop, 'replacement' => $replacement);
                $seen[$replacement] = true;
            }
            else if (!$seen[$prop] && in_array($prop, $this->obsolete_config)) {
                $out['obsolete'][] = array('prop' => $prop);
                $seen[$prop]       = true;
            }
        }

        // the old default mime_magic reference is obsolete
        if ($this->config['mime_magic'] == '/usr/share/misc/magic') {
            $out['obsolete'][] = array(
                'prop'    => 'mime_magic',
                'explain' => "Set value to null in order to use system default"
            );
        }

        // check config dependencies and contradictions
        if ($this->config['enable_spellcheck'] && $this->config['spellcheck_engine'] == 'pspell') {
            if (!extension_loaded('pspell')) {
                $out['dependencies'][] = array(
                    'prop'    => 'spellcheck_engine',
                    'explain' => "This requires the <tt>pspell</tt> extension which could not be loaded."
                );
            }
            else if (!empty($this->config['spellcheck_languages'])) {
                foreach ($this->config['spellcheck_languages'] as $lang => $descr) {
                    if (!@pspell_new($lang)) {
                        $out['dependencies'][] = array(
                            'prop'    => 'spellcheck_languages',
                            'explain' => "You are missing pspell support for language $lang ($descr)"
                        );
                    }
                }
            }
        }

        if ($this->config['log_driver'] == 'syslog') {
            if (!function_exists('openlog')) {
                $out['dependencies'][] = array(
                    'prop'    => 'log_driver',
                    'explain' => "This requires the <tt>syslog</tt> extension which could not be loaded."
                );
            }

            if (empty($this->config['syslog_id'])) {
                $out['dependencies'][] = array(
                    'prop'    => 'syslog_id',
                    'explain' => "Using <tt>syslog</tt> for logging requires a syslog ID to be configured"
                );
            }
        }

        // check ldap_public sources having global_search enabled
        if (is_array($this->config['ldap_public']) && !is_array($this->config['autocomplete_addressbooks'])) {
            foreach ($this->config['ldap_public'] as $ldap_public) {
                if ($ldap_public['global_search']) {
                    $out['replaced'][] = array(
                        'prop'        => 'ldap_public::global_search',
                        'replacement' => 'autocomplete_addressbooks'
                    );
                    break;
                }
            }
        }

        return $out;
    }
public function check_config()
    {
        $this->load_config();

        if (!$this->configured) {
            return;
        }

        $out = $seen = array();

        // iterate over the current configuration
        foreach (array_keys($this->config) as $prop) {
            if ($replacement = $this->replaced_config[$prop]) {
                $out['replaced'][]  = array('prop' => $prop, 'replacement' => $replacement);
                $seen[$replacement] = true;
            }
            else if (!$seen[$prop] && in_array($prop, $this->obsolete_config)) {
                $out['obsolete'][] = array('prop' => $prop);
                $seen[$prop]       = true;
            }
        }

        // the old default mime_magic reference is obsolete
        if ($this->config['mime_magic'] == '/usr/share/misc/magic') {
            $out['obsolete'][] = array(
                'prop'    => 'mime_magic',
                'explain' => "Set value to null in order to use system default"
            );
        }

        // check config dependencies and contradictions
        if ($this->config['enable_spellcheck'] && $this->config['spellcheck_engine'] == 'pspell') {
            if (!extension_loaded('pspell')) {
                $out['dependencies'][] = array(
                    'prop'    => 'spellcheck_engine',
                    'explain' => "This requires the <tt>pspell</tt> extension which could not be loaded."
                );
            }
            else if (!empty($this->config['spellcheck_languages'])) {
                foreach ($this->config['spellcheck_languages'] as $lang => $descr) {
                    if (!@pspell_new($lang)) {
                        $out['dependencies'][] = array(
                            'prop'    => 'spellcheck_languages',
                            'explain' => "You are missing pspell support for language $lang ($descr)"
                        );
                    }
                }
            }
        }

        if ($this->config['log_driver'] == 'syslog') {
            if (!function_exists('openlog')) {
                $out['dependencies'][] = array(
                    'prop'    => 'log_driver',
                    'explain' => "This requires the <tt>syslog</tt> extension which could not be loaded."
                );
            }

            if (empty($this->config['syslog_id'])) {
                $out['dependencies'][] = array(
                    'prop'    => 'syslog_id',
                    'explain' => "Using <tt>syslog</tt> for logging requires a syslog ID to be configured"
                );
            }
        }

        // check ldap_public sources having global_search enabled
        if (is_array($this->config['ldap_public']) && !is_array($this->config['autocomplete_addressbooks'])) {
            foreach ($this->config['ldap_public'] as $ldap_public) {
                if ($ldap_public['global_search']) {
                    $out['replaced'][] = array(
                        'prop'        => 'ldap_public::global_search',
                        'replacement' => 'autocomplete_addressbooks'
                    );
                    break;
                }
            }
        }

        return $out;
    }
public function check_config ( ) { $ this -> load_config ( ) ; if ( ! $ this -> configured ) { return ; } $ out = $ seen = array ( ) ; // iterate over the current configuration foreach ( array_keys ( $ this -> config ) as $ prop ) { if ( $ replacement = $ this -> replaced_config [ $ prop ] ) { $ out [ 'replaced' ] [ ] = array ( 'prop' => $ prop , 'replacement' => $ replacement ) ; $ seen [ $ replacement ] = true ; } else if ( ! $ seen [ $ prop ] && in_array ( $ prop , $ this -> obsolete_config ) ) { $ out [ 'obsolete' ] [ ] = array ( 'prop' => $ prop ) ; $ seen [ $ prop ] = true ; } } // the old default mime_magic reference is obsolete if ( $ this -> config [ 'mime_magic' ] == '/usr/share/misc/magic' ) { $ out [ 'obsolete' ] [ ] = array ( 'prop' => 'mime_magic' , 'explain' => "Set value to null in order to use system default" ) ; } // check config dependencies and contradictions if ( $ this -> config [ 'enable_spellcheck' ] && $ this -> config [ 'spellcheck_engine' ] == 'pspell' ) { if ( ! extension_loaded ( 'pspell' ) ) { $ out [ 'dependencies' ] [ ] = array ( 'prop' => 'spellcheck_engine' , 'explain' => "This requires the <tt>pspell</tt> extension which could not be loaded." ) ; } else if ( ! empty ( $ this -> config [ 'spellcheck_languages' ] ) ) { foreach ( $ this -> config [ 'spellcheck_languages' ] as $ lang => $ descr ) { if ( ! @ pspell_new ( $ lang ) ) { $ out [ 'dependencies' ] [ ] = array ( 'prop' => 'spellcheck_languages' , 'explain' => "You are missing pspell support for language $lang ($descr)" ) ; } } } } if ( $ this -> config [ 'log_driver' ] == 'syslog' ) { if ( ! function_exists ( 'openlog' ) ) { $ out [ 'dependencies' ] [ ] = array ( 'prop' => 'log_driver' , 'explain' => "This requires the <tt>syslog</tt> extension which could not be loaded." ) ; } if ( empty ( $ this -> config [ 'syslog_id' ] ) ) { $ out [ 'dependencies' ] [ ] = array ( 'prop' => 'syslog_id' , 'explain' => "Using <tt>syslog</tt> for logging requires a syslog ID to be configured" ) ; } } // check ldap_public sources having global_search enabled if ( is_array ( $ this -> config [ 'ldap_public' ] ) && ! is_array ( $ this -> config [ 'autocomplete_addressbooks' ] ) ) { foreach ( $ this -> config [ 'ldap_public' ] as $ ldap_public ) { if ( $ ldap_public [ 'global_search' ] ) { $ out [ 'replaced' ] [ ] = array ( 'prop' => 'ldap_public::global_search' , 'replacement' => 'autocomplete_addressbooks' ) ; break ; } } } return $ out ; }
Check the current configuration for missing properties
and deprecated or obsolete settings

@return array List with problems detected
Check the current configuration for missing properties and deprecated or obsolete settings