From 4e96b4e5dfbc6d88d6bce38602916ffd659a5b61 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 30 Jul 2009 10:16:48 +0000 Subject: - Patch #535264 by Crell: removing some more legacy cruft. --- includes/database/database.inc | 34 ---------------------------------- includes/install.inc | 18 ++++++++++++++++-- includes/menu.inc | 3 +-- 3 files changed, 17 insertions(+), 38 deletions(-) (limited to 'includes') 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. * @@ -2693,21 +2674,6 @@ function db_rewrite_sql($query, $primary_table = 'n', $primary_field = 'nid', $ return $query; } -/** - * 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 * -- cgit v1.2.3