/** * Set the proposedFor location of the resource. Also add the editor who proposed the location. * * @param integer $location the location to set * @param CMS_profile_user &$user the user who did the edition * @return boolean true on success, false on failure * @access public */ function setProposedLocation($location, &$user) { if (!is_a($user, "CMS_profile_user")) { $this->raiseError("Didn't received a valid user"); return false; } if (is_object($this->_status) && $this->_status->setProposedFor($location)) { //add the edition $this->_status->addEdition(RESOURCE_EDITION_LOCATION); //add the user to the editors $this->_editors->add($user->getUserID(), RESOURCE_EDITION_LOCATION); return true; } else { return false; } }