From 728d642563be526d84921c73825f4087dcb1b044 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 Jan 2012 14:52:36 +0100 Subject: Part of bug #3463481: Add HTTP protocol to self URL in feed --- www/rss.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'www') diff --git a/www/rss.php b/www/rss.php index d888726..46c0ffd 100644 --- a/www/rss.php +++ b/www/rss.php @@ -124,7 +124,7 @@ if ($cat) { } $tplVars['feedtitle'] = filter($GLOBALS['sitename'] . (isset($pagetitle) ? $pagetitle : '')); -$tplVars['feedlink'] = ROOT; +$tplVars['feedlink'] = addProtocolToUrl(ROOT); $tplVars['feeddescription'] = sprintf(T_('Recent bookmarks posted to %s'), $GLOBALS['sitename']); $bookmarks = $bookmarkservice->getBookmarks( -- cgit v1.2.3-54-g00ecf From 87f495d31b8f40375a6a1bf05a6d2bc9860029c3 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 Jan 2012 14:58:16 +0100 Subject: Part of bug #3463481: add guid to items --- data/templates/default/rss.tpl.php | 1 + www/rss.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'www') diff --git a/data/templates/default/rss.tpl.php b/data/templates/default/rss.tpl.php index 6b489d5..fd5bdbf 100644 --- a/data/templates/default/rss.tpl.php +++ b/data/templates/default/rss.tpl.php @@ -17,6 +17,7 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n"; <?php echo htmlspecialchars($bookmark['title']); ?> + diff --git a/www/rss.php b/www/rss.php index 46c0ffd..3628a2e 100644 --- a/www/rss.php +++ b/www/rss.php @@ -137,6 +137,7 @@ $bookmarks_tmp = filter($bookmarks['bookmarks']); $bookmarks_tpl = array(); $latestdate = null; +$guidBaseUrl = addProtocolToUrl(ROOT) . '#'; foreach ($bookmarks_tmp as $key => $row) { $_link = $row['bAddress']; // Redirection option @@ -154,7 +155,8 @@ foreach ($bookmarks_tmp as $key => $row) { 'description' => $row['bDescription'], 'creator' => SemanticScuttle_Model_UserArray::getName($row), 'pubdate' => $_pubdate, - 'tags' => $row['tags'] + 'tags' => $row['tags'], + 'guid' => $guidBaseUrl . $row['bId'], ); } unset($bookmarks_tmp); -- cgit v1.2.3-54-g00ecf From f8b7d0243ca17506aeda80f2f0e3608b382da6aa Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 Jan 2012 15:03:29 +0100 Subject: Fully fix bug #3463481: use proper self URL, different page url --- data/templates/default/rss.tpl.php | 2 +- doc/ChangeLog | 1 + www/rss.php | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'www') diff --git a/data/templates/default/rss.tpl.php b/data/templates/default/rss.tpl.php index fd5bdbf..4aba277 100644 --- a/data/templates/default/rss.tpl.php +++ b/data/templates/default/rss.tpl.php @@ -6,7 +6,7 @@ echo '<' . '?xml version="1.0" encoding="utf-8" ?' . ">\n"; > <?php echo $feedtitle; ?> - + diff --git a/doc/ChangeLog b/doc/ChangeLog index 67da85e..d52787c 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -13,6 +13,7 @@ ChangeLog for SemantiScuttle - Fix bug #3407728: Can't delete users from admin page - Fix bug #3431742: open_basedir problems with /etc/ config files - Fix bug #3436624: Wrong URL for Delicious API when importing +- Fix bug #3463481: RSS feed show warnings in feedvalidator.org - Implement request #3403609: fr_CA translation update - Implement patch #3476011: PostgreSQL tables can not be initialized (Frédéric Fauberteau [triaxx]) diff --git a/www/rss.php b/www/rss.php index 3628a2e..1f88944 100644 --- a/www/rss.php +++ b/www/rss.php @@ -124,7 +124,8 @@ if ($cat) { } $tplVars['feedtitle'] = filter($GLOBALS['sitename'] . (isset($pagetitle) ? $pagetitle : '')); -$tplVars['feedlink'] = addProtocolToUrl(ROOT); +$tplVars['pagelink'] = addProtocolToUrl(ROOT); +$tplVars['feedlink'] = addProtocolToUrl(ROOT) . 'rss?sort=' . getSortOrder(); $tplVars['feeddescription'] = sprintf(T_('Recent bookmarks posted to %s'), $GLOBALS['sitename']); $bookmarks = $bookmarkservice->getBookmarks( -- cgit v1.2.3-54-g00ecf From 22eaa812bfa27fe6d1662237c1908193f4637090 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 Jan 2012 21:12:46 +0100 Subject: Fix bug #3413459: Thumbnails not in one line, thanks http://quirksmode.org/css/clearing.html for the CSS hint --- doc/ChangeLog | 1 + www/themes/default/scuttle.css | 1 + 2 files changed, 2 insertions(+) (limited to 'www') diff --git a/doc/ChangeLog b/doc/ChangeLog index 3f93289..6297764 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -16,6 +16,7 @@ ChangeLog for SemantiScuttle - Fix bug #3463481: RSS feed show warnings in feedvalidator.org - Fix bug #3384416: Use URL with protocol in bookmarklet - Fix bug: Invalid HTML when website thumbnails are activated +- Fix bug #3413459: Thumbnails not in one line - Implement request #3403609: fr_CA translation update - Implement patch #3476011: PostgreSQL tables can not be initialized (Frédéric Fauberteau [triaxx]) diff --git a/www/themes/default/scuttle.css b/www/themes/default/scuttle.css index 9e87857..f37377d 100644 --- a/www/themes/default/scuttle.css +++ b/www/themes/default/scuttle.css @@ -223,6 +223,7 @@ li.xfolkentry { border-bottom: 1px solid #DDD; margin-bottom: 0; padding: 1em 0.5em; + overflow: auto; } html > body li.xfolkentry { border-bottom: 1px dotted #AAA; -- cgit v1.2.3-54-g00ecf From a9df65da0888233e66e35aa6fef3d5870db73d4f Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 Jan 2012 21:27:04 +0100 Subject: Fix bug #3468293: Delicious import does not preserve private links --- doc/ChangeLog | 1 + .../BookmarkTest_deliciousbookmarks_private.xml | 1 + www/import.php | 29 +++++++++++++++++----- 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 tests/data/BookmarkTest_deliciousbookmarks_private.xml (limited to 'www') diff --git a/doc/ChangeLog b/doc/ChangeLog index 6297764..8485802 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -17,6 +17,7 @@ ChangeLog for SemantiScuttle - Fix bug #3384416: Use URL with protocol in bookmarklet - Fix bug: Invalid HTML when website thumbnails are activated - Fix bug #3413459: Thumbnails not in one line +- Fix bug #3468293: Delicious import does not preserve private links - Implement request #3403609: fr_CA translation update - Implement patch #3476011: PostgreSQL tables can not be initialized (Frédéric Fauberteau [triaxx]) diff --git a/tests/data/BookmarkTest_deliciousbookmarks_private.xml b/tests/data/BookmarkTest_deliciousbookmarks_private.xml new file mode 100644 index 0000000..0ad8142 --- /dev/null +++ b/tests/data/BookmarkTest_deliciousbookmarks_private.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/www/import.php b/www/import.php index 3aa2714..1293a2f 100644 --- a/www/import.php +++ b/www/import.php @@ -27,7 +27,9 @@ require_once 'www-header.php'; /* Managing all possible inputs */ // First input is $_FILES // Other inputs -isset($_POST['status']) ? define('POST_STATUS', $_POST['status']): define('POST_STATUS', $GLOBALS['defaults']['privacy']); +isset($_POST['status']) + ? define('POST_STATUS', $_POST['status']) + : define('POST_STATUS', $GLOBALS['defaults']['privacy']); if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['size'] > 0) { @@ -54,6 +56,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si } } xml_parser_free($xml_parser); + //FIXME: show errors and warnings header('Location: '. createURL('bookmarks', $userinfo->getUsername())); } else { $templatename = 'importDelicious.tpl'; @@ -70,7 +73,8 @@ function startElement($parser, $name, $attrs) { $bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark'); if ($name == 'POST') { - while(list($attrTitle, $attrVal) = each($attrs)) { + $newstatus = $status; + while (list($attrTitle, $attrVal) = each($attrs)) { switch ($attrTitle) { case 'HREF': $bAddress = $attrVal; @@ -87,6 +91,11 @@ function startElement($parser, $name, $attrs) { case 'TAG': $tags = strtolower($attrVal); break; + case 'PRIVATE': + if ($attrVal == 'yes') { + $newstatus = 2; + } + break; } } if ($bookmarkservice->bookmarkExists($bAddress, $userservice->getCurrentUserId())) { @@ -100,12 +109,20 @@ function startElement($parser, $name, $attrs) { $bDatetime = gmdate('Y-m-d H:i:s'); } - if ($bookmarkservice->addBookmark($bAddress, $bTitle, $bDescription, '', $status, $tags, null, $bDatetime, true, true)) - $tplVars['msg'] = T_('Bookmark imported.'); - else - $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.'); + $res = $bookmarkservice->addBookmark( + $bAddress, $bTitle, $bDescription, '', $newstatus, $tags, + null, $bDatetime, true, true + ); + if ($res) { + $tplVars['msg'] = T_('Bookmark imported.'); + } else { + $tplVars['error'] = T_('There was an error saving your bookmark. Please try again or contact the administrator.'); + } } } + if (!isset($depth[$parser])) { + $depth[$parser] = 0; + } $depth[$parser]++; } -- cgit v1.2.3-54-g00ecf From d6d44c6cfa7e3e5cdb36d9e4abd3a62edad74eb9 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Fri, 20 Jan 2012 22:04:10 +0100 Subject: Fix bug #3396727: Title of http://lesscss.org/ not loaded --- doc/ChangeLog | 1 + www/ajaxGetTitle.php | 3 +++ 2 files changed, 4 insertions(+) (limited to 'www') diff --git a/doc/ChangeLog b/doc/ChangeLog index 8485802..6a08fea 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -18,6 +18,7 @@ ChangeLog for SemantiScuttle - Fix bug: Invalid HTML when website thumbnails are activated - Fix bug #3413459: Thumbnails not in one line - Fix bug #3468293: Delicious import does not preserve private links +- Fix bug #3396727: Title of http://lesscss.org/ not loaded - Implement request #3403609: fr_CA translation update - Implement patch #3476011: PostgreSQL tables can not be initialized (Frédéric Fauberteau [triaxx]) diff --git a/www/ajaxGetTitle.php b/www/ajaxGetTitle.php index 8e5d92c..e1fbe30 100644 --- a/www/ajaxGetTitle.php +++ b/www/ajaxGetTitle.php @@ -50,7 +50,10 @@ function getTitle($url) { $title = @mb_convert_encoding($title, 'UTF-8', $encoding); } + $title = trim($title); + if (utf8_strlen($title) > 0) { + $title = html_entity_decode($title, ENT_QUOTES, 'UTF-8'); return $title; } else { // No title, so return filename -- cgit v1.2.3-54-g00ecf