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

Diff of /drupal/modules/block/block.module

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

revision 1.299.2.3 by goba, Tue Jun 24 14:40:08 2008 UTC revision 1.299.2.4 by goba, Tue Oct 6 12:13:01 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: block.module,v 1.299.2.2 2008/04/09 21:11:45 goba Exp $  // $Id: block.module,v 1.299.2.3 2008/06/24 14:40:08 goba Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 298  function _block_rehash() { Line 298  function _block_rehash() {
298    return $blocks;    return $blocks;
299  }  }
300    
301    /**
302     * Returns information from database about a user-created (custom) block.
303     *
304     * @param $bid
305     *   ID of the block to get information for.
306     * @return
307     *   Associative array of information stored in the database for this block.
308     *   Array keys:
309     *   - bid: Block ID.
310     *   - info: Block description.
311     *   - body: Block contents.
312     *   - format: Filter ID of the filter format for the body.
313     */
314  function block_box_get($bid) {  function block_box_get($bid) {
315    return db_fetch_array(db_query("SELECT * FROM {boxes} WHERE bid = %d", $bid));    return db_fetch_array(db_query("SELECT * FROM {boxes} WHERE bid = %d", $bid));
316  }  }
# Line 336  function block_box_form($edit = array()) Line 349  function block_box_form($edit = array())
349    return $form;    return $form;
350  }  }
351    
352    /**
353     * Saves a user-created block in the database.
354     *
355     * @param $edit
356     *   Associative array of fields to save. Array keys:
357     *   - info: Block description.
358     *   - body: Block contents.
359     *   - format: Filter ID of the filter format for the body.
360     * @param $delta
361     *   Block ID of the block to save.
362     * @return
363     *   Always returns TRUE.
364     */
365  function block_box_save($edit, $delta) {  function block_box_save($edit, $delta) {
366    if (!filter_access($edit['format'])) {    if (!filter_access($edit['format'])) {
367      $edit['format'] = FILTER_FORMAT_DEFAULT;      $edit['format'] = FILTER_FORMAT_DEFAULT;

Legend:
Removed from v.1.299.2.3  
changed lines
  Added in v.1.299.2.4

  ViewVC Help
Powered by ViewVC 1.1.3