Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18727
Modified Files:
Tag: branch-0-5-pl1
NEWS serendipity.css.php serendipity_admin.php
serendipity_admin_entries.inc.php
serendipity_admin_installer.inc.php
serendipity_functions.inc.php
Log Message:
branch-0-5-pl1: Backported bugfixes
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.54.2.5
retrieving revision 1.54.2.5.2.1
diff -u -d -r1.54.2.5 -r1.54.2.5.2.1
--- NEWS 6 Feb 2004 14:13:05 -0000 1.54.2.5
+++ NEWS 13 Feb 2004 16:59:35 -0000 1.54.2.5.2.1
@@ -1,5 +1,14 @@
# $Id$
+Version 0.5-pl1 ()
+------------------------------------
+ * Fixed XHTML-invalid anchor name (garvinhicking)
+ * Fixed installation problems [file_get_contents, htacces copy&paste] for PHP < 4.3.0 (garvinhicking)
+ * Fix leaking draft entries by directly entering URL or using quicksearch (garvinhicking)
+ * Fixed output of an empty external stylesheet on admin panel (garvinhicking)
+ * Do not output comment-type ("NORMAL") on entry view (garvinhicking)
+ * Fixed RSS 0.91 feed (was not printing any entries) (garvinhicking)
+
Version 0.5 (February, 6th 2004)
------------------------------------
* Fixed bug not showing comment or entry admin-tools on apparently static pages (garvinhicking, tomsommer)
Index: serendipity.css.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity.css.php,v
retrieving revision 1.21
retrieving revision 1.21.10.1
diff -u -d -r1.21 -r1.21.10.1
--- serendipity.css.php 10 Aug 2003 18:10:00 -0000 1.21
+++ serendipity.css.php 13 Feb 2004 16:59:35 -0000 1.21.10.1
@@ -1,5 +1,6 @@
<?php # $Id$
+include_once('compat.php');
header('Content-type: text/css');
function serendipity_printStylesheet($file) {
global $serendipity;
Index: serendipity_admin.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin.php,v
retrieving revision 1.26
retrieving revision 1.26.4.1
diff -u -d -r1.26 -r1.26.4.1
--- serendipity_admin.php 7 Jan 2004 17:53:44 -0000 1.26
+++ serendipity_admin.php 13 Feb 2004 16:59:35 -0000 1.26.4.1
@@ -17,7 +17,7 @@
<title><?php echo SERENDIPITY_ADMIN_SUITE; ?></title>
<link rel="stylesheet" type="text/css" href="<?php echo (isset($serendipity['serendipityHTTPPath']) ? $serendipity['serendipityHTTPPath'] : ''); ?>serendipity.css.php" />
<?php
-if (isset($serendipity['extCSS']) && strtolower($serendipity['extCSS']) != 'none') {
+if (!empty($serendipity['extCSS']) && strtolower($serendipity['extCSS']) != 'none') {
?>
<link rel="stylesheet" type="text/css" href="<?php echo $serendipity['extCSS']; ?>" />
<?php
Index: serendipity_admin_entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_entries.inc.php,v
retrieving revision 1.15
retrieving revision 1.15.4.1
diff -u -d -r1.15 -r1.15.4.1
--- serendipity_admin_entries.inc.php 21 Jan 2004 15:09:32 -0000 1.15
+++ serendipity_admin_entries.inc.php 13 Feb 2004 16:59:35 -0000 1.15.4.1
@@ -229,7 +229,7 @@
break;
case 'edit':
- $entry = serendipity_fetchEntry('id', $serendipity['GET']['id']);
+ $entry = serendipity_fetchEntry('id', $serendipity['GET']['id'], 1, 1);
default:
serendipity_printEntryForm(
'?',
Index: serendipity_admin_installer.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_admin_installer.inc.php,v
retrieving revision 1.50.2.1
retrieving revision 1.50.2.1.2.1
diff -u -d -r1.50.2.1 -r1.50.2.1.2.1
--- serendipity_admin_installer.inc.php 3 Feb 2004 10:34:10 -0000 1.50.2.1
+++ serendipity_admin_installer.inc.php 13 Feb 2004 16:59:35 -0000 1.50.2.1.2.1
@@ -441,7 +441,7 @@
if (!$fp) {
$errs[] = sprintf(FILE_WRITE_ERROR, '.htaccess') . ' ' . FILE_CREATE_YOURSELF;
- $errs[] = sprintf(COPY_CODE_BELOW , '.htaccess', 'serendipity', $content);
+ $errs[] = sprintf(COPY_CODE_BELOW , '.htaccess', 'serendipity', htmlspecialchars($content));
return $errs;
} else {
// Check if an old htaccess file existed and try to preserve its contents. Otherwise completely wipe the file.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.193.2.2
retrieving revision 1.193.2.2.2.1
diff -u -d -r1.193.2.2 -r1.193.2.2.2.1
--- serendipity_functions.inc.php 4 Feb 2004 04:47:09 -0000 1.193.2.2
+++ serendipity_functions.inc.php 13 Feb 2004 16:59:35 -0000 1.193.2.2.2.1
@@ -553,12 +553,14 @@
/**
* Fetches a specific entry
**/
-function serendipity_fetchEntry($key, $val, $full = true) {
+function serendipity_fetchEntry($key, $val, $full = true, $fetchDrafts = 'false') {
global $serendipity;
- if ($full === true) {
- $body = ', body, extended';
+ $drafts = '';
+ if ($fetchDrafts == 'false') {
+ $drafts = "AND isdraft = 'false'";
}
+
$querystring = "SELECT
*,
c.category_name,
@@ -573,6 +575,7 @@
WHERE
a.authorid = e.authorid
AND $key LIKE $val
+ $drafts
LIMIT 1";
return serendipity_db_query($querystring, true);
@@ -628,6 +631,7 @@
WHERE
a.authorid = e.authorid
AND MATCH (title,body,extended) AGAINST ('".addslashes($term)."')
+ AND isdraft = 'false'
ORDER BY
timestamp DESC";
@@ -739,7 +743,7 @@
$html_extended = '';
if ($extended && strlen($entry['extended'])) {
- $html_extended = '<a ' . ($serendipity['XHTML11'] ? 'id' : 'name') . '="#extended"></a>';
+ $html_extended = '<a ' . ($serendipity['XHTML11'] ? 'id' : 'name') . '="extended"></a>';
$html_extended .= nl2br(serendipity_emoticate(serendipity_markup_text($entry['extended'], $entry['id'])));
}
@@ -962,7 +966,7 @@
<?php echo nl2br(serendipity_markup_text(serendipity_emoticate($body))); ?><br />
<div class="serendipity_comment_source">
- <a href="#c<?php echo $comment['id']; ?>" title="<?php echo LINK_TO_COMMENT . $x; ?>">#<?php echo $x ; ?></a> - <?php echo $type . ' '; ?>
+ <a href="#c<?php echo $comment['id']; ?>" title="<?php echo LINK_TO_COMMENT . $x; ?>">#<?php echo $x ; ?></a>
<?php
/* Link to the user's email */
if ( !empty($comment['email']) ) {
@@ -1275,7 +1279,7 @@
</content>
</entry>
<?php
- } elseif ($version == '0.92' || $version == '2.0') {
+ } elseif ($version == '0.91' || $version == '2.0') {
/*********** BEGIN RSS 0.91/2.0 FEED *************/
?>
<item>
|