summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-07-30 10:16:48 +0000
committerDries Buytaert <dries@buytaert.net>2009-07-30 10:16:48 +0000
commit4e96b4e5dfbc6d88d6bce38602916ffd659a5b61 (patch)
treeb8f2f236ffc0778c7cc930352e2124cace1c5a56 /includes
parentafb395d5b65c64b2e69782f0cbcea1cc79143cd2 (diff)
downloadbrdo-4e96b4e5dfbc6d88d6bce38602916ffd659a5b61.tar.gz
brdo-4e96b4e5dfbc6d88d6bce38602916ffd659a5b61.tar.bz2
- Patch #535264 by Crell: removing some more legacy cruft.
Diffstat (limited to 'includes')
-rw-r--r--includes/database/database.inc34
-rw-r--r--includes/install.inc18
-rw-r--r--includes/menu.inc3
3 files changed, 17 insertions, 38 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc
index e27aed807..5063b4233 100644
--- a/includes/database/database.inc
+++ b/includes/database/database.inc
@@ -2494,10 +2494,6 @@ function db_fetch_object(DatabaseStatementInterface $statement) {
return $statement->fetch(PDO::FETCH_OBJ);
}
-function db_fetch_array(DatabaseStatementInterface $statement) {
- return $statement->fetch(PDO::FETCH_ASSOC);
-}
-
function db_result(DatabaseStatementInterface $statement) {
return $statement->fetchField();
}
@@ -2561,21 +2557,6 @@ function _db_query_process_args($query, $args, $options) {
return array($query, $args, $options);
}
-
-/**
- * Returns the last insert id.
- *
- * @todo Remove this function when all queries have been ported to db_insert().
- * @param $table
- * The name of the table you inserted into.
- * @param $field
- * The name of the autoincrement field.
- */
-function db_last_insert_id($table, $field) {
- $sequence_name = Database::getConnection()->makeSequenceName($table, $field);
- return Database::getConnection()->lastInsertId($sequence_name);
-}
-
/**
* Helper function for db_rewrite_sql.
*
@@ -2694,20 +2675,5 @@ function db_rewrite_sql($query, $primary_table = 'n', $primary_field = 'nid', $
}
/**
- * Ensures the environment for a Drupal database on a predefined connection.
- *
- * This will run tasks that check that Drupal can perform all of the functions
- * on a database, that Drupal needs. Tasks include simple checks like CREATE
- * TABLE to database specfic functions like stored procedures and client
- * encoding.
- */
-function db_run_tasks($driver) {
- $task_class = 'DatabaseTasks_' . $driver;
- $DatabaseTasks = new $task_class();
- $DatabaseTasks->runTasks();
- return true;
-}
-
-/**
* @} End of "ingroup database-legacy".
*/
diff --git a/includes/install.inc b/includes/install.inc
index f145f4ec8..01864cd31 100644
--- a/includes/install.inc
+++ b/includes/install.inc
@@ -1083,8 +1083,8 @@ function install_profile_info($profile, $locale = 'en') {
);
$info = drupal_parse_info_file("profiles/$profile/$profile.info") + $defaults;
$info['dependencies'] = array_unique(array_merge(
- drupal_required_modules(),
- $info['dependencies'],
+ drupal_required_modules(),
+ $info['dependencies'],
($locale != 'en' && !empty($locale) ? array('locale') : array()))
);
$cache[$profile] = $info;
@@ -1092,3 +1092,17 @@ function install_profile_info($profile, $locale = 'en') {
return $cache[$profile];
}
+/**
+ * Ensures the environment for a Drupal database on a predefined connection.
+ *
+ * This will run tasks that check that Drupal can perform all of the functions
+ * on a database, that Drupal needs. Tasks include simple checks like CREATE
+ * TABLE to database specfic functions like stored procedures and client
+ * encoding.
+ */
+function db_run_tasks($driver) {
+ $task_class = 'DatabaseTasks_' . $driver;
+ $DatabaseTasks = new $task_class();
+ $DatabaseTasks->runTasks();
+ return true;
+}
diff --git a/includes/menu.inc b/includes/menu.inc
index 82772b426..be222026b 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -1119,7 +1119,6 @@ function menu_tree_collect_node_links(&$tree, &$node_links) {
function menu_tree_check_access(&$tree, $node_links = array()) {
if ($node_links) {
- // Use db_rewrite_sql to evaluate view access without loading each full node.
$nids = array_keys($node_links);
$select = db_select('node');
$select->addField('node', 'nid');
@@ -1269,7 +1268,7 @@ function theme_menu_tree($tree) {
* The menu item's LI element is given one of the following classes:
* - expanded: The menu item is showing its submenu.
* - collapsed: The menu item has a submenu which is not shown.
- * - leaf: The menu item has no submenu.
+ * - leaf: The menu item has no submenu.
*
* @ingroup themeable
*