IdoQuery: pass ourselves to hook, not back to us

This commit is contained in:
Thomas Gelf 2015-11-13 18:01:39 +01:00
parent 30f8faf0ba
commit b643c97fb0

View File

@ -828,7 +828,7 @@ abstract class IdoQuery extends DbQuery
} }
if ($this->virtualTableIsHooked($name)) { if ($this->virtualTableIsHooked($name)) {
return $this->joinHookedVirtualTable($this, $name); return $this->joinHookedVirtualTable($name);
} else { } else {
return $this->joinVirtualTable($name); return $this->joinVirtualTable($name);
} }
@ -890,7 +890,7 @@ abstract class IdoQuery extends DbQuery
*/ */
protected function joinHookedVirtualTable($table) protected function joinHookedVirtualTable($table)
{ {
$this->hookedVirtualTables[$table]->joinVirtualTable($table); $this->hookedVirtualTables[$table]->joinVirtualTable($this, $table);
$this->joinedVirtualTables[$table] = true; $this->joinedVirtualTables[$table] = true;
return $this; return $this;
} }