public function post_newCustom_newState_newCountry_handler() { global $FANNIE_OP_DB; $dbc = FannieDB::get($FANNIE_OP_DB); $model = new OriginsModel($dbc); if ($this->newCustom || $this->newState || $this->newCountry) { // at least one FK required $model->customID($this->newCustom); $model->stateProvID($this->newState); $model->countryID($this->newCountry); $model->local(0); $model->save(); $this->normalizeOriginNames(); } header('Location: OriginEditor.php'); return false; }