/** * Updates the name of an additional folder to the given device and the Request::GetGETUser(). * * @param string $deviceId device id of where the folder should be updated. * @param string $add_folderid the folder id of the additional folder. * @param string $add_name the name of the additional folder (has to be unique for all folders on the device). * @param int $add_flags Additional flags, like DeviceManager::FLD_FLAGS_REPLYASUSER * * @access public * @return boolean */ public function AdditionalFolderEdit($deviceId, $add_folderid, $add_name, $add_flags) { $user = Request::GetGETUser(); $deviceId = preg_replace("/[^A-Za-z0-9]/", "", $deviceId); $add_folderid = preg_replace("/[^A-Za-z0-9]/", "", $add_folderid); $add_flags = preg_replace("/[^0-9]/", "", $add_flags); $status = ZPushAdmin::AdditionalFolderEdit($user, $deviceId, $add_folderid, $add_name, $add_flags); if (!$status) { ZPush::GetTopCollector()->AnnounceInformation(ZLog::GetLastMessage(LOGLEVEL_ERROR), true); throw new SoapFault("ERROR", ZLog::GetLastMessage(LOGLEVEL_ERROR)); } ZLog::Write(LOGLEVEL_INFO, sprintf("WebserviceDevice::AdditionalFolderEdit(): edited folder for device '%s' of user '%s': %s", $deviceId, $user, Utils::PrintAsString($status))); ZPush::GetTopCollector()->AnnounceInformation("Edited additional folder", true); return $status; }