[pLog-svn] r3584 - plog/trunk/class/net
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Thu Jun 15 22:16:17 GMT 2006
Author: oscar
Date: 2006-06-15 22:16:16 +0000 (Thu, 15 Jun 2006)
New Revision: 3584
Modified:
plog/trunk/class/net/baserequestgenerator.class.php
plog/trunk/class/net/customrequestgenerator.class.php
plog/trunk/class/net/modrewriterequestgenerator.class.php
plog/trunk/class/net/prettyrequestgenerator.class.php
plog/trunk/class/net/rawrequestgenerator.class.php
Log:
moved postTrackbackLink to BaseRequestGenerator, as all request generators share the same code
Modified: plog/trunk/class/net/baserequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/baserequestgenerator.class.php 2006-06-15 21:56:10 UTC (rev 3583)
+++ plog/trunk/class/net/baserequestgenerator.class.php 2006-06-15 22:16:16 UTC (rev 3584)
@@ -399,7 +399,19 @@
*/
function postTrackbackLink( $post )
{
- throw( new Exception( "This function must be implemented by child classes." ));
+ $rdfHeader = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">';
+
+ $trackbackLink = $this->getTrackbackUrl()."?id=".$post->getId();
+ $rdfBody = "<rdf:Description
+ rdf:about=\"".$this->postLink($post)."\"
+ dc:identifier=\"".$this->postLink($post)."\"
+ dc:title=\"".$post->getTopic()."\"
+ trackback:ping=\"".$trackbackLink."\"/>";
+ $rdfFooter = "</rdf:RDF>";
+
+ return $rdfHeader.$rdfBody.$rdfFooter;
}
/**
Modified: plog/trunk/class/net/customrequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/customrequestgenerator.class.php 2006-06-15 21:56:10 UTC (rev 3583)
+++ plog/trunk/class/net/customrequestgenerator.class.php 2006-06-15 22:16:16 UTC (rev 3584)
@@ -269,29 +269,6 @@
}
/**
- * Returns the trackback link for a given post.
- *
- * @param post The post with the necessary information.
- * @return A string representing the rdf trackback link.
- */
- function postTrackbackLink( $post )
- {
- $rdfHeader = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">';
-
- $trackbackLink = $this->getTrackbackUrl()."?id=".$post->getId();
- $rdfBody = "<rdf:Description
- rdf:about=\"".$this->postLink($post)."\"
- dc:identifier=\"".$this->postLink($post)."\"
- dc:title=\"".$post->getTopic()."\"
- trackback:ping=\"".$trackbackLink."\"/>";
- $rdfFooter = "</rdf:RDF>";
-
- return $rdfHeader.$rdfBody.$rdfFooter;
- }
-
- /**
* Returns the url to reply to a given comment.
*
* @param post An Article object with information about the post
Modified: plog/trunk/class/net/modrewriterequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/modrewriterequestgenerator.class.php 2006-06-15 21:56:10 UTC (rev 3583)
+++ plog/trunk/class/net/modrewriterequestgenerator.class.php 2006-06-15 22:16:16 UTC (rev 3584)
@@ -213,30 +213,6 @@
}
/**
- * Returns the trackback link for a given post.
- *
- * @param post The post with the necessary information.
- * @return A string representing the rdf trackback link.
- */
- function postTrackbackLink( $post )
- {
- $rdfHeader = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">';
-
- $trackbackLink = $this->getTrackbackUrl()."?id=".$post->getId();
-
- $rdfBody = "<rdf:Description
- rdf:about=\"".$this->postLink($post)."\"
- dc:identifier=\"".$this->postLink($post)."\"
- dc:title=\"".$post->getTopic()."\"
- trackback:ping=\"".$trackbackLink."\"/>";
- $rdfFooter = "</rdf:RDF>";
-
- return $rdfHeader.$rdfBody.$rdfFooter;
- }
-
- /**
* Returns the url to reply to a given comment.
*
* @param post An Article object with information about the post
Modified: plog/trunk/class/net/prettyrequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/prettyrequestgenerator.class.php 2006-06-15 21:56:10 UTC (rev 3583)
+++ plog/trunk/class/net/prettyrequestgenerator.class.php 2006-06-15 22:16:16 UTC (rev 3584)
@@ -234,29 +234,6 @@
}
/**
- * Returns the trackback link for a given post.
- *
- * @param post The post with the necessary information.
- * @return A string representing the rdf trackback link.
- */
- function postTrackbackLink( $post )
- {
- $rdfHeader = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">';
-
- $trackbackLink = $this->getTrackbackUrl()."?id=".$post->getId();
- $rdfBody = "<rdf:Description
- rdf:about=\"".$this->postLink($post)."\"
- dc:identifier=\"".$this->postLink($post)."\"
- dc:title=\"".$post->getTopic()."\"
- trackback:ping=\"".$trackbackLink."\"/>";
- $rdfFooter = "</rdf:RDF>";
-
- return $rdfHeader.$rdfBody.$rdfFooter;
- }
-
- /**
* Returns the url to reply to a given comment.
*
* @param post An Article object with information about the post
Modified: plog/trunk/class/net/rawrequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/rawrequestgenerator.class.php 2006-06-15 21:56:10 UTC (rev 3583)
+++ plog/trunk/class/net/rawrequestgenerator.class.php 2006-06-15 22:16:16 UTC (rev 3584)
@@ -249,29 +249,6 @@
}
/**
- * Returns the trackback link for a given post.
- *
- * @param post The post with the necessary information.
- * @return A string representing the rdf trackback link.
- */
- function postTrackbackLink( $post )
- {
- $rdfHeader = '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">';
-
- $trackbackLink = $this->getTrackbackUrl()."?id=".$post->getId();
- $rdfBody = "<rdf:Description
- rdf:about=\"".$this->postLink($post)."\"
- dc:identifier=\"".$this->postLink($post)."\"
- dc:title=\"".$post->getTopic()."\"
- trackback:ping=\"".$trackbackLink."\"/>";
- $rdfFooter = "</rdf:RDF>";
-
- return $rdfHeader.$rdfBody.$rdfFooter;
- }
-
- /**
* Returns the url to reply to a given comment.
*
* @param post An Article object with information about the post
More information about the pLog-svn
mailing list