/** * scans the templates folder looking for new files * * @private */ function _performScanTemplateFolder() { $this->_errorMessage = ""; $this->_successMessage = ""; // set up the view $this->_view = new AdminBlogTemplateSetsListView($this->_blogInfo); // and tell the template finder to find any new template file... $tf = new TemplateFinder(TemplateSetStorage::getBlogBaseTemplateFolder($this->_blogInfo->getId())); $newTemplates = $tf->find(TemplateSets::getBlogTemplates($this->_blogInfo->getId())); $this->_errorMessage = ""; $this->_successMessage = ""; if (count($newTemplates) == 0) { // no new templates found $this->_errorMessage = $this->_locale->tr('error_no_new_templates_found'); } else { // now add each one of the new ones foreach ($newTemplates as $newTemplate) { $this->_addTemplateCode($newTemplate); } } // set the success and error messages, if any if ($this->_errorMessage != '') { $this->_view->setErrorMessage($this->_errorMessage); } if ($this->_successMessage != '') { $this->_view->setSuccessMessage($this->_successMessage); } $this->setCommonData(); return true; }