Commit e10fefd4 authored by Son Nguyen's avatar Son Nguyen Committed by Gerrit Code Review
Browse files

Merge "Fetch template html via some json files in a better way (Bug #1321053)"

parents e8eeb1e9 274c7c2d
...@@ -39,10 +39,7 @@ if ($shownav) { ...@@ -39,10 +39,7 @@ if ($shownav) {
} }
} }
ob_start(); $html = $smarty->fetch('collection/viewcontent.tpl');
$smarty->display('collection/viewcontent.tpl');
$html = ob_get_contents();
ob_end_clean();
json_reply(false, array( json_reply(false, array(
'message' => null, 'message' => null,
......
...@@ -21,10 +21,7 @@ $group = group_get_groupinfo_data($group); ...@@ -21,10 +21,7 @@ $group = group_get_groupinfo_data($group);
$smarty = smarty_core(); $smarty = smarty_core();
$smarty->assign('group', $group); $smarty->assign('group', $group);
ob_start(); $html = $smarty->fetch('group/groupdata.tpl');
$smarty->display('group/groupdata.tpl');
$html = ob_get_contents();
ob_end_clean();
json_reply(false, array( json_reply(false, array(
'message' => null, 'message' => null,
......
...@@ -19,10 +19,7 @@ $user->introduction = get_field('artefact', 'title', 'artefacttype', 'introducti ...@@ -19,10 +19,7 @@ $user->introduction = get_field('artefact', 'title', 'artefacttype', 'introducti
$smarty = smarty_core(); $smarty = smarty_core();
$smarty->assign('user', $user); $smarty->assign('user', $user);
ob_start(); $html = $smarty->fetch('user/simpleuser.tpl');
$smarty->display('user/simpleuser.tpl');
$html = ob_get_contents();
ob_end_clean();
json_reply(false, array( json_reply(false, array(
'message' => null, 'message' => null,
......
...@@ -26,10 +26,7 @@ $smarty->assign('ownername', $view->formatted_owner()); ...@@ -26,10 +26,7 @@ $smarty->assign('ownername', $view->formatted_owner());
$smarty->assign('viewdescription', $view->get('description')); $smarty->assign('viewdescription', $view->get('description'));
$smarty->assign('viewcontent', $view->build_rows()); $smarty->assign('viewcontent', $view->build_rows());
$smarty->assign('tags', $view->get('tags')); $smarty->assign('tags', $view->get('tags'));
ob_start(); $html = $smarty->fetch('view/viewcontent.tpl');
$smarty->display('view/viewcontent.tpl');
$html = ob_get_contents();
ob_end_clean();
json_reply(false, array( json_reply(false, array(
'message' => null, 'message' => null,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment