diff --git a/application/controllers/admin/templates.php b/application/controllers/admin/templates.php index ec58b0e576e..69d9663aa54 100644 --- a/application/controllers/admin/templates.php +++ b/application/controllers/admin/templates.php @@ -527,7 +527,7 @@ public function templatecopy() $oFileHelper->copyDirectory($copydirname,$newdirname, array('fileTypes' => array('xml'))); $templatename = $newname; //TemplateConfiguration::removeAllNodes($newdirname); - TemplateConfiguration::extendsConfig($copydir, $newname ); + TemplateManifest::extendsConfig($copydir, $newname ); $this->getController()->redirect(array("admin/templates/sa/view",'templatename'=>$newname)); } diff --git a/application/models/Template.php b/application/models/Template.php index 1aeb8b0f16f..e2c554c8ad3 100644 --- a/application/models/Template.php +++ b/application/models/Template.php @@ -300,11 +300,10 @@ public static function getTemplateList() && $sTemplatePath != ".." && $sTemplatePath!=".svn" && (file_exists("{$sUserTemplateRootDir}/{$sTemplatePath}/config.xml"))) { - // TODO: explode $sTemplatePath - $oTemplate = self::model()->find('folder=:folder', array(':folder'=>$sTemplatePath)); + $oTemplate = self::model()->getInstance($sTemplatePath, '', true); if (is_object($oTemplate)){ - $aTemplateList[$oTemplate->name] = $sUserTemplateRootDir.DIRECTORY_SEPARATOR.$sTemplatePath; + $aTemplateList[$oTemplate->sTemplateName] = $sUserTemplateRootDir.DIRECTORY_SEPARATOR.$sTemplatePath; } } }