1
0
mirror of https://github.com/owncloud/bookmarks.git synced 2025-02-18 15:54:28 +01:00

Add export button on setting page

This commit is contained in:
Brice Maron 2012-09-18 20:36:12 +00:00
parent a29afef606
commit d40a425174
2 changed files with 12 additions and 2 deletions

View File

@ -29,4 +29,10 @@ foreach($bookmarks as $bm) {
$file .= '<DD>'.htmlspecialchars($bm['description'], ENT_QUOTES, 'UTF-8');
}
echo $file;
header("Cache-Control: private");
header("Content-Type: application/stream");
header("Content-Length: ".$fileSize);
header("Content-Disposition: attachment; filename=oc-bookmarks.html");
echo $file;
exit;

View File

@ -24,9 +24,13 @@
<?php endif; ?>
<legend><strong><?php echo $l->t('Import bookmarks');?></strong></legend>
</p>
<p><input type="file" id="bm_import" name="bm_import" style="width:280px;"><label for="bm_import"> <?php echo $l->t('Bookmark html file');?></label>
</p>
<input type="submit" name="bm_import" value="<?php echo $l->t('Import'); ?>" />
<legend><strong><?php echo $l->t('Export bookmarks');?></strong></legend>
<p><a href="<?php echo OCP\Util::linkTo('bookmarks', 'export.php') ;?>" class="button"><?php echo $l->t('Export'); ?></a></p>
</fieldset>
</form>