Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19614
Modified Files:
db.sql db_update-0.5-0.5.1.sql rss.php
serendipity_admin_entries.inc.php
serendipity_functions.inc.php serendipity_sidebar_items.php
Log Message:
Date-related caching of entries. (see NEWS)
Introduces "last_modified" timestamp for our articles.
REQUIRES DB-UPDATE!
Index: db.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/db.sql,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- db.sql 17 Feb 2004 12:20:47 -0000 1.25
+++ db.sql 18 Feb 2004 11:48:23 -0000 1.26
@@ -48,7 +48,8 @@
authorid int(11) default null,
categoryid int(11) default null,
isdraft {BOOLEAN},
- allow_comments {BOOLEAN}
+ allow_comments {BOOLEAN},
+ last_modified int(10) {UNSIGNED} default null
);
CREATE {FULLTEXT} INDEX entry on {PREFIX}entries (title,body,extended);
Index: db_update-0.5-0.5.1.sql
===================================================================
RCS file: /cvsroot/php-blog/serendipity/db_update-0.5-0.5.1.sql,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- db_update-0.5-0.5.1.sql 10 Feb 2004 13:36:54 -0000 1.3
+++ db_update-0.5-0.5.1.sql 18 Feb 2004 11:48:23 -0000 1.4
@@ -30,4 +30,9 @@
plugins and configure this plugin. Set the serendipity_event_contentrewrite
plugin for wrapping there to see the output generatet by contentrewrite
anywhere you like on the sidebars.
-*/
\ No newline at end of file
+*/
+
+ALTER TABLE serendipity_entries ADD last_modified INT(10) UNSIGNED default null;
+CREATE INDEX timestamp ON serendipity_entries (timestamp);
+CREATE INDEX last_modified ON serendipity_entries (last_modified);
+UPDATE serendipity_entries SET last_modified = timestamp;
Index: rss.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/rss.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- rss.php 3 Feb 2004 16:24:03 -0000 1.19
+++ rss.php 18 Feb 2004 11:48:23 -0000 1.20
@@ -1,6 +1,6 @@
<?php # $Id$
-
header('Content-Type: text/xml');
+
include_once('serendipity_config.inc.php');
$version = strtolower($_GET['version']);
if (empty($version)) {
@@ -18,6 +18,47 @@
$_GET['type'] = 'content';
}
+if (!isset($_GET['nocache'])) {
+ switch ($_GET['type']) {
+ case 'comments':
+ $latest_entry = serendipity_fetchComments(isset($_GET['cid']) ? $_GET['cid'] : null, 1, 'desc');
+ break;
+ case 'content':
+ default:
+ $latest_entry = serendipity_fetchEntries(null, false, 1, false, false, 'last_modified');
+ break;
+ }
+
+ /*
+ * Caching logic - Do not send feed if nothing has changed
+ * Implementation inspired by Simon Willison [http://simon.incutio.com/archive/2003/04/23/conditionalGet], Thiemo Maettig
+ */
+
+ // See if the client has provided the required headers.
+ // Always convert the provided header into GMT timezone to allow comparing to the server-side last-modified header
+ $modified_since = !empty($_SERVER['HTTP_IF_MODIFIED_SINCE'])
+ ? gmdate('D, d M Y H:i:s \G\M\T', strtotime(stripslashes($_SERVER['HTTP_IF_MODIFIED_SINCE'])))
+ : false;
+ $none_match = !empty($_SERVER['HTTP_IF_NONE_MATCH'])
+ ? str_replace('"', '', stripslashes($_SERVER['HTTP_IF_NONE_MATCH']))
+ : false;
+
+ if (is_array($latest_entry) && isset($latest_entry[0]['last_modified'])) {
+ $last_modified = gmdate('D, d M Y H:i:s \G\M\T', $latest_entry[0]['last_modified']);
+ $etag = '"' . $last_modified . '"';
+
+ header('Last-Modified: ' . $last_modified);
+ header('ETag: ' . $etag);
+
+ if (($none_match == $last_modified && $modified_since == $last_modified) ||
+ (!$none_match && $modified_since == $last_modified) ||
+ (!$modified_since && $none_match == $last_modified)) {
+ header('HTTP/1.0 304 Not Modified');
+ return;
+ }
+ }
+}
+
switch ($_GET['type']) {
case 'comments':
$entries = serendipity_fetchComments(isset($_GET['cid']) ? $_GET['cid'] : null, 15, 'desc');
@@ -30,7 +71,7 @@
if (isset($_GET['all']) && $_GET['all']) {
$entries = serendipity_fetchEntries(null, true);
} else {
- $entries = serendipity_fetchEntries(null, true, 15);
+ $entries = serendipity_fetchEntries(null, true, 15, false, (isset($modified_since) ? $modified_since : false));
}
break;
}
@@ -81,26 +122,26 @@
}
}
print <<<HEAD
-<rdf:RDF
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+<rdf:RDF
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:admin="http://webns.net/mvcb/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
-<channel rdf:about="{$serendipity['baseURL']}rss.php?version=1.0">
- <title>$title</title>
- <link>{$serendipity['baseURL']}</link>
+<channel rdf:about="{$serendipity['baseURL']}rss.php?version=1.0">
+ <title>$title</title>
+ <link>{$serendipity['baseURL']}</link>
<description>$description</description>
<dc:language>{$serendipity['lang']}</dc:language>
- <admin:errorReportsTo rdf:resource="mailto:{$serendipity['CONFIG']['email']}" />
+ <admin:errorReportsTo rdf:resource="mailto:{$serendipity['CONFIG']['email']}" />
{$additional_fields['image_rss1.0_channel']}
-
- <items>
- <rdf:Seq>{$rdf_seq_li}</rdf:Seq>
- </items>
-</channel>
+
+ <items>
+ <rdf:Seq>{$rdf_seq_li}</rdf:Seq>
+ </items>
+</channel>
{$additional_fields['image_rss1.0_rdf']}
@@ -110,7 +151,6 @@
case '2.0':
print <<<HEAD
<rss version="2.0"
- xmlns="http://purl.org/rss/2.0/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:admin="http://webns.net/mvcb/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
@@ -130,12 +170,12 @@
HEAD;
break;
case 'atom0.3':
- $modified = date('Y-m-d\TH:i:s\Z', $entries[0]['timestamp']);
+ $modified = date('Y-m-d\TH:i:s\Z', $entries[0]['last_modified']);
print <<<HEAD
<feed version="0.3"
xmlns="http://purl.org/atom/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/">
@@ -146,7 +186,7 @@
<tagline mode="escaped" type="text/html">$description</tagline>
<id>{$serendipity['baseURL']}</id>
<modified>$modified</modified>
- <generator name="Serendipity" url="http://www.s9y.org/" version="{$serendipity['version']}">Serendipity {$serendipity['version']} - http://www.s9y.org/</generator>
+ <generator url="http://www.s9y.org/" version="{$serendipity['version']}">Serendipity {$serendipity['version']} - http://www.s9y.org/</generator>
<dc:language>{$serendipity['lang']}</dc:language>
<admin:errorReportsTo rdf:resource="mailto:{$serendipity['CONFIG']['email']}" />
<info mode="xml" type="text/html">
@@ -173,5 +213,6 @@
case 'atom0.3':
print '</feed>';
}
+
/* vim: set sts=4 ts=4 expandtab : */
?>
\ No newline at end of file
Index: serendipity_admin_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_entries.inc.php,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- serendipity_admin_entries.inc.php 10 Feb 2004 15:48:45 -0000 1.17
+++ serendipity_admin_entries.inc.php 18 Feb 2004 11:48:23 -0000 1.18
@@ -32,7 +32,7 @@
$serendipity['GET']['offset'],
$perPage
),
- 'true'
+ true
);
$string_action = ($action == 'delete' ? DELETE_ENTRIES : EDIT_ENTRIES);
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- serendipity_functions.inc.php 17 Feb 2004 17:12:42 -0000 1.212
+++ serendipity_functions.inc.php 18 Feb 2004 11:48:23 -0000 1.213
@@ -362,7 +362,7 @@
// Only allow to scroll to the previous month if the first entry is from the month before
if ($ts > ($minmax[0]['min'] - 2678400)) {
?>
- <a title="<?php echo BACK; ?>" href="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['indexFile']; ?>?serendipity[calendarZoom]=<?php echo $previousYear . sprintf('%02d',$previousMonth) . $add_query; ?>"><img alt="<?php echo BACK; ?>" src="<?php echo serendipity_getTemplateFile('img/back.png'); ?>" border="0" /></a>
+ <a title="<?php echo BACK; ?>" href="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['indexFile']; ?>?serendipity[calendarZoom]=<?php echo $previousYear . sprintf('%02d',$previousMonth) . $add_query; ?>"><img alt="<?php echo BACK; ?>" src="<?php echo serendipity_getTemplateFile('img/back.png'); ?>" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> /></a>
<?php
}
?>
@@ -377,7 +377,7 @@
// Only allow to scroll to the next month if the last entry is from the month before
if ($endts < ($minmax[0]['max'] + 2678400)) {
?>
- <a title="<?php echo FORWARD; ?>" href="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['indexFile']; ?>?serendipity[calendarZoom]=<?php echo $nextYear . sprintf('%02d', $nextMonth) . $add_query; ?>"><img alt="<?php echo FORWARD; ?>" src="<?php echo serendipity_getTemplateFile('img/forward.png'); ?>" border="0" /></a>
+ <a title="<?php echo FORWARD; ?>" href="<?php echo $serendipity['serendipityHTTPPath'] . $serendipity['indexFile']; ?>?serendipity[calendarZoom]=<?php echo $nextYear . sprintf('%02d', $nextMonth) . $add_query; ?>"><img alt="<?php echo FORWARD; ?>" src="<?php echo serendipity_getTemplateFile('img/forward.png'); ?>" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> /></a>
<?php
}
?>
@@ -475,14 +475,16 @@
* Give it a range in YYYYMMDD format to gather the desired entries
* (For february 2002 you would pass 200202 e.g.
**/
-function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fetchDrafts = 'false') {
+function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fetchDrafts = false, $modified_since = false, $orderby = 'timestamp') {
global $serendipity;
if ($full === true) {
- $body = ',body, extended';
+ $body = ', e.body, e.extended';
+ } else {
+ $body = '';
}
- if ($fetchDrafts == 'false') {
+ if ($fetchDrafts === false) {
$drafts = "isdraft = 'false'";
}
@@ -510,9 +512,23 @@
$and .= " AND $drafts";
}
} else {
- $and = '';
+ if ($modified_since) {
+ $unix_modified = strtotime($modified_since);
+ if ($unix_modified != -1) {
+ $and = ' WHERE last_modified >= ' . $unix_modified;
+ if (!empty($limit)) {
+ $limit = ($limit > 50 ? $limit : 50);
+ }
+ $orderby = 'last_modified';
+ }
+ }
+
if ($drafts) {
- $and .= "WHERE $drafts";
+ if (!empty($and)) {
+ $and .= " AND $drafts";
+ } else {
+ $and = "WHERE $drafts";
+ }
}
}
@@ -521,7 +537,7 @@
$categoryid = serendipity_db_escape_string($_categoryid[0]);
if (is_numeric($categoryid)) {
- if ($and != '') {
+ if (!empty($and)) {
$and .= " AND e.categoryid = $categoryid";
} else {
$and = "WHERE e.categoryid = $categoryid";
@@ -542,11 +558,25 @@
}
$query = "SELECT
- e.*,
+ e.id,
+ e.title,
+ e.timestamp,
+ e.comments,
+ e.exflag,
+ e.author,
+ e.authorid,
+ e.categoryid,
+ e.trackbacks,
+ e.isdraft,
+ e.allow_comments,
+ e.last_modified,
+
a.username,
a.email,
+
c.category_name,
c.categoryid
+ $body
FROM
({$serendipity['dbPrefix']}entries AS e
LEFT JOIN {$serendipity['dbPrefix']}category c
@@ -554,10 +584,11 @@
LEFT JOIN {$serendipity['dbPrefix']}authors a
ON e.authorid = a.authorid $and
ORDER BY
- timestamp DESC
+ $orderby DESC
$limit";
$ret = serendipity_db_query($query);
+
if (is_string($ret)) {
die("Query failed: $ret");
}
@@ -1282,8 +1313,8 @@
<issued><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></issued>
<created><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></created>
- <modified><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></modified>
- <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
+ <modified><?php echo date('Y-m-d\TH:i:s\Z', $entry['last_modified']); ?></modified>
+ <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
<?php
if ($comments === false) {
@@ -1296,7 +1327,7 @@
<id><?php echo $guid; ?></id>
<title mode="escaped" type="text/html"><?php echo utf8_encode(htmlspecialchars($entry['title'])); ?></title>
- <content type="application/xhtml+xml" xml:base="<?php echo $serendipity['baseURL']; ?>" xml:space="preserve">
+ <content type="application/xhtml+xml" xml:base="<?php echo $serendipity['baseURL']; ?>">
<div xmlns="http://www.w3.org/1999/xhtml">
<?php
$article = nl2br(serendipity_emoticate(serendipity_markup_text($entry['body'] . $ext)));
@@ -1321,7 +1352,7 @@
?>
<category><?php echo utf8_encode(htmlspecialchars($entry['category_name'])); ?></category>
<comments><?php echo $guid; ?></comments>
- <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
+ <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
<?php
if ($comments === false) {
?>
@@ -1355,21 +1386,21 @@
}
} else if ($version == '1.0') {
?>
-<item rdf:about="<?php echo $guid; ?>">
+<item rdf:about="<?php echo $guid; ?>">
<title><?php echo utf8_encode(htmlspecialchars($entry['title'])); ?></title>
<link><?php echo $guid; ?></link>
- <description>
+ <description>
<?php
$article = nl2br(serendipity_emoticate(serendipity_markup_text($entry['body'] . $ext)));
serendipity_plugin_api::hook_event('frontend_display', $article);
echo utf8_encode(htmlspecialchars($article));
?>
- </description>
- <dc:publisher><?php echo utf8_encode(htmlspecialchars($serendipity['blogTitle'])); ?></dc:publisher>
- <dc:creator><?php echo utf8_encode(htmlspecialchars($entry['email'])) . ' (' . utf8_encode(htmlspecialchars($entry['username'])) . ')'; ?></dc:creator>
+ </description>
+ <dc:publisher><?php echo utf8_encode(htmlspecialchars($serendipity['blogTitle'])); ?></dc:publisher>
+ <dc:creator><?php echo utf8_encode(htmlspecialchars($entry['email'])) . ' (' . utf8_encode(htmlspecialchars($entry['username'])) . ')'; ?></dc:creator>
<dc:subject><?php echo utf8_encode(htmlspecialchars($entry['category_name'])); ?></dc:subject>
- <dc:date><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></dc:date>
- <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
+ <dc:date><?php echo date('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></dc:date>
+ <wfw:comment><?php echo $serendipity['baseURL']; ?>wfwcomment.php?cid=<?php echo (isset($entry['entryid']) && $entry['entryid'] != '' ? $entry['entryid'] : $entry['id']); ?></wfw:comment>
<?php
if ($comments === false) {
?>
@@ -1794,8 +1825,12 @@
if (!is_numeric($entry['timestamp'])) {
$entry['timestamp'] = time();
}
+
+ if (!isset($entry['last_modified']) || !is_numeric($entry['last_modified'])) {
+ $entry['last_modified'] = time();
+ }
- if(strlen($entry['extended'])) {
+ if (strlen($entry['extended'])) {
$exflag = 1;
}
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- serendipity_sidebar_items.php 14 Feb 2004 18:43:15 -0000 1.43
+++ serendipity_sidebar_items.php 18 Feb 2004 11:48:23 -0000 1.44
@@ -240,14 +240,14 @@
if ($this->get_config('show_0.91') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" border="0" alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
<a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=0.91">RSS 0.91 feed</a>
<br />
<?php
}
if ($this->get_config('show_1.0') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" border="0" alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
<a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=1.0">RSS 1.0 feed</a>
<br />
<?php
@@ -255,7 +255,7 @@
if ($this->get_config('show_2.0') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" border="0" alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
<a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0">RSS 2.0 feed</a>
<br />
<?php
@@ -263,7 +263,7 @@
if ($this->get_config('show_atom0.3') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" border="0" alt="ATOM/XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="ATOM/XML" /></a>
<a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=atom0.3">ATOM 0.3 feed</a>
<br />
<?php
@@ -271,7 +271,7 @@
if ($this->get_config('show_2.0c') != 'false') {
?>
- <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" border="0" alt="XML" /></a>
+ <a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/xml.gif" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> alt="XML" /></a>
<a href="<?php echo $serendipity['serendipityHTTPPath']; ?>rss.php?version=2.0&type=comments"><?php echo ($serendipity['XHTML11'] ? '<span style="white-space: nowrap">' : '<nobr>'); ?>RSS 2.0 <?php echo COMMENTS; ?><?php echo ($serendipity['XHTML11'] ? '</span>' : '</nobr>'); ?></a>
<?php
}
@@ -333,7 +333,7 @@
switch($match[1]) {
case 'pubDate':
if ($bag_content != 'false') {
- $bag_content = date('r', $entries[0]['timestamp']);
+ $bag_content = gmdate('D, d M Y H:i:s \G\M\T', $entries[0]['last_modified']);
} else {
$bag_content = '';
}
@@ -386,7 +386,7 @@
$title = POWERED_BY . ":";
?>
<div class="serendipityPlug">
- <a title=":serendipity" href="http://www.s9y.org/"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/s9y_banner_tiny.png" alt=":serendipity" border="0" /></a>
+ <a title=":serendipity" href="http://www.s9y.org/"><img src="<?php echo $serendipity['serendipityHTTPPath']; ?>pixel/s9y_banner_tiny.png" alt=":serendipity" <?php echo ($serendipity['XHTML11'] ? 'style="border: 0px"' : 'border="0"'); ?> /></a>
</div>
<?php
}
@@ -488,11 +488,12 @@
$category_id = serendipity_makeFilename($category['category_name']);
$html .= sprintf(
- '<a href="%s" title="%s"><img style="display: inline;" alt="xml" border="0" src="%s" /></a> ' .
+ '<a href="%s" title="%s"><img alt="xml" %s src="%s" /></a> ' .
'<a href="%s" title="%s">%s</a><br />',
$serendipity['serendipityHTTPPath'] . 'rss.php?category=' . $category['categoryid'] . '_' . $category_id,
htmlentities($category['category_description']),
+ ($serendipity['XHTML11'] ? 'style="display: inline; border: 0px"' : 'border="0"'),
$serendipity['serendipityHTTPPath'] . 'pixel/xml.gif',
$serendipity['serendipityHTTPPath'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'categories/' . $category['categoryid'] . '_' . $category_id,
htmlentities($category['category_description']),
|