Exemple #1
0
	function Update($RIGHT_ID, $GROUP_CODE)
	{
		global $DB;
		$RIGHT_ID = intval($RIGHT_ID);

		if (is_array($GROUP_CODE))
		{
			foreach($GROUP_CODE as $GROUP_CODE_TMP)
				CSocNetLogRights::Update($RIGHT_ID, $GROUP_CODE_TMP);
			return false;
		}
		else
		{
			$db_events = GetModuleEvents("socialnetwork", "OnBeforeSocNetLogRightsUpdate");
			while ($arEvent = $db_events->Fetch())
				if (ExecuteModuleEventEx($arEvent, array($RIGHT_ID, &$GROUP_CODE))===false)
					return false;

			$strUpdate = $DB->PrepareUpdate("b_sonet_log_right", array(
				"GROUP_CODE" => $GROUP_CODE
			));
			$DB->Query("UPDATE b_sonet_log_right SET ".$strUpdate." WHERE ID = ".$RIGHT_ID);
			return $RIGHT_ID;
		}
	}