JKRowling changed the reading she had planned at Edinburgh castle because of the London attacks. From the joint interview, part 2, with MuggleNet and The Leaky Cauldron:
Terrorism and the like; has it factored into your writing, has it shaped your writing?
JKR: No, never consciously, in the sense that I've never thought, "It's time for a post-9/11 Harry Potter book," no. But what Voldemort does, in many senses, is terrorism, and that was quite clear in my mind before 9/11 happened. I was going to read last night [ie, do the midnight reading at the castle] from chapter one. That was the reading until the 7th of July [bombings in London]. It then became quite clear to me that it was going to be grossly inappropriate for me to read a passage in which the Muggle prime minister is discussing a mass Muggle killing. It just wasn't appropriate, as there are touches of levity in there. It was totally inappropriate, so that's when I had to change, and I decided to go for the joke shop, which is all very symbolic because, of course, Harry said to Fred and George, “I’ve got a feeling we’ll all be needing a few laughs before long.” It all ties together nicely. So no, not consciously, but there are parallels, obviously. I think one of the times I felt the parallels was when I was writing about the arrest of Stan Shunpike, you know? I always planned that these kinds of things would happen, but these have very powerful resonances, given that I believe, and many people believe, that there have been instances of persecution of people who did not deserve to be persecuted, even while we're attempting to find the people who have committed utter atrocities. These things just happen, it's human nature. There were some very startling parallels at the time I was writing it.
Clip of JKRowling reading at Edinburgh castle.
When Harry Met Osama: Terrorism comes to Hogwarts from Slate.com