<!-- // Hide from older browsers
-/* $Id$
+/* $Id$ */
/*
# Copyright (c) 2003-2005, Jannis Hermanns (on behalf the Serendipity Developer Team)
# All rights reserved. See LICENSE file for licensing details
{
document.getElementById(el).value = str;
document.getElementById(el).focus();
+ if (document.getElementById(el).onchange) {
+ document.getElementById(el).onchange();
+ }
}
function serendipity_imageSelector_addToBody (str, textarea)
{
- document.forms['serendipityEntry']['serendipity['+ textarea +']'].value += str;
+ wrapSelection(document.forms['serendipityEntry']['serendipity['+ textarea +']'], str, '');
document.forms['serendipityEntry']['serendipity['+ textarea +']'].focus();
}
Version 0.8.5 ()
------------------------------------------------------------------------
+ * More Security: When changing the password in your personal preferences,
+ you need to insert the old password. Thanks to Nenad Jovanovic for
+ contacting me about this issue! (garvinhicking)
+
+ * Fix JS errors in admin comment overview for IE6 (garvinhicking)
+
+ * Fix showing any entry-id related sidebar plugins, when a selected
+ entry is not visible (permissions/drafts/...) by unsetting the
+ global $serendipity['GET']['id'] in that case. (garvinhicking)
+
+ * Fix "DATA_TRACKBACK_APPROVED" showing of constants when approving
+ trackbacks/comments instead of the properly formatted message.
+ (Would've required a template change for a "pretty solution", but
+ the current fix is a BC-compatible fix by defining constants a bit
+ differently) (garvinhicking)
+
* Default Admin Stylesheet no longer uses direct height: assignment,
but padding instead. This should get rid of occasional overlapping
of menu items. Thanks a lot to Ognyan Kulev for the solution to this!
+
+ * Fix putting sticky entry on the last page in postgreSQL setups.
+ Thanks to Nate Johnston for working this out! (garvinhicking)
* Fix file upload bug which limited upload filesize to 3 million bytes
(2.86MB) regardless of PHP configuration. Maximum upload filesize
ORDER BY c.id DESC $limit");
?>
<script type="text/javascript">
-function toggle(id) {
+function FT_toggle(id) {
if ( document.getElementById(id + '_full').style.display == '' ) {
document.getElementById(id + '_full').style.display='none';
document.getElementById(id + '_summary').style.display='';
<a href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=approve&serendipity[id]=<?php echo $rs['id'] ?>" class="serendipityIconLink" title="<?php echo APPROVE; ?>"><img src="<?php echo serendipity_getTemplateFile('admin/img/accept.png'); ?>" alt="<?php echo APPROVE ?>" /><?php echo APPROVE ?></a>
<?php } ?>
<?php if (strlen($fullBody) > strlen($summary) ) { ?>
- <a href="#c<?php echo $rs['id'] ?>" onclick="toggle(<?php echo $rs['id'] ?>); return false;" title="<?php echo VIEW; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo VIEW; ?>" /><span id="<?php echo $rs['id'] ?>_text"><?php echo VIEW ?></span></a>
+ <a href="#c<?php echo $rs['id'] ?>" onclick="FT_toggle(<?php echo $rs['id'] ?>); return false;" title="<?php echo VIEW; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/zoom.png'); ?>" alt="<?php echo VIEW; ?>" /><span id="<?php echo $rs['id'] ?>_text"><?php echo VIEW ?></span></a>
<?php } ?>
<a href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=edit&serendipity[id]=<?php echo $rs['id'] ?>&serendipity[entry_id]=<?php echo $rs['entry_id'] ?>" title="<?php echo EDIT; ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/edit.png'); ?>" alt="<?php echo EDIT; ?>" /><?php echo EDIT ?></a>
- <a href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]=<?php echo $rs['id'] ?>&serendipity[entry_id]=<?php echo $rs['entry_id'] ?>" onclick="return confirm('<?php echo sprintf(COMMENT_DELETE_CONFIRM, $rs['id'], htmlspecialchars($rs['author'])) ?>')" title="<?php echo DELETE ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png'); ?>" alt="<?php echo DELETE; ?>" /><?php echo DELETE ?></a>
+ <a href="?serendipity[action]=admin&serendipity[adminModule]=comments&serendipity[adminAction]=delete&serendipity[id]=<?php echo $rs['id'] ?>&serendipity[entry_id]=<?php echo $rs['entry_id'] ?>" onclick='return confirm("<?php echo sprintf(COMMENT_DELETE_CONFIRM, $rs['id'], htmlspecialchars($rs['author'])) ?>")' title="<?php echo DELETE ?>" class="serendipityIconLink"><img src="<?php echo serendipity_getTemplateFile('admin/img/delete.png'); ?>" alt="<?php echo DELETE; ?>" /><?php echo DELETE ?></a>
</td>
</tr>
<tr>
switch ($serendipity['GET']['adminAction']) {
case 'sync':
- set_time_limit(0);
- ignore_user_abort();
+ @set_time_limit(0);
+ @ignore_user_abort();
echo '<p><b>' . SYNCING . '</b><br /><br />';
flush();
}
if (LANG_CHARSET != 'ISO-8859-1') {
- $charset['ISO-8859-1'] = 'ISO-8859-1';
+ $charsets['ISO-8859-1'] = 'ISO-8859-1';
}
if ($utf8_default) {
$config = serendipity_parseTemplate(S9Y_CONFIG_USERTEMPLATE);
if ((int)$_POST['userlevel'] > $serendipity['serendipityUserlevel']) {
echo '<div class="serendipityAdminMsgError">' . CREATE_NOT_AUTHORIZED_USERLEVEL . '</div>';
+ } elseif (!empty($_POST['password']) && $_POST['check_password'] != $_SESSION['serendipityPassword'] && md5($_POST['check_password']) != $_SESSION['serendipityPassword']) {
+ echo '<div class="serendipityAdminMsgError">' . USERCONF_CHECK_PASSWORD_ERROR . '</div>';
} else {
foreach($config as $category) {
foreach ($category['items'] as $item) {
function serendipity_getSessionLanguage() {
global $serendipity;
+ // Store default language
+ $serendipity['default_lang'] = $serendipity['lang'];
+
if ($_SESSION['serendipityAuthedUser']) {
serendipity_header('X-Serendipity-InterfaceLangSource: Database');
return $serendipity['lang'];
// User wants to read the diary
case 'read':
if (isset($serendipity['GET']['id'])) {
- serendipity_printEntries(array(serendipity_fetchEntry('id', $serendipity['GET']['id'])), 1);
+ $entry = array(serendipity_fetchEntry('id', $serendipity['GET']['id']));
+ if (!is_array($entry) || count($entry) < 1) {
+ unset($serendipity['GET']['id']);
+ $entry = array(array());
+ }
+
+ serendipity_printEntries($entry, 1);
} else {
serendipity_printEntries(serendipity_fetchEntries($serendipity['range'], true, $serendipity['fetchLimit']));
}
'default' => '',
'userlevel' => USERLEVEL_EDITOR),
+ array('var' => 'check_password',
+ 'title' => USERCONF_CHECK_PASSWORD,
+ 'description' => USERCONF_CHECK_PASSWORD_DESC,
+ 'type' => 'protected',
+ 'default' => '',
+ 'permission' => 'personalConfiguration'),
+
array('var' => 'realname',
'title' => USERCONF_REALNAME,
'description' => USERCONF_REALNAME_DESC,
ErrorDocument 404 {PREFIX}{indexFile}
DirectoryIndex {PREFIX}{indexFile}
+<Files *.tpl.php>
+ deny from all
+</Files>
+
<Files *.tpl>
deny from all
</Files>
# BEGIN s9y
DirectoryIndex {PREFIX}{indexFile}
+
+<Files *.tpl.php>
+ deny from all
+</Files>
+
<Files *.tpl>
deny from all
</Files>
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA]
+<Files *.tpl.php>
+ deny from all
+</Files>
+
<Files *.tpl>
deny from all
</Files>
php_value session.use_trans_sid 0
php_value register_globals off
+<Files *.tpl.php>
+ deny from all
+</Files>
+
<Files *.tpl>
deny from all
</Files>
DirectoryIndex {PREFIX}{indexFile}
php_value session.use_trans_sid 0
php_value register_globals off
+
+<Files *.tpl.php>
+ deny from all
+</Files>
+
<Files *.tpl>
deny from all
</Files>
RewriteRule ^htmlarea/(.*) htmlarea/$1 [L,QSA]
RewriteRule (.*\.html?) {indexFile}?url=/$1 [L,QSA]
+<Files *.tpl.php>
+ deny from all
+</Files>
+
<Files *.tpl>
deny from all
</Files>
if (preg_match(PAT_UNSUBSCRIBE, $uri, $res)) {
if (serendipity_cancelSubscription(urldecode($res[1]), $res[2])) {
- define('DATA_UNSUBSCRIBED', urldecode($res[1]));
+ define('DATA_UNSUBSCRIBED', sprintf(UNSUBSCRIBE_OK, urldecode($res[1])));
}
$uri = '/' . PATH_UNSUBSCRIBE . '/' . $res[2] . '-untitled.html';
if (preg_match(PAT_DELETE, $uri, $res) && $serendipity['serendipityAuthedUser'] === true) {
if ($res[1] == 'comment' && serendipity_deleteComment($res[2], $res[3], 'comments')) {
- define('DATA_COMMENT_DELETED', $res[2]);
+ define('DATA_COMMENT_DELETED', sprintf(COMMENT_DELETED, $res[2]));
} elseif ( $res[1] == 'trackback' && serendipity_deleteComment($res[2], $res[3], 'trackbacks') ) {
- define('DATA_TRACKBACK_DELETED', $res[2]);
+ define('DATA_TRACKBACK_DELETED', sprintf(TRACKBACK_DELETED, $res[2]));
}
}
if (preg_match(PAT_APPROVE, $uri, $res) && $serendipity['serendipityAuthedUser'] === true) {
if ($res[1] == 'comment' && serendipity_approveComment($res[2], $res[3])) {
- define('DATA_COMMENT_APPROVED', $res[2]);
+ define('DATA_COMMENT_APPROVED', sprintf(COMMENT_APPROVED, $res[2]));
+ define('DATA_TRACKBACK_APPROVED', false);
} elseif ($res[1] == 'trackback' && serendipity_approveComment($res[2], $res[3])) {
- define('DATA_TRACKBACK_APPROVED', $res[2]);
+ define('DATA_COMMENT_APPROVED', false);
+ define('DATA_TRACKBACK_APPROVED', sprintf(TRACKBACK_APPROVED, $res[2]));
}
}
-@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'Cela configure l\'adresse mail qui sera utilisée dans la partie "Expediteur" des messages sortant. Assurez-vous que l\'adresse soit reconnue par le serveur de mail utilisé par votre hote - Beaucoup de serveur de mails rejettent les mails qui ont des adresses d\'expediteurs inconnues.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', '블로그의 전자우편 주소');
@define('INSTALL_BLOG_EMAIL_DESC', '발송하는 전자우편의 "보낸 사람" 부분에 나타날 전자우편 주소를 설정합니다. 호스트의 메일 서버에서 인식하는 주소로 반드시 설정하십시오. 상당수의 메일 서버는 보낸 사람 주소를 알 수 없는 전자우편을 거부합니다.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
@define('INSTALL_BLOG_EMAIL', 'Blog\'s E-Mail address');
@define('INSTALL_BLOG_EMAIL_DESC', 'This configures the E-Mail address that is used as the "From"-Part of outgoing mails. Be sure to set this to an address that is recognized by the mailserver used on your host - many mailservers reject messages that have unknown From-addresses.');
@define('XMLRPC_NO_LONGER_BUNDLED', 'The XML-RPC API Interface to Serendipity is no longer bundled because of ongoing security issues with this API and not many people using it. Thus you need to install the XML-RPC Plugin to use the XML-RPC API. The URL to use in your applications will NOT change - as soon as you have installed the plugin, you will again be able to use the API.');
+@define('USERCONF_CHECK_PASSWORD', 'Old Password');
+@define('USERCONF_CHECK_PASSWORD_DESC', 'If you change the password in the field above, you need to enter the current user password into this field.');
+@define('USERCONF_CHECK_PASSWORD_ERROR', 'You did not specify the right old password, and are not authorized to change the new password. Your settings were not saved.');
$eventData['addkey'] .= $cond;
}
- $cond = 'orderkey DESC';
+ if ($serendipity['dbType'] == 'postgres') {
+ // PostgreSQL is a bit weird here. Empty columns with NULL or "" content for
+ // orderkey would get sorted on top when using DESC, and only after those
+ // the "true" content would be inserted. Thus we order ASC in postgreSQL,
+ // and silently wonder. Thanks to Nate Johnston for working this out!
+ $cond = 'orderkey ASC';
+ } else {
+ $cond = 'orderkey DESC';
+ }
+
if (empty($eventData['orderby'])) {
$eventData['orderby'] = $cond;
} else {
$joins = array();
if ($is_cache && (!isset($addData['noCache']) || !$addData['noCache'])) {
- $joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_cache_extended
+ $joins[] = " LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_cache_extended
ON (e.id = ep_cache_extended.entryid AND ep_cache_extended.property = 'ep_cache_extended')";
- $joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_cache_body
+ $joins[] = " LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_cache_body
ON (e.id = ep_cache_body.entryid AND ep_cache_body.property = 'ep_cache_body')";
}
- $joins[] = "LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_access
+ $joins[] = " LEFT OUTER JOIN {$serendipity['dbPrefix']}entryproperties ep_access
ON (e.id = ep_access.entryid AND ep_access.property = 'ep_access')";
if (!isset($addData['noSticky']) || $addData['noSticky'] !== true) {
- $joins[] = "LEFT JOIN {$serendipity['dbPrefix']}entryproperties ep_sticky
+ $joins[] = " LEFT JOIN {$serendipity['dbPrefix']}entryproperties ep_sticky
ON (e.id = ep_sticky.entryid AND ep_sticky.property = 'ep_is_sticky')";
}
$propbag->add('description', PLUGIN_EVENT_LIVESEARCH_DESC);
$propbag->add('stackable', false);
$propbag->add('author', 'Christian Stocker, Garvin Hicking');
- $propbag->add('version', '1.0');
+ $propbag->add('version', '1.3');
$propbag->add('requirements', array(
'serendipity' => '0.8',
'smarty' => '2.6.7',
case 'quicksearch_plugin':
echo '<script type="text/javascript">
- lsbase = "' . $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/ls' . ($serendipity['rewrite'] == 'none' ? '&' : '?') . '";
+ lsbase = "' . $serendipity['baseURL'] . ($serendipity['rewrite'] == 'none' ? $serendipity['indexFile'] . '?/' : '') . 'plugin/ls' . ($serendipity['rewrite'] == 'none' ? '_&' : '?') . '";
waittext = "' . PLUGIN_EVENT_LIVESEARCH_WAIT . '";
addLoadEvent(liveSearchInit);
</script>';
}
$parts = explode('_', $uri_parts[0]);
- if (!empty($parts[1])) {
- $param = (int) $parts[1];
- } else {
- $param = null;
- }
switch($parts[0]) {
case 'ls-js':
case 'ls':
$res = serendipity_searchEntries($_REQUEST['s']);
+ echo '<?xml version="1.0" encoding="utf-8" ?>';
+ echo '<div class="serendipity_livesearch_result">';
+
if (is_array($res) && count($res) > 0) {
- echo '<?xml version="1.0" encoding="utf-8" ?>';
- echo '<div class="serendipity_livesearch_result">';
foreach($res AS $id => $entry) {
echo '<div class="serendipity_livesearch_row"><a href="' . serendipity_archiveURL($entry['id'], $entry['title'], 'baseURL') . '">' . htmlspecialchars($entry['title']) . '</a></div>';
}
- echo '</div>';
+ } else {
+ echo '<div class="serendipity_livesearch_row">' . print_r($res, true) . '</div>';
}
+ echo '</div>';
break;
}
}
$file = serendipity_fetchImageFromDatabase($serendipity['GET']['image']);
- $file['imgsrc'] = $serendipity['serendipityHTTPPath'] . $serendipity['uploadPath'] . $file['path'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];
+ $file['imgsrc'] = $serendipity['serendipityHTTPPath'] . $serendipity['uploadHTTPPath'] . $file['path'] . $file['name'] . '.' . $file['thumbnail_name'] . '.' . $file['extension'];
if ($file['hotlink']) {
$imgName = $file['path'];
} else {
include_once(S9Y_INCLUDE_PATH . 'include/compat.inc.php');
// The version string
-$serendipity['version'] = '0.8.5-dev';
+$serendipity['version'] = '0.8.5';
// Name of folder for the default theme
$serendipity['defaultTemplate'] = 'default';
* include path
*/
if (file_exists($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php')) {
- include_once($_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php');
+ $local_config = $_SERVER['DOCUMENT_ROOT'] . dirname($_SERVER['PHP_SELF']) . '/serendipity_config_local.inc.php';
} elseif (file_exists($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php')) {
- include_once($serendipity['serendipityPath'] . '/serendipity_config_local.inc.php');
+ $local_config = $serendipity['serendipityPath'] . '/serendipity_config_local.inc.php';
} else {
- include_once(S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php');
+ $local_config = S9Y_INCLUDE_PATH . '/serendipity_config_local.inc.php';
+}
+
+if (is_readable($local_config)) {
+ include_once($local_config);
+} else {
+ serendipity_die(sprintf(INCLUDE_ERROR, $local_config));
}
define('IS_up2date', version_compare($serendipity['version'], $serendipity['versionInstalled'], '<='));
{
document.getElementById(el).value = str;
document.getElementById(el).focus();
- document.getElementById(el).onchange();
+ if (document.getElementById(el).onchange) {
+ document.getElementById(el).onchange();
+ }
}
function serendipity_imageSelector_addToBody (str, textarea)
{
- document.forms['serendipityEntry']['serendipity['+ textarea +']'].value += str;
+ wrapSelection(document.forms['serendipityEntry']['serendipity['+ textarea +']'], str, '');
document.forms['serendipityEntry']['serendipity['+ textarea +']'].focus();
}