Skip to content

Commit

Permalink
Dev: some cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisGac committed Oct 16, 2017
1 parent a401211 commit ccd1d86
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions application/models/TemplateConfig.php
Expand Up @@ -821,8 +821,7 @@ public static function importManifest($sTemplateName, $aDatas)
$oNewTemplate->author_url = ''; // privacy
$oNewTemplate->api_version = $aDatas['api_version'];
$oNewTemplate->view_folder = $aDatas['view_folder'];
$oNewTemplate->files_folder = $aDatas['files_folder'];
//$oNewTemplate->description TODO: a more complex modal whith email, author, url, licence, desc, etc
$oNewTemplate->files_folder = $aDatas['files_folder'];
$oNewTemplate->owner_id = Yii::app()->user->id;
$oNewTemplate->extends = $aDatas['extends'];

Expand Down
6 changes: 3 additions & 3 deletions application/models/TemplateConfiguration.php
Expand Up @@ -227,15 +227,15 @@ public static function getInstance($sTemplateName=null, $iSurveyGroupId=null, $i
$oTemplateConfigurationModel = new TemplateConfiguration();

if ($sTemplateName!=null){
$oTemplateConfigurationModel = @TemplateConfiguration::getInstanceFromTemplateName($sTemplateName);
$oTemplateConfigurationModel = TemplateConfiguration::getInstanceFromTemplateName($sTemplateName);
}

if($iSurveyGroupId!=null && $iSurveyId==null) {
$oTemplateConfigurationModel = @TemplateConfiguration::getInstanceFromSurveyGroup($iSurveyGroupId, $sTemplateName);
$oTemplateConfigurationModel = TemplateConfiguration::getInstanceFromSurveyGroup($iSurveyGroupId, $sTemplateName);
}

if($iSurveyId!=null) {
$oTemplateConfigurationModel = @TemplateConfiguration::getInstanceFromSurveyId($iSurveyId, $sTemplateName);
$oTemplateConfigurationModel = TemplateConfiguration::getInstanceFromSurveyId($iSurveyId, $sTemplateName);
}

return $oTemplateConfigurationModel;
Expand Down
2 changes: 0 additions & 2 deletions application/models/TemplateManifest.php
Expand Up @@ -23,7 +23,6 @@
class TemplateManifest extends TemplateConfiguration
{
public $templateEditor;

public $sPreviewImgTag;

/**
Expand Down Expand Up @@ -64,7 +63,6 @@ public function getValidScreenFiles($sType = "view", $sScreen=null)
$filesFromXML = (is_null($sScreen)) ? (array) $this->templateEditor->screens->xpath('//file') : $this->templateEditor->screens->xpath('//'.$sScreen.'/file');

foreach( $filesFromXML as $file){

if ( $file->attributes()->type == $sType ){
$aScreenFiles[] = (string) $file;
}
Expand Down

0 comments on commit ccd1d86

Please sign in to comment.