Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28775
Modified Files:
NEWS serendipity_functions.inc.php
Log Message:
Do not show our "temporary" styles until they are finished.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.244
retrieving revision 1.245
diff -u -d -r1.244 -r1.245
--- serendipity_functions.inc.php 1 Apr 2004 10:05:59 -0000 1.244
+++ serendipity_functions.inc.php 2 Apr 2004 08:32:51 -0000 1.245
@@ -114,8 +114,8 @@
function serendipity_fetchTemplates() {
global $serendipity;
$dir = opendir($serendipity['serendipityPath'] . $serendipity['templatePath']);
- while ( ($file = readdir($dir)) !== false ) {
- if ( is_dir($serendipity['serendipityPath'] . $serendipity['templatePath'] . $file) && !ereg('^(\.|CVS)', $file) ) {
+ while (($file = readdir($dir)) !== false) {
+ if (is_dir($serendipity['serendipityPath'] . $serendipity['templatePath'] . $file) && !ereg('^(\.|CVS)', $file) && !file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $file . '/inactive.txt') && file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $file . '/info.txt')) {
$rv[] = $file;
}
}
@@ -289,7 +289,7 @@
function serendipity_rememberCommentDetails($details) {
global $serendipity;
-
+
foreach ($details as $n => $v) {
serendipity_setCookie($n, $v);
}
@@ -299,7 +299,7 @@
if (!$serendipity['COOKIE']) {
return;
}
-
+
foreach ($keys AS $n) {
serendipity_deleteCookie($n);
}
@@ -315,7 +315,7 @@
}
$bow = (int)$bow;
-
+
// Catch faulty month
if ($month<1) {
$month = 1;
@@ -327,7 +327,7 @@
$nrOfDays = date('t', $ts);
$firstDayWeekDay = date('w', $ts);
- // Calculate the first day of the week, based on the beginning of the week ($bow)
+ // Calculate the first day of the week, based on the beginning of the week ($bow)
if ( $bow > $firstDayWeekDay ) {
$firstDayWeekDay = $firstDayWeekDay+7-$bow;
} elseif ( $bow < $firstDayWeekDay ) {
@@ -517,7 +517,7 @@
global $serendipity;
$and = '';
-
+
if ($full === true) {
$body = ', e.body, e.extended';
} else {
@@ -527,7 +527,7 @@
if ($fetchDrafts === false) {
$drafts = "isdraft = 'false'";
}
-
+
if ($limit != '') {
$serendipity['fetchLimit'] = $limit;
}
@@ -562,7 +562,7 @@
$orderby = 'last_modified';
}
}
-
+
if (!empty($drafts)) {
if (!empty($and)) {
$and .= " AND $drafts";
@@ -924,7 +924,7 @@
<div class="serendipity_commentsTitle"><?php echo implode('<br />', $serendipity['messagestack']['comments']); ?></div>
<?php
}
-
+
if (isset($serendipity['GET']['csuccess']) && $serendipity['GET']['csuccess'] == 'true') {
?>
<br />
@@ -1093,7 +1093,7 @@
<?php echo $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>
+ <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'])) {
@@ -1125,7 +1125,7 @@
if (!isset($comment)) {
$comment = array('entry_id' => $serendipity['GET']['id']);
}
-
+
if (serendipity_db_bool($allow_comments)) {
echo '<div class="serendipity_comment_source">(<a href="' . $serendipity['baseURL'] . 'comment.php?serendipity[switch]=disable&serendipity[entry]=' . $comment['entry_id'] . '">' . COMMENTS_DISABLE . '</a>)</div>';
} else {
@@ -1302,7 +1302,7 @@
if (empty($fromName)) {
$fromName = ANONYMOUS;
}
-
+
$entryURI = serendipity_archiveURL($id, $title);
if ($type == 'TRACKBACK') {
@@ -1347,14 +1347,14 @@
if ($comments == true) {
$guid .= '#c' . $entry['commentid'];
}
-
+
return $guid;
}
// jbalcorn: starter function to clean up xhtml for atom feed. Add things to this as we find common
// mistakes, unless someone finds a better way to do this.
// DONE:
-// since someone encoded all the urls, we can now assume any amp followed by
+// since someone encoded all the urls, we can now assume any amp followed by
// whitespace or a HTML tag (i.e. &<br /> )should be
// encoded and most not with a space are intentional
// TODO:
@@ -1381,12 +1381,12 @@
if (is_array($entries)) {
foreach ($entries as $entry) {
$guid = serendipity_rss_getguid($entry, $comments);
-
+
if ($comments == true) {
// Display username as part of the title for easier feed-readability
$entry['title'] = $entry['username'] . ': ' . $entry['title'];
}
-
+
// Embed a link to extended entry, if existing
if ($entry['exflag']) {
$ext = '<br /><a href="' . $guid . '#extended">' . VIEW_EXTENDED_ENTRY . '</a>';
@@ -1400,7 +1400,7 @@
// jbalcorn: clean up body for XML compliance as best we can.
$entry['body'] = xhtml_cleanup($entry['body']);
serendipity_plugin_api::hook_event('frontend_display', $entry);
-
+
// extract author information
if (empty($entry['email'])) {
$query = "select email from {$serendipity['dbPrefix']}authors where username='{$entry['username']}'";
@@ -1417,7 +1417,7 @@
<name><?php echo utf8_encode(htmlspecialchars($entry['username'])); ?></name>
<email><?php echo utf8_encode(htmlspecialchars($entry['email'])); ?></email>
</author>
-
+
<issued><?php echo gmdate('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></issued>
<created><?php echo gmdate('Y-m-d\TH:i:s\Z', $entry['timestamp']); ?></created>
<modified><?php echo gmdate('Y-m-d\TH:i:s\Z', $entry['last_modified']); ?></modified>
@@ -1451,7 +1451,7 @@
<link><?php echo $guid; ?></link>
<?php
/*********** END RSS 0.91/2.0 FEED *************/
-
+
if ($version == '2.0') {
/*********** RSS 2.0 FEED EXTRAS *************/
?>
@@ -1510,7 +1510,7 @@
<?php
}
?>
-</item>
+</item>
<?php
}
}
@@ -1805,7 +1805,7 @@
if($locations[$i][0] == '/') {
$locations[$i] = 'http://' . $_SERVER['HTTP_HOST'] . $locations[$i];
}
-
+
$query = "SELECT COUNT(id) FROM {$serendipity['dbPrefix']}references WHERE ";
$query .= "entry_id=$tmpid AND link='" . serendipity_db_escape_string($locations[$i]) . "'";
@@ -1850,7 +1850,7 @@
if (!is_numeric($entry['timestamp'])) {
$entry['timestamp'] = time();
}
-
+
if (!isset($entry['last_modified']) || !is_numeric($entry['last_modified'])) {
$entry['last_modified'] = time();
}
@@ -2095,7 +2095,7 @@
<textarea style="width: 100%" name="serendipity[extended]" id="serendipity[extended]" cols="80" rows="20"><?php echo isset($entry['extended']) ? htmlentities($entry['extended']) : ''; ?></textarea>
</td>
</tr>
-
+
<tr>
<td colspan="3">
<br />
@@ -2134,7 +2134,7 @@
if ($is_md5 === false) {
$password = md5($password);
}
-
+
$query = "SELECT DISTINCT
email, authorid
FROM
@@ -2143,7 +2143,7 @@
username = '$username'
AND password = '$password'";
$row = serendipity_db_query($query, true, 'assoc');
-
+
if (is_array($row)) {
$_SESSION['serendipityUser'] = $serendipity['serendipityUser'] = $username;
$_SESSION['serendipityPassword'] = $serendipity['serendipityPassword'] = $password;
@@ -2156,7 +2156,7 @@
session_destroy();
}
}
-
+
return false;
}
@@ -2238,7 +2238,7 @@
} else {
$interval = "interval '900'";
}
-
+
$gc = "DELETE FROM $serendipity[dbPrefix]suppress where last < now() - $interval";
serendipity_db_query($gc);
}
@@ -2362,12 +2362,12 @@
"\n",
"'"
),
-
+
array(
'\n',
"\'",
),
-
+
file_get_contents($serendipity['serendipityPath'] . serendipity_getTemplateFile('htmlarea.css'))
);
?>
@@ -2544,7 +2544,7 @@
break;
}
}
-
+
return $ver;
}
Index: NEWS
===================================================================
RCS file: /cvsroot/php-blog/serendipity/NEWS,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -d -r1.101 -r1.102
--- NEWS 1 Apr 2004 14:19:01 -0000 1.101
+++ NEWS 2 Apr 2004 08:32:51 -0000 1.102
@@ -3,6 +3,10 @@
Version 0.6 ()
------------------------------------------------------------------------
+ * Templates with an "inactive.txt" or no "info.txt" inside their
+ directory are not selectable for s9y. Usable for "work in progress"
+ templates. (garvinhicking)
+
* Fixed $su link for users with no URL rewriting (garvinhicking)
* Fixed invalid XML for RDF trackback:ping (garvinhicking)
|