ZBlogPHP::CheckTemplate PHP Method

CheckTemplate() public method

更新模板缓存
public CheckTemplate ( boolean $nobuild = false ) : true
$nobuild boolean 为真的话,只判断是否需要而不Build
return true or false
    public function CheckTemplate($nobuild = false)
    {
        $this->template->LoadTemplates();
        $s = implode($this->template->templates);
        $md5 = md5($s);
        if ($md5 != $this->cache->templates_md5) {
            if ($nobuild == true) {
                return false;
            }
            $this->BuildTemplate();
            $this->cache->templates_md5 = $md5;
            $this->SaveCache();
        }
        return true;
    }
ZBlogPHP