@kriskoyk
Checked code.
This is from model to do updates in DB.
public function republish_times( $item_id ) {
return $this->dao->query('UPDATE '.$this->getTable_ItemBO().' SET republish_times=coalesce(republish_times, 0)+1 WHERE item_id='.$item_id);
}
public function republish_auto( $item_id ) {
return $this->dao->query('UPDATE '.$this->getTable_ItemBO().' SET republish_auto=coalesce(republish_auto, 0)-1 WHERE item_id='.$item_id);
}
It looks OK.
You can test republish by adding this code i.e. to theme functions.php and refreshing page.
ModelBO::newInstance()->republish_item( 284, '2021-01-01', null, false, true);
-> 284 is item id, then you have publish date, then expire date...