diff --git a/module/block/control.php b/module/block/control.php index ee51a33910..574dc19c03 100644 --- a/module/block/control.php +++ b/module/block/control.php @@ -344,7 +344,14 @@ class block extends control $this->view->code = $this->get->blockid; $func = 'print' . ucfirst($code) . 'Block'; - $this->$func($module); + if(method_exists('block', $func)) + { + $this->$func($module); + } + else + { + $this->view->data = $this->block->$func($module, $params); + } $this->view->moreLink = ''; if(isset($this->lang->block->modules[$module]->moreLinkList->{$code})) diff --git a/module/block/view/main.html.php b/module/block/view/main.html.php index 7028bfe954..6e431f437f 100644 --- a/module/block/view/main.html.php +++ b/module/block/view/main.html.php @@ -9,5 +9,7 @@ * @version $Id$ * @link http://www.ranzhi.org */ -include "{$code}block.html.php"; +$viewDir = dirname(__FILE__); +$file2Include = file_exists(dirname($viewDir) . "/ext/view/{$code}block.html.php") ? dirname($viewDir) . "/ext/view/{$code}block.html.php" : "{$viewDir}/{$code}block.html.php"; +include $file2Include; ?> diff --git a/module/todo/view/batchcreate.html.php b/module/todo/view/batchcreate.html.php index 477cd19b2e..29c5a8a402 100755 --- a/module/todo/view/batchcreate.html.php +++ b/module/todo/view/batchcreate.html.php @@ -12,29 +12,29 @@ ?> -