Da monster-commit of blocks version 2!
Code based on the work of Daryl Hawes for the blog module. Thanks, Daryl! Please test the hell out of it as it's sure to have issues that need to be ironed out.
This commit is contained in:
+3
-3
@@ -20,12 +20,12 @@
|
||||
|
||||
require_variable($_REQUEST['block']);
|
||||
$blockid = intval($_REQUEST['block']);
|
||||
|
||||
if(($blockrecord = get_record('blocks', 'id', $blockid)) === false) {
|
||||
|
||||
if(($blockrecord = blocks_get_record($blockid)) === false) {
|
||||
error('This block does not exist');
|
||||
}
|
||||
|
||||
$block = block_instance($blockrecord->name, NULL);
|
||||
$block = block_instance($blockrecord->name);
|
||||
if($block === false) {
|
||||
error('Problem in instantiating block object');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user