Commit 9cf185c3 authored by Dries's avatar Dries

- Patch #852362 by chx: fixed extend is 100% fubar.

parent 74419892
......@@ -646,7 +646,7 @@ protected function expandArguments(&$query, &$args) {
* @return string
* The name of the class that should be used for this driver.
*/
protected function getDriverClass($class) {
public function getDriverClass($class) {
if (empty($this->driverClasses[$class])) {
$this->driverClasses[$class] = $class . '_' . $this->driver();
if (!class_exists($this->driverClasses[$class])) {
......
......@@ -601,11 +601,8 @@ public function havingCompile(DatabaseConnection $connection) {
/* Implementations of QueryExtendableInterface. */
public function extend($extender_name) {
$override_class = $this->connection->driver();
if (class_exists($override_class)) {
$extender_name = $override_class;
}
return new $extender_name($this, $this->connection);
$class = $this->connection->getDriverClass($extender_name);
return new $class($this, $this->connection);
}
/* Alter accessors to expose the query data to alter hooks. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment