[pLog-svn] r2612 - plog/branches/plog-1.0.2
pwestbro at devel.lifetype.net
pwestbro at devel.lifetype.net
Tue Nov 22 16:04:18 GMT 2005
Author: pwestbro
Date: 2005-11-22 16:04:17 +0000 (Tue, 22 Nov 2005)
New Revision: 2612
Modified:
plog/branches/plog-1.0.2/trackback.php
Log:
Now if the trackback is removed by a plugin, an error is returned to the caller
Modified: plog/branches/plog-1.0.2/trackback.php
===================================================================
--- plog/branches/plog-1.0.2/trackback.php 2005-11-21 18:06:10 UTC (rev 2611)
+++ plog/branches/plog-1.0.2/trackback.php 2005-11-22 16:04:17 UTC (rev 2612)
@@ -172,19 +172,23 @@
// throw the post event too...
$pm->notifyEvent( EVENT_POST_TRACKBACK_ADD, Array( "trackback" => &$trackback ));
- // result
- $result = '<?xml version="1.0" encoding="iso-8859-1"?>';
- $result .= '<response>';
- $result .= '<error>0</error>';
- $result .= '</response>';
// notify the user that a new trackback has been received, if the article was
// configured to receive notifications
// but first make sure, the trackback was not removed by some plugins like validatetrackback...
- if( $trackbacks->getArticleTrackback( $trackback->getId() ) ) {
- $notifier = new ArticleNotifications();
- $notifier->notifyUsers( $article->getId(), $blogInfo);
- }
+ if( $trackbacks->getArticleTrackback( $trackback->getId() ) ) {
+ $notifier = new ArticleNotifications();
+ $notifier->notifyUsers( $article->getId(), $blogInfo);
+
+ // result
+ $result = '<?xml version="1.0" encoding="iso-8859-1"?>';
+ $result .= '<response>';
+ $result .= '<error>0</error>';
+ $result .= '</response>';
+ } else {
+ // result
+ $result = errorResponse( "Forbidden trackback" );
+ }
// clear the blog cache
CacheControl::resetBlogCache( $article->getBlog());
More information about the pLog-svn
mailing list