* Optimize code.
This commit is contained in:
@@ -103,7 +103,6 @@ class projectrelease extends control
|
||||
$this->loadModel('build');
|
||||
$this->app->loadConfig('release');
|
||||
$this->config->projectrelease->create = $this->config->release->create;
|
||||
|
||||
$this->app->loadLang('release');
|
||||
|
||||
if(!empty($_POST))
|
||||
@@ -128,7 +127,6 @@ class projectrelease extends control
|
||||
unset($builds['trunk']);
|
||||
|
||||
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->lastRelease = $this->projectrelease->getLast($projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed');
|
||||
|
||||
@@ -5,13 +5,7 @@ $('#submit').click(function()
|
||||
var date = $('#date').val();
|
||||
if(name && dateFormat.test(date))
|
||||
{
|
||||
if(confirm(confirmLink))
|
||||
{
|
||||
$('#sync').val('true');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#sync').val('false');
|
||||
}
|
||||
var result = confirm(confirmLink) ? true : false;
|
||||
$('#sync').val(result);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,13 +5,7 @@ $('#submit').click(function()
|
||||
var date = $('#date').val();
|
||||
if(name && dateFormat.test(date))
|
||||
{
|
||||
if(confirm(confirmLink))
|
||||
{
|
||||
$('#sync').val('true');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#sync').val('false');
|
||||
}
|
||||
var result = confirm(confirmLink) ? true : false;
|
||||
$('#sync').val(result);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -112,9 +112,9 @@ class releaseModel extends model
|
||||
public function create($productID, $branch = 0)
|
||||
{
|
||||
/* Init vars. */
|
||||
$productID = (int)$productID;
|
||||
$branch = (int)$branch;
|
||||
$buildID = 0;
|
||||
$productID = (int)$productID;
|
||||
$branch = (int)$branch;
|
||||
$buildID = 0;
|
||||
|
||||
/* Check build if build is required. */
|
||||
if(strpos($this->config->release->create->requiredFields, 'build') !== false and $this->post->build == false) return dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->release->build);
|
||||
|
||||
Reference in New Issue
Block a user