I was looking for some problems when adding blocks to site page in 1.4. It was using:
if($course->id == 1)
and I changed it to:
Because some users reported me that their 'site course' wasn't the id=1).
With the addition in Moodle 1.5 of the new constant SITEID=1, we are assuming that the the course 1 is ALWAYS the site course, and it seems to be FALSE.
To be more chaotic, the get_site() function (often used) selects the first course whose category = 0, what is completely in collision with the new SITEID constant.
I think that we should define this to be consistent across all the code.
We could execute the SITEID = get_site()->id only once and then maintain the SITEID (or the whole SITE) variable in the session...only one idea.