Merge branch 'master' into doctrine

Conflicts:
	3rdparty
	lib/db.php
	lib/setup.php
	tests/lib/db.php
	tests/lib/dbschema.php