diff --git a/module/bug/model.php b/module/bug/model.php index 9ddb27a926..3c48c66211 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -133,19 +133,6 @@ class bugModel extends model */ public function create($from = '') { - /* Delete HTML tags, line breaks, and spaces in templates and steps. */ - if($this->post->templateID) - { - $stepsTemplate = strip_tags($this->dao->select('content')->from(TABLE_USERTPL)->where('id')->eq($this->post->templateID)->fetch('content')); - $stepsTemplate = preg_replace("/\s/", "", $stepsTemplate); - } - else - { - $stepsTemplate = strip_tags($this->lang->bug->tplStep . $this->lang->bug->tplResult . $this->lang->bug->tplExpect); - } - $steps = strip_tags(preg_replace("/\s/", "", $this->post->steps)); - $steps = str_replace(" ", "", $steps); - $now = helper::now(); $bug = fixer::input('post') ->setDefault('openedBy', $this->app->user->account) @@ -157,12 +144,11 @@ class bugModel extends model ->setIF($this->post->assignedTo != '', 'assignedDate', $now) ->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story)) ->setIF(strpos($this->config->bug->create->requiredFields, 'project') !== false, 'project', $this->post->project) - ->setIF($steps == $stepsTemplate, 'steps', '') ->stripTags($this->config->bug->editor->create['id'], $this->config->allowedTags) ->cleanInt('product,project,module,severity') ->join('openedBuild', ',') ->join('mailto', ',') - ->remove('files, labels,uid,oldTaskID,contactListMenu,templateID') + ->remove('files, labels,uid,oldTaskID,contactListMenu') ->get(); /* Check repeat bug. */ diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 786b2c6084..42282830d6 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -219,10 +219,9 @@ js::set('flow', $config->global->flow); bug->steps;?> - + fetch('user', 'ajaxPrintTemplates', 'type=bug&link=steps');?> - '].edit.cmd; editor[''].html(''); cmd.inserthtml(content); - $("#mainContent #dataform .table.table-form .steps #templateID").val(templateID); } function deleteTemplate(templateID)