Skip to content

Commit

Permalink
MINOR Quoting relation tables in new ManyManyList API
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Oct 7, 2011
1 parent df56eb5 commit 0a8a178
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions model/ManyManyList.php
Expand Up @@ -113,7 +113,7 @@ function remove($item) {
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()) {
Expand All @@ -131,7 +131,7 @@ function removeByID($itemID) {
* @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();
Expand Down
2 changes: 1 addition & 1 deletion security/Member.php
Expand Up @@ -1412,7 +1412,7 @@ public function setForeignID($id) {

// 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();
Expand Down

0 comments on commit 0a8a178

Please sign in to comment.