Update of /cvsroot/php-blog/serendipity/include/admin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25986/include/admin
Modified Files:
Tag: branch-smarty
comments.inc.php entries.inc.php plugins.inc.php
Log Message:
* Support for adding timezone offsets in configuration
* Fixed XHTML compliance of calendar
* Adjusted coding style in some places
* Fixed entry preview to not show comments/trackbacks
* Fixed draft display in frontend entry overview
* New variable "is_preview" for smarty template
* Removed some hard-coded language strings in smarty templates
Index: entries.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/Attic/entries.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- entries.inc.php 6 Nov 2004 11:22:49 -0000 1.1.2.1
+++ entries.inc.php 12 Nov 2004 15:43:24 -0000 1.1.2.2
@@ -282,6 +282,10 @@
}
}
+ if (!empty($entry['timestamp'])) {
+ $entry['timestamp'] = serendipity_serverOffsetHour($entry['timestamp'], true); // Save server timezone in database always, so substract the offset we added for display; otherwise it would be added time and again
+ }
+
if ($serendipity['POST']['quicksave'] == 'true') {
// When quicksaving a new entry, set it to 'draft'
if (!is_numeric($entry['id'])) {
@@ -334,12 +338,13 @@
}
if (isset($entry['id'])) {
- $serendiipty['GET']['id'] = $entry['id'];
+ $serendipity['GET']['id'] = $entry['id'];
} else {
$serendipity['GET']['id'] = 1;
}
$serendipity['smarty_raw_mode'] = true; // Force output of Smarty stuff in the backend
- serendipity_smarty_assignDefaults();
+ $smartyvars = array('is_preview' => true);
+ serendipity_smarty_assignDefaults($smartyvars);
echo '<strong>' . PREVIEW . '</strong>';
echo '<div style="border:1px solid #000000; padding: 15px;">';
@@ -384,6 +389,7 @@
case 'edit':
$entry = serendipity_fetchEntry('id', $serendipity['GET']['id'], 1, 1);
+
default:
serendipity_printEntryForm(
'?',
Index: plugins.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/Attic/plugins.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- plugins.inc.php 6 Nov 2004 11:22:49 -0000 1.1.2.1
+++ plugins.inc.php 12 Nov 2004 15:43:24 -0000 1.1.2.2
@@ -253,7 +253,7 @@
}
$plugin->cleanup();
- $statusMsg = sprintf(SETTINGS_SAVED_AT, strftime('%T'));
+ $statusMsg = sprintf(SETTINGS_SAVED_AT, serendipity_strftime('%T'));
}
?>
<form method="post" name="serendipityPluginConfigure">
Index: comments.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/include/admin/Attic/comments.inc.php,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- comments.inc.php 6 Nov 2004 11:22:49 -0000 1.1.2.1
+++ comments.inc.php 12 Nov 2004 15:43:24 -0000 1.1.2.2
@@ -278,7 +278,7 @@
?>
<tr>
<td><a name="c<?php echo $rs['id'] ?>"></a>
- <?php echo ($rs['type'] == 'NORMAL' ? COMMENT : TRACKBACK) . ' #'. $rs['id'] .', '. IN_REPLY_TO .' <strong>'. $rs['title'] .'</strong>, '. ON . ' ' . ucfirst(strftime('%b %e %Y, %H:%M', $rs['timestamp']))?>
+ <?php echo ($rs['type'] == 'NORMAL' ? COMMENT : TRACKBACK) . ' #'. $rs['id'] .', '. IN_REPLY_TO .' <strong>'. $rs['title'] .'</strong>, '. ON . ' ' . ucfirst(serendipity_strftime('%b %e %Y, %H:%M', $rs['timestamp']))?>
</td>
</tr>
<tr>
|