Git commits in Moodle 2.1.x by Nathan Mares

commit c090fe60c7bf1b452bd889944a90be283d8590b9
Author: Nathan Mares <nathan@catalyst-au.net>
Date:   Tue, 17 Jul 2012 17:11:57 +0800
Tag:    v2.1.8

MDL-34368: Fix broken query in so tokens are correctly checked against the linked service