* Prefix possibly missing http:// of commenting authors URLs
in recent comments sidebar plugin and admin interface.
This commit is contained in:
parent
bed9db637b
commit
7300925ce7
@ -3,6 +3,10 @@
|
||||
Version 1.4 ()
|
||||
------------------------------------------------------------------------
|
||||
|
||||
* Prefix possibly missing http:// of commenting authors URLs
|
||||
in recent comments sidebar plugin and admin interface.
|
||||
(garvinhicking)
|
||||
|
||||
* Recount trackbacks/comments when a new comment is made, instead
|
||||
of carrying over an incrementing/decreminting counter for
|
||||
entries, that might get off. (garvinhicking)
|
||||
|
@ -167,6 +167,11 @@ if (isset($serendipity['GET']['adminAction']) && ($serendipity['GET']['adminActi
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($data['url']) && substr($data['url'], 0, 7) != 'http://' &&
|
||||
substr($data['url'], 0, 8) != 'https://') {
|
||||
$data['url'] = 'http://' . $data['url'];
|
||||
}
|
||||
|
||||
serendipity_displayCommentForm(
|
||||
$serendipity['GET']['entry_id'],
|
||||
$target_url,
|
||||
@ -415,6 +420,12 @@ foreach ($sql as $rs) {
|
||||
$class .= ' serendipity_admin_comment_pending';
|
||||
}
|
||||
$header_class = ($comment['status'] == 'pending' ? 'serendipityAdminMsgNote serendipity_admin_comment_pending_header' : '');
|
||||
|
||||
if (!empty($comment['url']) && substr($comment['url'], 0, 7) != 'http://' &&
|
||||
substr($comment['url'], 0, 8) != 'https://') {
|
||||
$comment['url'] = 'http://' . $comment['url'];
|
||||
}
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="<?php echo $header_class; ?>">
|
||||
|
@ -445,7 +445,6 @@ if (preg_match(PAT_ARCHIVES, $uri, $matches) || isset($serendipity['GET']['range
|
||||
$matches[1] = serendipity_searchPermalink($serendipity['permalinkCategoryStructure'], implode('/', $_args), $matches[1], 'category');
|
||||
$serendipity['GET']['category'] = $matches[1];
|
||||
}
|
||||
|
||||
$cInfo = serendipity_fetchCategoryInfo($serendipity['GET']['category']);
|
||||
|
||||
if (!is_array($cInfo)) {
|
||||
|
@ -22,7 +22,7 @@ class serendipity_plugin_comments extends serendipity_plugin
|
||||
$propbag->add('description', PLUGIN_COMMENTS_BLAHBLAH);
|
||||
$propbag->add('stackable', true);
|
||||
$propbag->add('author', 'Garvin Hicking, Tadashi Jokagi, Judebert, G. Brockhaus');
|
||||
$propbag->add('version', '1.12');
|
||||
$propbag->add('version', '1.13');
|
||||
$propbag->add('requirements', array(
|
||||
'serendipity' => '0.8',
|
||||
'smarty' => '2.6.7',
|
||||
@ -181,6 +181,10 @@ class serendipity_plugin_comments extends serendipity_plugin
|
||||
$isTrackBack = $row['comment_type'] == 'TRACKBACK' || $row['comment_type'] == 'PINGBACK';
|
||||
|
||||
if ($row['comment_url'] != '' && ( ($isTrackBack && ($showurls =='trackbacks' || $showurls =='all') || !$isTrackBack && ($showurls =='comments' || $showurls =='all')))) {
|
||||
if (substr($row['comment_url'], 0, 7) != 'http://' &&
|
||||
substr($row['comment_url'], 0, 8) != 'https://') {
|
||||
$row['comment_url'] = 'http://' . $comment['url'];
|
||||
}
|
||||
$user = '<a class="highlight" href="' . htmlspecialchars(strip_tags($row['comment_url'])) . '" title="' . htmlspecialchars(strip_tags($row['comment_title'])) . '">' . htmlspecialchars(strip_tags($row['user'])) . '</a>';
|
||||
} else {
|
||||
$user = htmlspecialchars(strip_tags($row['user']));
|
||||
|
Loading…
x
Reference in New Issue
Block a user