roundcubemail/program/include/rcmail_output_html.php
public function get_skin_file($file, &$skin_path = null, $add_path = null)
    {
        $skin_paths = $this->skin_paths;
        if ($add_path) {
            array_unshift($skin_paths, $add_path);
        }

        foreach ($skin_paths as $skin_path) {
            $path = realpath(RCUBE_INSTALL_PATH . $skin_path . $file);

            if ($path && is_file($path)) {
                return $skin_path . $file;
            }

            if ($this->assets_dir != RCUBE_INSTALL_PATH) {
                $path = realpath($this->assets_dir . $skin_path . $file);

                if ($path && is_file($path)) {
                    return $skin_path . $file;
                }
            }
        }

        return false;
    }
public function get_skin_file($file, &$skin_path = null, $add_path = null)
    {
        $skin_paths = $this->skin_paths;
        if ($add_path) {
            array_unshift($skin_paths, $add_path);
        }

        foreach ($skin_paths as $skin_path) {
            $path = realpath(RCUBE_INSTALL_PATH . $skin_path . $file);

            if ($path && is_file($path)) {
                return $skin_path . $file;
            }

            if ($this->assets_dir != RCUBE_INSTALL_PATH) {
                $path = realpath($this->assets_dir . $skin_path . $file);

                if ($path && is_file($path)) {
                    return $skin_path . $file;
                }
            }
        }

        return false;
    }
public function get_skin_file ( $ file , & $ skin_path = null , $ add_path = null ) { $ skin_paths = $ this -> skin_paths ; if ( $ add_path ) { array_unshift ( $ skin_paths , $ add_path ) ; } foreach ( $ skin_paths as $ skin_path ) { $ path = realpath ( RCUBE_INSTALL_PATH . $ skin_path . $ file ) ; if ( $ path && is_file ( $ path ) ) { return $ skin_path . $ file ; } if ( $ this -> assets_dir != RCUBE_INSTALL_PATH ) { $ path = realpath ( $ this -> assets_dir . $ skin_path . $ file ) ; if ( $ path && is_file ( $ path ) ) { return $ skin_path . $ file ; } } } return false ; }
Find the given file in the current skin path stack

@param string $file       File name/path to resolve (starting with /)
@param string &$skin_path Reference to the base path of the matching skin
@param string $add_path   Additional path to search in

@return mixed Relative path to the requested file or False if not found
Find the given file in the current skin path stack