Ejemplo n.º 1
0
 /** This cleans up for a node that was found to be incomplete by deleting the child nodes and subsidiary table records
 	 *
 	@param	mixed	node record, which may have missing child table data.
 	 */
 public function incompleteNodeCleanup($node)
 {
     $deleted = parent::incompleteNodeCleanup($node);
     if ($deleted) {
         //The text and privatemessage records will be deleted by the parent. We need to delete the sentto records.
         $this->assertor->assertQuery('vBForum:sentto', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'nodeid' => $node['nodeid']));
     }
     return $deleted;
 }
Ejemplo n.º 2
0
 /** This cleans up for a node that was found to be incomplete by deleting the child nodes and subsidiary table records
 	 *
 	@param	mixed	node record, which may have missing child table data.
 	 */
 public function incompleteNodeCleanup($node)
 {
     $deleted = parent::incompleteNodeCleanup($node);
     if ($deleted) {
         //The poll, text, and node records will be deleted by the parent. We need to delete polloption and pollvote;
         $params = array(vB_db_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'nodeid' => $node['nodeid']);
         //delete polloptions
         $this->assertor->assertQuery('vBForum:polloption', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'nodeid' => $node['nodeid']));
         //delete pollvotes
         $this->assertor->assertQuery('vBForum:pollvote', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_DELETE, 'nodeid' => $node['nodeid']));
     }
     return $deleted;
 }
Ejemplo n.º 3
0
 /** This function either deletes the gallery if it has no photos, or fixes it.
 	 *
 	@param	mixed	node record, which may have missing child table data.
 	 */
 public function incompleteNodeCleanup($node)
 {
     //If we have child records we should create whatever records we missed.
     $children = $this->assertor->assertQuery('vBForum:node', array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'parentid' => $node['nodeid']));
     if ($children->valid()) {
         //We need to make sure we have text and gallery records.
         foreach ((array) $this->tablename as $table) {
             $tableCheck = $this->assertor->assertQuery('vBForum:' . $table, array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_SELECT, 'nodeid' => $node['nodeid']));
             if (!$tableCheck->valid()) {
                 $this->assertor->assertQuery('vBForum:' . $table, array(vB_dB_Query::TYPE_KEY => vB_dB_Query::QUERY_INSERT, 'nodeid' => $node['nodeid']));
             }
         }
         vB_Cache::instance()->allCacheEvent(array('nodeChg_' . $node['parentid'], 'nodeChg_' . $node['nodeid']));
         vB_Library::instance('node')->clearCacheEvents($node['nodeid']);
     } else {
         //Just do the delete, which is handled in the parent classes
         parent::incompleteNodeCleanup($node);
     }
 }