]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
Fix bug #3384416: Use URL with protocol in bookmarklet
authorChristian Weiske <cweiske@cweiske.de>
Fri, 20 Jan 2012 14:09:39 +0000 (15:09 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 20 Jan 2012 14:09:39 +0000 (15:09 +0100)
data/templates/default/bookmarklet.inc.php
doc/ChangeLog

index 9867745192b4cb11c47258ea5e689f09bebbbf2f..c93f58165b0368533c81f16de73660b3298f035a 100644 (file)
@@ -45,7 +45,7 @@ if (browser == "Opera") {
         + '<?php
 $popupLink = 'javascript:'
     . "location.href='"
-        . createURL('bookmarks', $GLOBALS['user'])
+        . addProtocolToUrl(createURL('bookmarks', $GLOBALS['user']))
         . '?action=add'
         . "&address='+encodeURIComponent(document.location.href)+'"
         . "&title='+encodeURIComponent(document.title)+'"
@@ -71,7 +71,7 @@ echo jsEscTitle(htmlspecialchars($link));
         + '<?php
 $popupLink = 'javascript:'
     . 'open('
-        . "'" . createURL('bookmarks', $GLOBALS['user'])
+        . "'" . addProtocolToUrl(createURL('bookmarks', $GLOBALS['user']))
         . '?action=add'
         . '&popup=1'
         . "&address='+encodeURIComponent(document.location.href)+'"
@@ -97,7 +97,7 @@ echo jsEscTitle(htmlspecialchars($link));
 } else {
     $('#bookmarklet').append(
         '<ul>'
-        + '<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>'
+        + '<li><a class="bookmarklet" href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');location.href=\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d;void 0;"><?php echo jsEscTitle(sprintf(T_('Post to %s'), $GLOBALS['sitename'])); ?><\/a><\/li>'
         + '<li>'
         + '<a class="bookmarklet" href="'
         + 'javascript:x=document;'
@@ -105,7 +105,7 @@ echo jsEscTitle(htmlspecialchars($link));
         + 't=encodeURIComponent(x.title);'
         + 'd=encodeURIComponent('+selection+');'
         + 'open('
-        + '\'<?php echo createURL('bookmarks', $GLOBALS['user']); ?>?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'<?php echo htmlspecialchars(jsEscTitleDouble($GLOBALS['sitename'])); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2'
+        + '\'<?php echo addProtocolToUrl(createURL('bookmarks', $GLOBALS['user'])); ?>?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'<?php echo htmlspecialchars(jsEscTitleDouble($GLOBALS['sitename'])); ?>\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=790,height=465,left=\'+(screen.width-790)/2+\',top=\'+(screen.height-425)/2'
         + ');void 0;">'
         + '<?php echo jsEscTitle(sprintf(T_('Post to %s (Pop-up)'), $GLOBALS['sitename'])); ?>'
         + '</a>'
index d52787c56a3a6b3ce5cf6b71afa7419bbffd2aac..13fc747d42022c71b380f21b1cd7e288b36514d6 100644 (file)
@@ -14,6 +14,7 @@ ChangeLog for SemantiScuttle
 - 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
+- Fix bug #3384416: Use URL with protocol in bookmarklet
 - Implement request #3403609: fr_CA translation update
 - Implement patch #3476011: PostgreSQL tables can not be initialized
   (Frédéric Fauberteau [triaxx])