Exemple #1
0
 public function deleteRecord()
 {
     // Create a pending change
     WT_DB::prepare("INSERT INTO `##change` (gedcom_id, xref, old_gedcom, new_gedcom, user_id) VALUES (?, ?, ?, '', ?)")->execute(array($this->gedcom_id, $this->xref, $this->getGedcom(), Auth::id()));
     // Accept this pending change
     if (Auth::user()->getSetting('auto_accept')) {
         accept_all_changes($this->xref, $this->gedcom_id);
     }
     // Clear the cache
     self::$gedcom_record_cache = null;
     self::$pending_record_cache = null;
     Log::addEditLog('Delete: ' . static::RECORD_TYPE . ' ' . $this->xref);
 }