Index: trunk/kernel/include/theme.php =================================================================== diff -u -r315 -r375 --- trunk/kernel/include/theme.php (.../theme.php) (revision 315) +++ trunk/kernel/include/theme.php (.../theme.php) (revision 375) @@ -187,18 +187,17 @@ // $this->LoadFiles($theme_id); } - function LoadFiles($id,$where="",$orderBy="") + function LoadFiles($id,$where="",$orderBy="",$limit="") { global $objConfig; $this->Clear(); $this->ThemeId=$id; $sql = "SELECT * FROM ".$this->SourceTable. " WHERE ThemeId=$id "; - if(strlen(trim($where))) - $sql .= $where." "; - if(strlen(trim($orderBy))) - $sql .= "ORDER BY $orderBy"; - + if(strlen(trim($where))) $sql .= $where." "; + if(strlen(trim($orderBy))) $sql .= "ORDER BY $orderBy"; + if(strlen(trim($limit))) $sql .= $limit; + if(strlen($this->PerPageVar)) { $sql .= GetLimitSQL($this->Page,$objConfig->Get($this->PerPageVar)); @@ -291,13 +290,13 @@ return $f->LoadFileContents(); } - function FindMissingFiles($path) + function FindMissingFiles($path, $where = null, $OrderBy = null, $limit = null) { global $objConfig, $pathchar, $pathtoroot, $ttt_time; $this->Clear(); $fullpath = $pathtoroot."themes/".$path; - $this->LoadFiles($this->ThemeId); + $this->LoadFiles($this->ThemeId, $where,$OrderBy,$limit); //assemble directoy file list $files = filelist($fullpath, NULL, "tpl"); @@ -456,12 +455,13 @@ $this->Files->LoadFiles($this->Get("ThemeId"),$where,$OrderBy); } - function VerifyTemplates() + function VerifyTemplates($where = null,$OrderBy = null,$limit = null) { if(!is_object($this->Files)) - $this->Files = new clsThemeFileList($this->Get("ThemeId")); + $this->Files = new clsThemeFileList($this->Get("ThemeId")); $this->Files->ThemeId = $this->Get("ThemeId"); - $this->Files->FindMissingFiles(strtolower($this->Get("Name"))); + + $this->Files->FindMissingFiles(strtolower($this->Get("Name")),$where,$OrderBy,$limit); } function EditTemplateContents($FileId,$Contents)