aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php20
1 files changed, 14 insertions, 6 deletions
diff --git a/index.php b/index.php
index 3f3823b3..be181a2c 100644
--- a/index.php
+++ b/index.php
@@ -679,8 +679,8 @@ class pageBuilder
679 $this->tpl->assign('pagetitle', $GLOBALS['pagetitle']); 679 $this->tpl->assign('pagetitle', $GLOBALS['pagetitle']);
680 } 680 }
681 $this->tpl->assign('shaarlititle', empty($GLOBALS['title']) ? 'Shaarli': $GLOBALS['title']); 681 $this->tpl->assign('shaarlititle', empty($GLOBALS['title']) ? 'Shaarli': $GLOBALS['title']);
682 if (!empty($GLOBALS['plugins']['errors'])) { 682 if (!empty($GLOBALS['plugin_errors'])) {
683 $this->tpl->assign('plugin_errors', $GLOBALS['plugins']['errors']); 683 $this->tpl->assign('plugin_errors', $GLOBALS['plugin_errors']);
684 } 684 }
685 } 685 }
686 686
@@ -1204,6 +1204,14 @@ function renderPage()
1204 exit; 1204 exit;
1205 } 1205 }
1206 1206
1207 // Display openseach plugin (XML)
1208 if ($targetPage == Router::$PAGE_OPENSEARCH) {
1209 header('Content-Type: application/xml; charset=utf-8');
1210 $PAGE->assign('serverurl', index_url($_SERVER));
1211 $PAGE->renderPage('opensearch');
1212 exit;
1213 }
1214
1207 // -------- User clicks on a tag in a link: The tag is added to the list of searched tags (searchtags=...) 1215 // -------- User clicks on a tag in a link: The tag is added to the list of searched tags (searchtags=...)
1208 if (isset($_GET['addtag'])) 1216 if (isset($_GET['addtag']))
1209 { 1217 {
@@ -1611,11 +1619,11 @@ function renderPage()
1611 $link_is_new = true; 1619 $link_is_new = true;
1612 $linkdate = strval(date('Ymd_His')); 1620 $linkdate = strval(date('Ymd_His'));
1613 // Get title if it was provided in URL (by the bookmarklet). 1621 // Get title if it was provided in URL (by the bookmarklet).
1614 $title = (empty($_GET['title']) ? '' : $_GET['title'] ); 1622 $title = empty($_GET['title']) ? '' : escape($_GET['title']);
1615 // Get description if it was provided in URL (by the bookmarklet). [Bronco added that] 1623 // Get description if it was provided in URL (by the bookmarklet). [Bronco added that]
1616 $description = (empty($_GET['description']) ? '' : $_GET['description']); 1624 $description = empty($_GET['description']) ? '' : escape($_GET['description']);
1617 $tags = (empty($_GET['tags']) ? '' : $_GET['tags'] ); 1625 $tags = empty($_GET['tags']) ? '' : escape($_GET['tags']);
1618 $private = (!empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0); 1626 $private = !empty($_GET['private']) && $_GET['private'] === "1" ? 1 : 0;
1619 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.) 1627 // If this is an HTTP(S) link, we try go get the page to extract the title (otherwise we will to straight to the edit form.)
1620 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) { 1628 if (empty($title) && strpos(get_url_scheme($url), 'http') !== false) {
1621 // Short timeout to keep the application responsive 1629 // Short timeout to keep the application responsive