<?php

if ((empty($$class->reference_table)) && (!empty($_GET['custom_block'])) && ($_GET['custom_block'] == 1)) {
 $$class->reference_table = 'block_content';
}

if ((!empty($$class->block_id)) && ( $$class->reference_table == 'block_content')) {
 $$class_second = block_content::find_by_block_id($$class->block_id);
 if (DB_TYPE == 'ORACLE') {
  $$class_second->content = stream_get_contents($$class_second->content);
 }
}

if (!empty($$class_second->block_content_id)) {
 if (($$class_second->content_php_cb) == 1) {
  $$class_second->content = base64_decode($$class_second->content);
 }
}

$readonly_id = !empty($$class->block_id) ? 1 : false;
?>
