Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
df7bcec7
Commit
df7bcec7
authored
16 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#302395
by chx: Minor DBTNG clean-up.
parent
c17a5e70
No related branches found
No related tags found
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/database/database.inc
+3
-3
3 additions, 3 deletions
includes/database/database.inc
includes/database/schema.inc
+8
-8
8 additions, 8 deletions
includes/database/schema.inc
with
11 additions
and
11 deletions
includes/database/database.inc
+
3
−
3
View file @
df7bcec7
...
...
@@ -250,7 +250,7 @@ protected function prefixTables($sql) {
/**
* Prepare a query string and return the prepared statement.
*
*
* This method statically caches prepared statements, reusing them when
* possible. It also prefixes tables names enclosed in curly-braces.
*
...
...
@@ -712,7 +712,7 @@ final public static function getConnection($key = 'default', $target = 'default'
* TRUE if there is at least one database connection established, FALSE otherwise.
*/
final
public
static
function
isActiveConnection
()
{
return
!
empty
(
self
::
$
connections
);
return
!
empty
(
self
::
$
activeKey
)
&&
!
empty
(
self
::
$connections
)
&&
!
empty
(
self
::
$connections
[
self
::
$activeKey
]
);
}
/**
...
...
@@ -1356,7 +1356,7 @@ function db_escape_table($table) {
* query: the SQL query executed, passed through check_plain()
*/
function
update_sql
(
$sql
)
{
$result
=
Database
::
getActiveConnection
()
->
query
(
$sql
/*, array(true)*/
);
$result
=
Database
::
getActiveConnection
()
->
query
(
$sql
);
return
array
(
'success'
=>
$result
!==
FALSE
,
'query'
=>
check_plain
(
$sql
));
}
...
...
This diff is collapsed.
Click to expand it.
includes/database/schema.inc
+
8
−
8
View file @
df7bcec7
...
...
@@ -117,29 +117,29 @@
*/
abstract
class
DatabaseSchema
{
protected
$connection
;
public
function
__construct
(
$connection
)
{
$this
->
connection
=
$connection
;
}
/**
* Check if a table exists.
*/
abstract
public
function
tableExists
(
$table
);
/**
* Check if a column exists in the given table.
*/
abstract
public
function
columnExists
(
$table
,
$column
);
/**
* This maps a generic data type in combination with its data size
* to the engine-specific data type.
*/
abstract
public
function
getFieldTypeMap
();
/**
* Rename a table.
*
...
...
@@ -161,7 +161,7 @@ abstract public function renameTable(&$ret, $table, $new_name);
* The table to be dropped.
*/
abstract
public
function
dropTable
(
&
$ret
,
$table
);
/**
* Add a new field to a table.
*
...
...
@@ -380,7 +380,7 @@ public function createTable(&$ret, $name, $table) {
$ret
[]
=
update_sql
(
$statement
);
}
}
/**
* Return an array of field names from an array of key/index column specifiers.
*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment