From 3ba5f81b7bc99d7ff954aa5b76aca93c9e157e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Sun, 4 Aug 2013 18:07:41 +0200 Subject: twig implementation --- inc/poche/pocheCore.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'inc/poche/pocheCore.php') diff --git a/inc/poche/pocheCore.php b/inc/poche/pocheCore.php index 9cbcc077..74b063e4 100644 --- a/inc/poche/pocheCore.php +++ b/inc/poche/pocheCore.php @@ -187,20 +187,16 @@ function display_view($view, $id = 0) $entry = $store->retrieveOneById($id); if ($entry != NULL) { pocheTools::logm('view link #' . $id); - $tpl->assign('id', $entry['id']); - $tpl->assign('url', $entry['url']); - $tpl->assign('title', $entry['title']); $content = $entry['content']; if (function_exists('tidy_parse_string')) { $tidy = tidy_parse_string($content, array('indent'=>true, 'show-body-only' => true), 'UTF8'); $tidy->cleanRepair(); $content = $tidy->value; } - $tpl->assign('content', $content); - $tpl->assign('is_fav', $entry['is_fav']); - $tpl->assign('is_read', $entry['is_read']); - $tpl->assign('load_all_js', 0); - $tpl->draw('view'); + $tpl_vars = array( + 'entry' => $entry, + 'content' => $content, + ); } else { pocheTools::logm('error in view call : entry is NULL'); -- cgit v1.2.3