[geeklog-cvs] geeklog: Made COM_createImage recognize https:// URLs

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun May 10 05:23:21 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/40def9c7258a
changeset: 7022:40def9c7258a
user:      Dirk Haun <dirk at haun-online.de>
date:      Sun May 10 11:23:06 2009 +0200
description:
Made COM_createImage recognize https:// URLs

diffstat:

2 files changed, 2 insertions(+), 1 deletion(-)
public_html/docs/history   |    1 +
public_html/lib-common.php |    2 +-

diffs (23 lines):

diff -r e1a38f3e609e -r 40def9c7258a public_html/docs/history
--- a/public_html/docs/history	Sun May 10 10:13:49 2009 +0200
+++ b/public_html/docs/history	Sun May 10 11:23:06 2009 +0200
@@ -11,6 +11,7 @@
 + Comment moderation and editable comments, by Jared Wenerd
 
 Other changes:
+- Made COM_createImage recognize https:// URLs (bug #0000881) [Dirk]
 - Fixed notices in the config class (reported by tgc and others) [Dirk]
 - Fixed empty entries in the "Type" dropdown on the Advanced Search page.
   Requires an updated search/searchform.thtml template (part of bug #0000874)
diff -r e1a38f3e609e -r 40def9c7258a public_html/lib-common.php
--- a/public_html/lib-common.php	Sun May 10 10:13:49 2009 +0200
+++ b/public_html/lib-common.php	Sun May 10 11:23:06 2009 +0200
@@ -6275,7 +6275,7 @@
 
     $retval = '';
 
-    if (strpos($url, 'http://') !== 0) {
+    if (preg_match("/^(https?):/", $url) !== 1) {
         $url = $_CONF['layout_url'] . $url;
     }
     $attr_str = 'src="' . $url . '"';



More information about the geeklog-cvs mailing list