getTable('phocagalleryimgvotes'); if (!$row->bind($data)) { $this->setError($row->getError()); return false; } $row->date = gmdate('Y-m-d H:i:s'); $row->published = 1; if (!$row->id) { $where = 'imgid = ' . (int) $row->imgid ; $row->ordering = $row->getNextOrder( $where ); } if (!$row->check()) { $this->setError($row->getError()); return false; } if (!$row->store()) { $this->setError($row->getError()); return false; } // Update the Vote Statistics if (!PhocaGalleryRateImage::updateVoteStatistics( $data['imgid'])) { return false; } return true; } } ?>