~davidstrauss/pressflow/variable-write-through

« back to all changes in this revision

Viewing changes to modules/block/block.module

  • Committer: David Strauss
  • Date: 2009-12-17 00:30:08 UTC
  • mfrom: (1.1.9 6-stable)
  • Revision ID: david@fourkitchens.com-20091217003008-dhhtai679ecfigz5
MergeĀ DrupalĀ 6.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
// $Id: block.module,v 1.299.2.3 2008/06/24 14:40:08 goba Exp $
 
2
// $Id: block.module,v 1.299.2.4 2009/10/06 12:13:01 goba Exp $
3
3
 
4
4
/**
5
5
 * @file
298
298
  return $blocks;
299
299
}
300
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
 */
301
314
function block_box_get($bid) {
302
315
  return db_fetch_array(db_query("SELECT * FROM {boxes} WHERE bid = %d", $bid));
303
316
}
336
349
  return $form;
337
350
}
338
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
 */
339
365
function block_box_save($edit, $delta) {
340
366
  if (!filter_access($edit['format'])) {
341
367
    $edit['format'] = FILTER_FORMAT_DEFAULT;