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

merge-requests/26/head
Dries Buytaert 2008-08-22 12:46:25 +00:00
parent f8aa38a1e1
commit ba0672bc60
4 changed files with 2 additions and 13 deletions

View File

@ -14,7 +14,6 @@
class DatabaseConnection_pgsql extends DatabaseConnection {
protected $transactionSupport;
//protected $lastInsertInfo = NULL;
public function __construct(Array $connection_options = array()) {

View File

@ -630,7 +630,7 @@ class MergeQuery extends Query {
// 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.

View File

@ -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.
*

View File

@ -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']);
}