* Delete useless code.

This commit is contained in:
tianshujie
2022-06-16 17:21:50 +08:00
parent 9f21391681
commit fc2aea0aa9
-18
View File
@@ -759,24 +759,6 @@ class productModel extends model
->stripTags($this->config->product->editor->edit['id'], $this->config->allowedTags)
->remove('uid,changeProjects,contactListMenu')
->get();
if($this->config->systemMode == 'new')
{
if($product->program != $oldProduct->program)
{
/* Link the projects stories under this product. */
$unmodifiableProjects = $this->dao->select('t1.*')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
->where('t1.product')->eq($productID)
->andWhere('t2.type')->eq('project')
->andWhere('t2.deleted')->eq('0')
->fetchPairs('project', 'product');
if(!empty($unmodifiableProjects))
{
dao::$errors[] = $this->lang->product->changeProgramError;
return false;
}
}
}
$product = $this->loadModel('file')->processImgURL($product, $this->config->product->editor->edit['id'], $this->post->uid);