Authored by hf

fixes bug to ajax render template

framework @ 75bbc3b0
Subproject commit 119c247f5cf929aa1e059e40609bb16dd6b58f05
Subproject commit 75bbc3b075de19f239532f60c5995d06c5f814e2
... ...
... ... @@ -92,8 +92,9 @@ class Helpers
$result['like'] = array();
$result['like']['count'] = $articleData['praise_num'];
$result['like']['isLiked'] = isset($articleData['isPraise']) && $articleData['isPraise'] === 'Y';
$result['collect'] = array();
$result['collect']['isCollected'] = isset($articleData['isFavor']) && $articleData['isFavor'] === 'Y';
// 收藏
// $result['collect'] = array();
// $result['collect']['isCollected'] = isset($articleData['isFavor']) && $articleData['isFavor'] === 'Y';
$result['share'] = $share;
// 判断是否显示作者信息
... ...
... ... @@ -80,11 +80,11 @@ class Bootstrap extends Bootstrap_Abstract
$dispatcher->autoRender(false);
// 判断到不是AJAX请求时, 使用自定义的模板渲染 (Mustache or Handlebars)
if (!$dispatcher->getRequest()->isXmlHttpRequest()) {
//if (!$dispatcher->getRequest()->isXmlHttpRequest()) {
$layout = new TemplateLayout();
$layout->setScriptPath($this->_config->application->template->path);
$dispatcher->setView($layout);
}
//}
}
// /**
... ...