Esempio n. 1
0
 /**
  * Delete the records without updating the parent info. It is used when deleting a whole channel and it's children need to be removed
  * @param array $childrenIds - list of node ids
  */
 public function deleteChildren($childrenIds)
 {
     //delete the main tables
     parent::deleteChildren($childrenIds);
     //delete videoitems
     $this->assertor->assertQuery('vBForum:videoitem', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'nodeid' => $childrenIds));
 }
Esempio n. 2
0
 /**
  * Delete the records without updating the parent info. It is used when deleting a whole channel and it's children need to be removed
  * @param array $childrenIds - list of node ids
  */
 public function deleteChildren($childrenIds)
 {
     foreach ($childrenIds as $photoId) {
         $fileDataRecord = $this->fetchFileDataRecord($photoId);
         $refCount = $fileDataRecord["refcount"] - 1;
         $data = array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_UPDATE, vB_dB_Query::CONDITIONS_KEY => array('filedataid' => $fileDataRecord["filedataid"]), 'refcount' => $refCount);
         $this->assertor->assertQuery("vBForum:filedata", $data);
     }
     //delete the main tables
     parent::deleteChildren($childrenIds);
 }