mirror of
https://github.com/moparisthebest/wallabag
synced 2024-11-30 04:42:19 -05:00
Fixed #55 - export des données au format json
This commit is contained in:
parent
016989b79a
commit
44e77bfa24
@ -232,6 +232,12 @@ function display_view($view, $id = 0, $full_head = 'yes')
|
|||||||
|
|
||||||
switch ($view)
|
switch ($view)
|
||||||
{
|
{
|
||||||
|
case 'export':
|
||||||
|
$entries = $store->retrieveAll();
|
||||||
|
$tpl->assign('export', json_encode($entries));
|
||||||
|
$tpl->draw('export');
|
||||||
|
logm('export view');
|
||||||
|
break;
|
||||||
case 'config':
|
case 'config':
|
||||||
$tpl->assign('load_all_js', 0);
|
$tpl->assign('load_all_js', 0);
|
||||||
$tpl->draw('head');
|
$tpl->draw('head');
|
||||||
@ -240,7 +246,7 @@ function display_view($view, $id = 0, $full_head = 'yes')
|
|||||||
$tpl->draw('js');
|
$tpl->draw('js');
|
||||||
$tpl->draw('footer');
|
$tpl->draw('footer');
|
||||||
logm('config view');
|
logm('config view');
|
||||||
break;
|
break;
|
||||||
case 'view':
|
case 'view':
|
||||||
$entry = $store->retrieveOneById($id);
|
$entry = $store->retrieveOneById($id);
|
||||||
|
|
||||||
|
@ -38,6 +38,14 @@ class Sqlite extends Store {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function retrieveAll() {
|
||||||
|
$sql = "SELECT * FROM entries ORDER BY id";
|
||||||
|
$query = $this->executeQuery($sql, array());
|
||||||
|
$entries = $query->fetchAll();
|
||||||
|
|
||||||
|
return $entries;
|
||||||
|
}
|
||||||
|
|
||||||
public function retrieveOneById($id) {
|
public function retrieveOneById($id) {
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
|
@ -17,6 +17,10 @@ class Store {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function retrieveAll() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function retrieveOneById($id) {
|
public function retrieveOneById($id) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -3,4 +3,6 @@
|
|||||||
<p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
|
<p>Thanks to the bookmarklet, you will be able to easily add a link to your poche. If you don't know how use a bookmarklet, <a href="http://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks">have a look here</a>.</p>
|
||||||
<p>Drag & drop this link to your bookmarks bar and have fun with poche.</p>
|
<p>Drag & drop this link to your bookmarks bar and have fun with poche.</p>
|
||||||
<p><a style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></p>
|
<p><a style="cursor: move; border: 1px dashed grey; background: white;" title="i am a bookmarklet, use me !" href="javascript:(function(){var%20url%20=%20location.href%20||%20url;window.open('{$poche_url}?action=add&url='%20+%20encodeURIComponent(url),'_self');})();">poche it !</a></p>
|
||||||
|
<h2>Export</h2>
|
||||||
|
<p><a href="?view=export" target="_blank">Click here</a> to export your poche datas.</p>
|
||||||
</div>
|
</div>
|
1
tpl/export.html
Normal file
1
tpl/export.html
Normal file
@ -0,0 +1 @@
|
|||||||
|
export {$export}
|
Loading…
Reference in New Issue
Block a user