private static function validateConference($confTitle, $venueName) { if (empty($confTitle) || empty($venueName)) { Session::push('feedback_negative', Text::get('CONFERENCE_FIELD_EMPTY')); return false; } // no conference by this title should exist if (ConferenceModel::getConferenceByTitle($confTitle)) { Session::push('feedback_negative', Text::get('CONFERENCE_ALREADY_EXISTS')); return false; } if (!VenueModel::venueExists($venueName)) { if (!VenueModel::createVenueInDb($venueName)) { Session::push('feedback_negative', Text::get('UNKNOWN_ERROR')); return false; } } return true; }