Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
9cf185c3
Commit
9cf185c3
authored
Jul 19, 2010
by
Dries
Browse files
- Patch
#852362
by chx: fixed extend is 100% fubar.
parent
74419892
Changes
2
Hide whitespace changes
Inline
Side-by-side
includes/database/database.inc
View file @
9cf185c3
...
@@ -646,7 +646,7 @@ protected function expandArguments(&$query, &$args) {
...
@@ -646,7 +646,7 @@ protected function expandArguments(&$query, &$args) {
* @return string
* @return string
* The name of the class that should be used for this driver.
* The name of the class that should be used for this driver.
*/
*/
p
rotected
function
getDriverClass
(
$class
)
{
p
ublic
function
getDriverClass
(
$class
)
{
if
(
empty
(
$this
->
driverClasses
[
$class
]))
{
if
(
empty
(
$this
->
driverClasses
[
$class
]))
{
$this
->
driverClasses
[
$class
]
=
$class
.
'_'
.
$this
->
driver
();
$this
->
driverClasses
[
$class
]
=
$class
.
'_'
.
$this
->
driver
();
if
(
!
class_exists
(
$this
->
driverClasses
[
$class
]))
{
if
(
!
class_exists
(
$this
->
driverClasses
[
$class
]))
{
...
...
includes/database/select.inc
View file @
9cf185c3
...
@@ -601,11 +601,8 @@ public function havingCompile(DatabaseConnection $connection) {
...
@@ -601,11 +601,8 @@ public function havingCompile(DatabaseConnection $connection) {
/* Implementations of QueryExtendableInterface. */
/* Implementations of QueryExtendableInterface. */
public
function
extend
(
$extender_name
)
{
public
function
extend
(
$extender_name
)
{
$override_class
=
$this
->
connection
->
driver
();
$class
=
$this
->
connection
->
getDriverClass
(
$extender_name
);
if
(
class_exists
(
$override_class
))
{
return
new
$class
(
$this
,
$this
->
connection
);
$extender_name
=
$override_class
;
}
return
new
$extender_name
(
$this
,
$this
->
connection
);
}
}
/* Alter accessors to expose the query data to alter hooks. */
/* Alter accessors to expose the query data to alter hooks. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment