diff --git a/module/program/view/browse.html.php b/module/program/view/browse.html.php
index a356433efc..fc2901a957 100644
--- a/module/program/view/browse.html.php
+++ b/module/program/view/browse.html.php
@@ -30,7 +30,7 @@
config->maxVersion)):?>
' . $lang->project->create, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
config->systemMode == 'new'):?>
- ' . $lang->project->create, '', 'class="btn btn-primary"');?>
+ ' . $lang->project->create, '', 'class="btn btn-primary"');?>
diff --git a/module/project/control.php b/module/project/control.php
index 04b6032fec..2141ff2022 100644
--- a/module/project/control.php
+++ b/module/project/control.php
@@ -262,12 +262,11 @@ class project extends control
*
* @param string $model
* @param int $programID
- * @param string $from project|program
* @param int $copyProjectID
* @access public
* @return void
*/
- public function create($model = 'waterfall', $programID = 0, $from = 'project', $copyProjectID = '')
+ public function create($model = 'waterfall', $programID = 0, $copyProjectID = 0)
{
if($_POST)
{
@@ -276,7 +275,7 @@ class project extends control
$this->loadModel('action')->create('project', $projectID, 'opened');
- if($from == 'program')
+ if($this->app->openApp == 'program')
{
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'browse')));
}
@@ -344,7 +343,6 @@ class project extends control
$this->view->auth = $auth;
$this->view->whitelist = $whitelist;
$this->view->copyProjectID = $copyProjectID;
- $this->view->from = $from;
$this->view->programList = $this->program->getParentPairs();
$this->view->parentProgram = $parentProgram;
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
@@ -505,7 +503,7 @@ class project extends control
$this->app->session->set('projectBrowse', $this->app->getURI(true));
- $products = $this->loadModel('product')->getProducts($projectID);;
+ $products = $this->loadModel('product')->getProducts($projectID);
$linkedBranches = array();
foreach($products as $product)
{
diff --git a/module/project/js/create.js b/module/project/js/create.js
index 5e4e6f06b3..797ffd5a67 100644
--- a/module/project/js/create.js
+++ b/module/project/js/create.js
@@ -25,7 +25,7 @@ $(function()
});
/**
- * Set parent project.
+ * Set parent program.
*
* @access public
* @return void
@@ -33,7 +33,7 @@ $(function()
function setParentProgram()
{
var parentProgram = $("#parent").val();
- location.href = createLink('project', 'create', 'model=' + model + '&projectID=' + parentProgram + '&from=' + from);
+ location.href = createLink('project', 'create', 'model=' + model + '&programID=' + parentProgram);
}
/**
@@ -45,7 +45,7 @@ function setParentProgram()
*/
function setCopyProject(copyProjectID)
{
- location.href = createLink('project', 'create', 'model=' + model + '&programID=' + programID + '&from=' + from + '©ProjectID=' + copyProjectID);
+ location.href = createLink('project', 'create', 'model=' + model + '&programID=' + programID + '©ProjectID=' + copyProjectID);
}
/**
diff --git a/module/project/view/create.html.php b/module/project/view/create.html.php
index abbde1ee8d..b4b005f207 100644
--- a/module/project/view/create.html.php
+++ b/module/project/view/create.html.php
@@ -1,12 +1,12 @@
* @package project
- * @version $Id: prjcreate.html.php 4769 2013-05-05 07:24:21Z wwccss $
+ * @version $Id: create.html.php 4769 2013-05-05 07:24:21Z wwccss $
* @link http://www.zentao.net
*/
?>
@@ -16,7 +16,6 @@
-
execution->weekend);?>
project->errorSameProducts);?>
project->longTime);?>