function updateDurationCache($calendars_id) { if ($this->getFromDB($calendars_id)) { $input['id'] = $calendars_id; $input['cache_duration'] = exportArrayToDB($this->getDaysDurations()); return $this->update($input); } return false; }
function post_deleteFromDB() { // Update calendar cache $cal = new Calendar(); $cal->updateDurationCache($this->fields['calendars_id']); parent::post_deleteFromDB(); }