MINOR Quoting relation tables in new ManyManyList API

This commit is contained in:
Ingo Schommer 2011-10-07 14:11:07 +02:00
parent df56eb540a
commit 0a8a17833f
2 changed files with 3 additions and 3 deletions

View File

@ -113,7 +113,7 @@ class ManyManyList extends RelationList {
function removeByID($itemID) {
if(!is_numeric($itemID)) throw new InvalidArgumentException("ManyManyList::removeById() expecting an ID");
$query = new SQLQuery("*", array($this->joinTable));
$query = new SQLQuery("*", array("\"$this->joinTable\""));
$query->delete = true;
if($filter = $this->foreignIDFilter()) {
@ -131,7 +131,7 @@ class ManyManyList extends RelationList {
* @deprecated this is experimental and will change. Don't use it in your projects.
*/
function removeByFilter($filter) {
$query = new SQLQuery("*", array($this->joinTable));
$query = new SQLQuery("*", array("\"$this->joinTable\""));
$query->delete = true;
$query->where($filter);
$query->execute();

View File

@ -1412,7 +1412,7 @@ class Member_GroupSet extends ManyManyList {
// Find directly applied groups
$manymanyFilter = $this->foreignIDFilter();
$groupIDs = DB::query('SELECT "GroupID" FROM Group_Members WHERE ' . $manymanyFilter)->column();
$groupIDs = DB::query('SELECT "GroupID" FROM "Group_Members" WHERE ' . $manymanyFilter)->column();
// Get all ancestors
$allGroupIDs = array();