Skip to content

Commit

Permalink
Fixed issue: can't copy template
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Jul 12, 2017
1 parent 7edeef9 commit 1efc6d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion application/controllers/admin/templates.php
Expand Up @@ -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));
}

Expand Down
5 changes: 2 additions & 3 deletions application/models/Template.php
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 1efc6d4

Please sign in to comment.