diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -1590,8 +1590,9 @@ function renderPage() | |||
1590 | exit; | 1590 | exit; |
1591 | } | 1591 | } |
1592 | 1592 | ||
1593 | // -------- Export as Netscape Bookmarks HTML file. | ||
1594 | if ($targetPage == Router::$PAGE_EXPORT) { | 1593 | if ($targetPage == Router::$PAGE_EXPORT) { |
1594 | // Export links as a Netscape Bookmarks file | ||
1595 | |||
1595 | if (empty($_GET['selection'])) { | 1596 | if (empty($_GET['selection'])) { |
1596 | $PAGE->assign('linkcount',count($LINKSDB)); | 1597 | $PAGE->assign('linkcount',count($LINKSDB)); |
1597 | $PAGE->renderPage('export'); | 1598 | $PAGE->renderPage('export'); |
@@ -1600,10 +1601,21 @@ function renderPage() | |||
1600 | 1601 | ||
1601 | // export as bookmarks_(all|private|public)_YYYYmmdd_HHMMSS.html | 1602 | // export as bookmarks_(all|private|public)_YYYYmmdd_HHMMSS.html |
1602 | $selection = $_GET['selection']; | 1603 | $selection = $_GET['selection']; |
1604 | if (isset($_GET['prepend_note_url'])) { | ||
1605 | $prependNoteUrl = $_GET['prepend_note_url']; | ||
1606 | } else { | ||
1607 | $prependNoteUrl = false; | ||
1608 | } | ||
1609 | |||
1603 | try { | 1610 | try { |
1604 | $PAGE->assign( | 1611 | $PAGE->assign( |
1605 | 'links', | 1612 | 'links', |
1606 | NetscapeBookmarkUtils::filterAndFormat($LINKSDB, $selection) | 1613 | NetscapeBookmarkUtils::filterAndFormat( |
1614 | $LINKSDB, | ||
1615 | $selection, | ||
1616 | $prependNoteUrl, | ||
1617 | index_url($_SERVER) | ||
1618 | ) | ||
1607 | ); | 1619 | ); |
1608 | } catch (Exception $exc) { | 1620 | } catch (Exception $exc) { |
1609 | header('Content-Type: text/plain; charset=utf-8'); | 1621 | header('Content-Type: text/plain; charset=utf-8'); |