Commit ba0672bc authored by Dries's avatar Dries
Browse files

- Patch #298581 by Damien Tournoud: database clean-ups.

parent f8aa38a1
......@@ -14,7 +14,6 @@
class DatabaseConnection_pgsql extends DatabaseConnection {
protected $transactionSupport;
//protected $lastInsertInfo = NULL;
public function __construct(Array $connection_options = array()) {
......
......@@ -630,7 +630,7 @@ public function execute() {
// this method with database-specific logic, so this function serves only
// as a fallback to aid developers of new drivers.
//Wrap multiple queries in a transaction, if the database supports it.
// Wrap multiple queries in a transaction, if the database supports it.
$transaction = $this->connection->startTransaction();
// Manually check if the record already exists.
......
......@@ -43,13 +43,6 @@ class SelectQuery extends Query implements QueryConditionInterface, QueryAlterab
*/
protected $tables = array();
/**
* The values to insert into the prepared statement of this query.
*
* @var array
*/
//protected $arguments = array();
/**
* The fields by which to order this query.
*
......
......@@ -2211,10 +2211,8 @@ function _menu_link_move_children($item, $existing_item) {
function _menu_update_parental_status($item, $exclude = FALSE) {
// If plid == 0, there is nothing to update.
if ($item['plid']) {
// We may want to exclude the passed link as a possible child.
//$where = $exclude ? " AND mlid != %d" : '';
// Check if at least one visible child exists in the table.
$query = db_select('menu_links', 'm');
$query = db_select('menu_links', 'm');
$query->addField('m', 'mlid');
$query->condition('menu_name', $item['menu_name']);
$query->condition('plid', $item['plid']);
......@@ -2225,7 +2223,6 @@ function _menu_update_parental_status($item, $exclude = FALSE) {
}
$parent_has_children = ((bool) $query->execute()->fetchField()) ? 1 : 0;
//$parent_has_children = (bool)db_result(db_query_range("SELECT mlid FROM {menu_links} WHERE menu_name = '%s' AND plid = %d AND hidden = 0" . $where, $item['menu_name'], $item['plid'], $item['mlid'], 0, 1));
db_query("UPDATE {menu_links} SET has_children = %d WHERE mlid = %d", $parent_has_children, $item['plid']);
}
......
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