owncloud/core — pull request #685 by wshadow (2012-12-03 13:35:15+00:00)
Title: reduce number of queries on the db

execute $query->execute(array($oldPath.'/%')) only once and iterate through the results
instead of executing it until it doesn't return any more results.