[pLog-svn] r3967 - in plog/branches/lifetype-1.1.1/class: dao
gallery/dao
mark at devel.lifetype.net
mark at devel.lifetype.net
Thu Sep 14 06:30:50 GMT 2006
Author: mark
Date: 2006-09-14 06:30:50 +0000 (Thu, 14 Sep 2006)
New Revision: 3967
Modified:
plog/branches/lifetype-1.1.1/class/dao/commentscommon.class.php
plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresource.class.php
plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresources.class.php
Log:
More MySQL5 incompatibly fixed.
1. Add propeties to mapRow in commentscommon.class.php
2. We need default properties in galleryresource.class.php
Modified: plog/branches/lifetype-1.1.1/class/dao/commentscommon.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/dao/commentscommon.class.php 2006-09-14 06:05:59 UTC (rev 3966)
+++ plog/branches/lifetype-1.1.1/class/dao/commentscommon.class.php 2006-09-14 06:30:50 UTC (rev 3967)
@@ -533,6 +533,7 @@
$row["client_ip"],
$row["spam_rate"],
$row["status"],
+ unserialize($row["properties"]),
$row["id"] );
// set the normalized text and topic
Modified: plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresource.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresource.class.php 2006-09-14 06:05:59 UTC (rev 3966)
+++ plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresource.class.php 2006-09-14 06:30:50 UTC (rev 3967)
@@ -60,7 +60,7 @@
* @see getID3
*/
function GalleryResource( $ownerId, $albumId, $description, $flags, $resourceType,
- $filePath, $fileName, $metadata, $date, $thumbnailFormat, $id = -1 )
+ $filePath, $fileName, $metadata, $date, $thumbnailFormat, $properties = Array(), $id = -1 )
{
$this->DbObject();
$this->_ownerId = $ownerId;
@@ -75,6 +75,7 @@
$this->_thumbnailFormat = $thumbnailFormat;
$this->_id = $id;
$this->_album = null;
+ $this->setProperties( $properties );
$this->_fields = Array(
"owner_id" => "getOwnerId",
Modified: plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresources.class.php 2006-09-14 06:05:59 UTC (rev 3966)
+++ plog/branches/lifetype-1.1.1/class/gallery/dao/galleryresources.class.php 2006-09-14 06:30:50 UTC (rev 3967)
@@ -305,15 +305,16 @@
include_once( PLOG_CLASS_PATH."class/data/textfilter.class.php" );
$tf = new Textfilter();
$normalizedDescription = $tf->normalizeText( $description );
+ $properties = serialize( array() );
// finally put the query together and execute it
$query = "INSERT INTO ".$this->getPrefix()."gallery_resources(
owner_id, album_id, description, flags, resource_type,
- file_path, file_name, file_size, metadata, thumbnail_format, normalized_description)
+ file_path, file_name, file_size, metadata, thumbnail_format, normalized_description, properties)
VALUES (
$ownerId, $albumId, '".Db::qstr($description)."', $flags, $resourceType,
'$filePath', '$fileName', '$fileSize', '$serMetadata', '$thumbnailFormat',
- '".Db::qstr($normalizedDescription)."');";
+ '".Db::qstr($normalizedDescription)."', '$properties');";
$result = $this->Execute( $query );
@@ -820,6 +821,7 @@
unserialize($row["metadata"]),
$row["date"],
$row["thumbnail_format"],
+ unserialize($row["properties"]),
$row["id"] );
return $res;
More information about the pLog-svn
mailing list