Version 0.9 ()
------------------------------------------------------------------------
+ * 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)
+
* Reduce memory usage by splitting up function files, optimizing
spartacus parsing. New files:
include/functions_rss.inc.php
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]));
}
} else {
define('DATA_COMMENT_DELETED', false);
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]));
}
} else {
define('DATA_COMMENT_APPROVED', false);