]> git.mjollnir.org Git - moodle.git/commit
course/index: move orphan fixups to an optimised fix_coursecategory_orphans()
authormartinlanghoff <martinlanghoff>
Wed, 12 Sep 2007 02:56:36 +0000 (02:56 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 12 Sep 2007 02:56:36 +0000 (02:56 +0000)
commitd86341924569cccac106c4d269af017757cb6a2d
tree49c6f1e2a9e2152c2f1befdd54c6a038bc8fa1b1
parentf8ea60777cbee3ef2b44b6bc46f45e525c567130
course/index: move orphan fixups to an optimised fix_coursecategory_orphans()

Move the fixups for orphan courses to the newly minted
fix_coursecategory_orphans() -- and optimise it to take only 1 dbquery for
the common case.

If we do find lots of orphans, we issue 2 updates per orphan.

This cuts down dbqueries drastically - we used to have 2x the number of
courses in the site.
course/index.php
lib/datalib.php