Add option for saving bookmarks as "unread" to pinboard (PR #694)
This commit is contained in:
parent
43efe30442
commit
e047408826
@ -26,10 +26,11 @@ Router\get_action('services', function () {
|
||||
Router\post_action('services', function () {
|
||||
$user_id = SessionStorage::getInstance()->getUserId();
|
||||
$values = Request\values() + array('pinboard_enabled' => 0,
|
||||
'pinboard_mark_unread' => 0,
|
||||
'instapaper_enabled' => 0,
|
||||
'wallabag_enabled' => 0,
|
||||
'shaarli_enabled' => 0,
|
||||
'shaarli_private' => 0,);
|
||||
'shaarli_private' => 0);
|
||||
Helper\check_csrf_values($values);
|
||||
|
||||
if (Model\Config\save($user_id, $values)) {
|
||||
|
@ -56,6 +56,7 @@ function pinboard_sync(array $item)
|
||||
'url' => $item['url'],
|
||||
'description' => $item['title'],
|
||||
'tags' => Helper\config('pinboard_tags'),
|
||||
'toread' => Helper\bool_config('pinboard_mark_unread') ? 'yes' : 'no',
|
||||
);
|
||||
|
||||
$url = 'https://api.pinboard.in/v1/posts/add?'.http_build_query($params);
|
||||
|
@ -188,6 +188,7 @@ return array(
|
||||
'Send bookmarks to Pinboard' => 'Sende Lesezeichen an Pinboard',
|
||||
'Pinboard API token' => 'Pinboard API Token',
|
||||
'Pinboard tags' => 'Pinboard Tags',
|
||||
'Mark bookmarks as unread' => 'Lesezeichen als ungelesen markieren',
|
||||
'Instapaper username' => 'Instapaper Benutzername',
|
||||
'Instapaper password' => 'Instapaper Passwort',
|
||||
'Instapaper' => 'Instapaper',
|
||||
|
@ -28,7 +28,9 @@
|
||||
<?php echo Miniflux\Helper\form_text('pinboard_token', $values, $errors) ?><br/>
|
||||
|
||||
<?php echo Miniflux\Helper\form_label(t('Pinboard tags'), 'pinboard_tags') ?>
|
||||
<?php echo Miniflux\Helper\form_text('pinboard_tags', $values, $errors) ?>
|
||||
<?php echo Miniflux\Helper\form_text('pinboard_tags', $values, $errors) ?><br/>
|
||||
|
||||
<?php echo Miniflux\Helper\form_checkbox('pinboard_mark_unread', t('Mark bookmarks as unread'), 1, isset($values['pinboard_mark_unread']) && $values['pinboard_mark_unread'] == 1) ?>
|
||||
</div>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user