From 44e77bfa2481090e559b56fd8ffbe5b175ab55ca Mon Sep 17 00:00:00 2001 From: nicosomb Date: Sun, 21 Apr 2013 18:09:25 +0200 Subject: =?UTF-8?q?Fixed=20#55=20-=20export=20des=20donn=C3=A9es=20au=20fo?= =?UTF-8?q?rmat=20json?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- inc/functions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'inc/functions.php') diff --git a/inc/functions.php b/inc/functions.php index 10005dfe..abf70a93 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -232,6 +232,12 @@ function display_view($view, $id = 0, $full_head = 'yes') switch ($view) { + case 'export': + $entries = $store->retrieveAll(); + $tpl->assign('export', json_encode($entries)); + $tpl->draw('export'); + logm('export view'); + break; case 'config': $tpl->assign('load_all_js', 0); $tpl->draw('head'); @@ -240,7 +246,7 @@ function display_view($view, $id = 0, $full_head = 'yes') $tpl->draw('js'); $tpl->draw('footer'); logm('config view'); - break; + break; case 'view': $entry = $store->retrieveOneById($id); -- cgit v1.2.3