roundcubemail/program/lib/Roundcube/rcube_imap.php
public function folder_namespace($folder)
    {
        if ($folder == 'INBOX') {
            return 'personal';
        }

        foreach ($this->namespace as $type => $namespace) {
            if (is_array($namespace)) {
                foreach ($namespace as $ns) {
                    if ($len = strlen($ns[0])) {
                        if (($len > 1 && $folder == substr($ns[0], 0, -1))
                            || strpos($folder, $ns[0]) === 0
                        ) {
                            return $type;
                        }
                    }
                }
            }
        }

        return 'personal';
    }
public function folder_namespace($folder)
    {
        if ($folder == 'INBOX') {
            return 'personal';
        }

        foreach ($this->namespace as $type => $namespace) {
            if (is_array($namespace)) {
                foreach ($namespace as $ns) {
                    if ($len = strlen($ns[0])) {
                        if (($len > 1 && $folder == substr($ns[0], 0, -1))
                            || strpos($folder, $ns[0]) === 0
                        ) {
                            return $type;
                        }
                    }
                }
            }
        }

        return 'personal';
    }
public function folder_namespace ( $ folder ) { if ( $ folder == 'INBOX' ) { return 'personal' ; } foreach ( $ this -> namespace as $ type => $ namespace ) { if ( is_array ( $ namespace ) ) { foreach ( $ namespace as $ ns ) { if ( $ len = strlen ( $ ns [ 0 ] ) ) { if ( ( $ len > 1 && $ folder == substr ( $ ns [ 0 ] , 0 , - 1 ) ) || strpos ( $ folder , $ ns [ 0 ] ) === 0 ) { return $ type ; } } } } } return 'personal' ; }
Returns the namespace where the folder is in

@param string $folder Folder name

@return string One of 'personal', 'other' or 'shared'
Returns the namespace where the folder is in