[pLog-svn] r3966 - plog/branches/lifetype-1.1.1/class/dao
mark at devel.lifetype.net
mark at devel.lifetype.net
Thu Sep 14 06:05:59 GMT 2006
Author: mark
Date: 2006-09-14 06:05:59 +0000 (Thu, 14 Sep 2006)
New Revision: 3966
Modified:
plog/branches/lifetype-1.1.1/class/dao/mylink.class.php
plog/branches/lifetype-1.1.1/class/dao/trackback.class.php
plog/branches/lifetype-1.1.1/class/dao/usercomment.class.php
Log:
More MySQL5 incompatibly fixed.
1. we need to set the initial $date in mylink object. It can not be "null"
2. We need set default properties in usercomment and trackback.
Modified: plog/branches/lifetype-1.1.1/class/dao/mylink.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/dao/mylink.class.php 2006-09-14 05:27:45 UTC (rev 3965)
+++ plog/branches/lifetype-1.1.1/class/dao/mylink.class.php 2006-09-14 06:05:59 UTC (rev 3966)
@@ -31,7 +31,7 @@
* @param categoryId Category of the link
* @param id Internal idenfitier of the link
*/
- function MyLink( $name, $description, $url, $blogId, $categoryId, $date, $rssFeed, $properties = Array(), $id = -1)
+ function MyLink( $name, $description, $url, $blogId, $categoryId, $date = '', $rssFeed, $properties = Array(), $id = -1)
{
$this->DbObject();
@@ -42,6 +42,11 @@
$this->_categoryId = $categoryId;
$this->_id = $id;
$this->_rssFeed = $rssFeed;
+ if( $date == "" ) {
+ include_once( PLOG_CLASS_PATH."class/data/Date.class.php" );
+ $dateObject = new Date();
+ $date = $dateObject->getDate();
+ }
$this->setDate( $date );
$this->setProperties( $properties );
Modified: plog/branches/lifetype-1.1.1/class/dao/trackback.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/dao/trackback.class.php 2006-09-14 05:27:45 UTC (rev 3965)
+++ plog/branches/lifetype-1.1.1/class/dao/trackback.class.php 2006-09-14 06:05:59 UTC (rev 3966)
@@ -25,7 +25,7 @@
* @param clientIp the IP address where the trackback is coming from
* @param id Identifier of this item.
*/
- function TrackBack( $url, $title, $articleId, $blogId, $excerpt, $blogName, $date, $clientIp, $spamRate = 0, $status = COMMENT_STATUS_NONSPAM, $id = -1 )
+ function TrackBack( $url, $title, $articleId, $blogId, $excerpt, $blogName, $date, $clientIp, $spamRate = 0, $status = COMMENT_STATUS_NONSPAM, $properties = Array(), $id = -1 )
{
// initialize the UserComment object
$this->UserComment( $articleId,
@@ -40,6 +40,7 @@
$clientIp,
$spamRate,
$status,
+ $properties,
$id );
// and mark it as a trackback
$this->setType( COMMENT_TYPE_TRACKBACK );
Modified: plog/branches/lifetype-1.1.1/class/dao/usercomment.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/dao/usercomment.class.php 2006-09-14 05:27:45 UTC (rev 3965)
+++ plog/branches/lifetype-1.1.1/class/dao/usercomment.class.php 2006-09-14 06:05:59 UTC (rev 3966)
@@ -37,7 +37,7 @@
/**
* Creates a new user comment.
*/
- function UserComment( $artid, $blogId, $parentid, $topic, $text, $date = null, $userName = "", $userEmail = "", $userUrl = "", $clientIp = "0.0.0.0", $spamRate = 0, $status = COMMENT_STATUS_NONSPAM, $id = -1 )
+ function UserComment( $artid, $blogId, $parentid, $topic, $text, $date = null, $userName = "", $userEmail = "", $userUrl = "", $clientIp = "0.0.0.0", $spamRate = 0, $status = COMMENT_STATUS_NONSPAM, $properties = Array(), $id = -1 )
{
@@ -76,6 +76,8 @@
$this->_normalizedTopic = '';
$this->_normalizedText = '';
+ $this->setProperties( $properties );
+
$this->_fields = Array(
"article_id" => "getArticleId",
"blog_id" => "getBlogId",
@@ -92,7 +94,8 @@
"spam_rate" => "getSpamRate",
"type" => "getType",
"normalized_text" => "getNormalizedText",
- "normalized_topic" => "getNormalizedTopic"
+ "normalized_topic" => "getNormalizedTopic",
+ "properties" => "getProperties"
);
}
More information about the pLog-svn
mailing list