]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - inc/functions.php
Fixed #55 - export des données au format json
[github/wallabag/wallabag.git] / inc / functions.php
index 10005dfe141623cffe39e4a19408845278b9b035..abf70a93429794a5bc60fced734f07466e87dda6 100644 (file)
@@ -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);