* Modify variable.

This commit is contained in:
tianshujie98
2021-01-20 15:00:56 +08:00
parent 319b97430e
commit f172a5d9e2
4 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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()));
+2 -2
View File
@@ -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');
}
}
})
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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>