Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32260
Modified Files:
NEWS serendipity_functions.inc.php
Log Message:
https fix
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.276
retrieving revision 1.277
diff -u -d -r1.276 -r1.277
--- serendipity_functions.inc.php 3 Jun 2004 21:18:45 -0000 1.276
+++ serendipity_functions.inc.php 7 Jun 2004 09:49:55 -0000 1.277
@@ -1230,7 +1230,7 @@
$x++;
$comment['comment'] = htmlspecialchars(strip_tags($comment['body']));
- if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://') {
+ if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' && substr($comment['url'], 0, 8) != 'https://') {
$comment['url'] = 'http://' . $comment['url'];
}
@@ -1259,7 +1259,7 @@
}
/* Link to the user's website, if the URL is valid */
- if ((!isset($comment['type']) || $comment['type'] != 'trackback') && !empty($comment['url']) && $comment['url'] != 'http://' && eregi('^http://', $comment['url'])) {
+ if ((!isset($comment['type']) || $comment['type'] != 'trackback') && !empty($comment['url']) && $comment['url'] != 'http://' && eregi('^https?://', $comment['url'])) {
echo ' (<a href="' . str_replace('"', '"', $comment['url']) . '" ' . serendipity_xhtml_target('_blank') . ' title="' . htmlspecialchars($comment['url']) . '">Link</a>)';
}
@@ -1760,7 +1760,7 @@
<params>
<param>
<name>sourceURI</name>
- <value><string>http://{$_SERVER['HTTP_HOST']}{$serendipity['baseURL']}</string></value>
+ <value><string>{$serendipity['baseURL']}</string></value>
</param>
<name>targetURI</name>
<value><string>$loc</string></value>
@@ -1978,7 +1978,7 @@
for ($i = 0, $j = count($locations); $i < $j; ++$i) {
if($locations[$i][0] == '/') {
- $locations[$i] = 'http://' . $_SERVER['HTTP_HOST'] . $locations[$i];
+ $locations[$i] = 'http' . (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) != 'off' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . $locations[$i];
}
$query = "SELECT COUNT(id) FROM {$serendipity['dbPrefix']}references WHERE ";
@@ -2525,7 +2525,7 @@
* but produces rolling 7 day totals, which is more
* interesting
*/
- $query = "SELECT host, SUM(count) AS total
+ $query = "SELECT scheme, host, SUM(count) AS total
FROM {$serendipity['dbPrefix']}$list
WHERE day > date_sub(current_date, interval 7 day)
GROUP BY host
@@ -2533,7 +2533,7 @@
LIMIT $limit";
} else {
/* Portable version of the same query */
- $query = "SELECT host, SUM(count) AS total
+ $query = "SELECT scheme, host, SUM(count) AS total
FROM {$serendipity['dbPrefix']}$list
GROUP BY host
ORDER BY total DESC, host
@@ -2545,7 +2545,8 @@
if (is_array($rows)) {
foreach ($rows as $row) {
printf(
- '<a href="http://%1$s" title="%1$s" >%1$s</a> (%2$s)<br />',
+ '<a href="%s://%1$s" title="%1$s" >%1$s</a> (%2$s)<br />',
+ $row['scheme'],
$row['host'],
$row['total']
);
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- NEWS 6 Jun 2004 19:55:53 -0000 1.139
+++ NEWS 7 Jun 2004 09:49:54 -0000 1.140
@@ -3,6 +3,10 @@
Version 0.7 ()
------------------------------------------------------------------------
+ * Minor https fixes, when https is used as links from commenting
+ users or in referring/exit links. Fix for RPC-ping function submitting
+ double http://http:// URLs. (garvinhicking)
+
* New sidebar plugin "eventlinks". Displays all links to the
currently viewed article (only on full article view).
(garvinhicking)
|