* Modify variable.
This commit is contained in:
@@ -376,7 +376,7 @@ class product extends control
|
||||
/* Change the projects set of the program. */
|
||||
if(($_POST['program'] != $product->program) and $projects)
|
||||
{
|
||||
$this->product->updateProjects($projects, $_POST['program'], $_POST['comfirmChange']);
|
||||
$this->product->updateProjects($projects, $_POST['program'], $_POST['confirmChange']);
|
||||
}
|
||||
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
@@ -26,11 +26,11 @@ $(function()
|
||||
if(singleLinkProjects) alert(PGMChangeTip);
|
||||
if(multipleLinkProjects && confirm(confirmChangePGM))
|
||||
{
|
||||
$('#comfirmChange').val('yes');
|
||||
$('#confirmChange').val('yes');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#comfirmChange').val('no');
|
||||
$('#confirmChange').val('no');
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -545,7 +545,7 @@ class productModel extends model
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->join('whitelist', ',')
|
||||
->stripTags($this->config->product->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('uid,comfirmChange')
|
||||
->remove('uid,confirmChange')
|
||||
->get();
|
||||
|
||||
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], $this->post->uid);
|
||||
@@ -1516,11 +1516,11 @@ class productModel extends model
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateProjects($projects, $programID, $comfirmChange = 'no')
|
||||
public function updateProjects($projects, $programID, $confirmChange = 'no')
|
||||
{
|
||||
foreach($projects as $project)
|
||||
{
|
||||
if((count($project->product) == 1) or $comfirmChange == 'yes')
|
||||
if((count($project->product) == 1) or $confirmChange == 'yes')
|
||||
{
|
||||
$this->dao->update(TABLE_PROJECT)
|
||||
->set('parent')->eq($programID)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->program;?></th>
|
||||
<td><?php echo html::select('program', $programs, $product->program, "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::hidden('comfirmChange', 'no');?></td>
|
||||
<td><?php echo html::hidden('confirmChange', 'no');?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user