/[drupal]/drupal/modules/block.module
ViewVC logotype

Diff of /drupal/modules/block.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.206.2.8, Sun Mar 25 21:07:19 2007 UTC revision 1.206.2.9, Sun Mar 25 21:30:06 2007 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: block.module,v 1.206.2.7 2006/11/14 10:46:07 killes Exp $  // $Id: block.module,v 1.206.2.8 2007/03/25 21:07:19 killes Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 145  function _block_rehash() { Line 145  function _block_rehash() {
145    
146    init_theme();    init_theme();
147    
   db_lock_table('blocks');  
   
148    $result = db_query("SELECT * FROM {blocks} WHERE theme = '%s'", $theme_key);    $result = db_query("SELECT * FROM {blocks} WHERE theme = '%s'", $theme_key);
149    while ($old_block = db_fetch_object($result)) {    while ($old_block = db_fetch_object($result)) {
150      $old_blocks[$old_block->module][$old_block->delta] = $old_block;      $old_blocks[$old_block->module][$old_block->delta] = $old_block;
# Line 185  function _block_rehash() { Line 183  function _block_rehash() {
183      }      }
184    }    }
185    
186      db_lock_table('blocks');
187    // Remove all blocks from table.    // Remove all blocks from table.
188    db_query("DELETE FROM {blocks} WHERE theme = '%s'", $theme_key);    db_query("DELETE FROM {blocks} WHERE theme = '%s'", $theme_key);
189    

Legend:
Removed from v.1.206.2.8  
changed lines
  Added in v.1.206.2.9

  ViewVC Help
Powered by ViewVC 1.1.2