[pLog-svn] r3965 - in plog/branches/lifetype-1.1.1/class:
daogallery/dao
Oscar Renalias
oscar at renalias.net
Sun Sep 17 22:55:42 GMT 2006
Mark,
did you test these fixes also for the upgrade process?
Can you take a look at this post: http://forums.lifetype.net/
viewtopic.php?p=28608#28608. It seems that the guy is having problems
with a similar error message. I asked him to test a development build
of 1.1.1 that included your code but it seems that it didn't help.
Would you mind taking a look?
Thanks.
On 14 Sep 2006, at 08:55, Mark Wu wrote:
> Yes, but I think I only fixed the dao stuffs that we need when we run
> wizard.php.
>
> I' ll keep fix rest of them ...
>
> Mark
>
>> -----Original Message-----
>> From: plog-svn-bounces at devel.lifetype.net
>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of
>> Oscar Renalias
>> Sent: Thursday, September 14, 2006 1:53 PM
>> To: plog-svn at devel.lifetype.net
>> Subject: Re: [pLog-svn] r3965 - in
>> plog/branches/lifetype-1.1.1/class: daogallery/dao
>>
>> Do these issues have anything to do with this forum thread?
>>
>> http://forums.lifetype.net/viewtopic.php?p=28428#28428
>>
>> If so, I will ask this user to test these changes.
>>
>> On 9/14/06, mark at devel.lifetype.net <mark at devel.lifetype.net> wrote:
>>> Author: mark
>>> Date: 2006-09-14 05:27:45 +0000 (Thu, 14 Sep 2006) New
>> Revision: 3965
>>>
>>> Modified:
>>> plog/branches/lifetype-1.1.1/class/dao/articlecategory.class.php
>>> plog/branches/lifetype-1.1.1/class/dao/articles.class.php
>>> plog/branches/lifetype-1.1.1/class/dao/blogcategory.class.php
>>>
>>>
>> plog/branches/lifetype-1.1.1/class/gallery/dao/galleryalbum.class.php
>>> Log:
>>> Refer to http://bugs.lifetype.net/view.php?id=863
>>>
>>> Fixed all MySQL 5 incompatibility when we run wizard.php.
>>>
>>> 1. we should set an initial value for parentId in article category,
>>> even we don't use it in 1.1
>>>
>>> 2. We have to set an initial value of mangled_topic in article_text
>>>
>>> 3. We should set initial value for numBlogs and numActiveBlogs
>>>
>>> 4. Add 4 motheds to manupliate gallery album
>> normalized_name and normalized_description. Even we don't use
>> the mysql fulltext search in 1.1. But we still need them to
>> pass the database integrity check.
>>>
>>>
>>> Modified:
>>> plog/branches/lifetype-1.1.1/class/dao/articlecategory.class.php
>>> ===================================================================
>>> ---
>> plog/branches/lifetype-1.1.1/class/dao/articlecategory.class.p
>> hp 2006-09-13 16:44:10 UTC (rev 3964)
>>> +++
>> plog/branches/lifetype-1.1.1/class/dao/articlecategory.class.p
>> hp 2006-09-14 05:27:45 UTC (rev 3965)
>>> @@ -38,7 +38,7 @@
>>> * @param lastModification Date when this
>> category was last modified.
>>> * @param parentId Id of the parent
>> category, not used as of LifeType 1.1.
>>> */
>>> - function ArticleCategory( $name, $url,
>> $blogId, $inMainPage, $description = "", $numArticles = 0,
>> $properties = Array(), $id = -1, $lastModification=null,
>> $parentId = null)
>>> + function ArticleCategory( $name, $url, $blogId,
>>> + $inMainPage, $description = "", $numArticles = 0, $properties =
>>> + Array(), $id = -1, $lastModification=null, $parentId = 0)
>>> {
>>> include_once(
>>> PLOG_CLASS_PATH."class/data/timestamp.class.php" );
>>>
>>>
>>> Modified: plog/branches/lifetype-1.1.1/class/dao/articles.class.php
>>> ===================================================================
>>> ---
>> plog/branches/lifetype-1.1.1/class/dao/articles.class.php
>> 2006-09-13 16:44:10 UTC (rev 3964)
>>> +++
>> plog/branches/lifetype-1.1.1/class/dao/articles.class.php
>> 2006-09-14 05:27:45 UTC (rev 3965)
>>> @@ -849,6 +849,7 @@
>>> $valuesToInsert['text'] =
>> $newArticle->getText(false);
>>> $valuesToInsert['normalized_text'] =
>> $filter->normalizeText( $newArticle->getText(false) );
>>> $valuesToInsert['normalized_topic'] =
>>> $filter->normalizeText( $newArticle->getTopic() );
>>> + $valuesToInsert['mangled_topic'] = '';
>>>
>>> $query = Db::buildInsertQuery( ARTICLETEXTS_TABLENAME,
>>> $valuesToInsert );
>>>
>>> Modified:
>>> plog/branches/lifetype-1.1.1/class/dao/blogcategory.class.php
>>> ===================================================================
>>> ---
>> plog/branches/lifetype-1.1.1/class/dao/blogcategory.class.php
>> 2006-09-13 16:44:10 UTC (rev 3964)
>>> +++
>> plog/branches/lifetype-1.1.1/class/dao/blogcategory.class.php
>> 2006-09-14 05:27:45 UTC (rev 3965)
>>> @@ -27,6 +27,8 @@
>>> $this->_name = $name;
>>> $this->_description = $description;
>>> $this->_properties = $properties;
>>> + $this->_numBlogs = 0;
>>> + $this->_numActiveBlogs = 0;
>>>
>>> $this->_pk = "id";
>>> $this->_fields = Array( "id" => "getId",
>>>
>>> Modified:
>>>
>> plog/branches/lifetype-1.1.1/class/gallery/dao/galleryalbum.class.php
>>> ===================================================================
>>> ---
>> plog/branches/lifetype-1.1.1/class/gallery/dao/galleryalbum.cl
>> ass.php 2006-09-13 16:44:10 UTC (rev 3964)
>>> +++
>> plog/branches/lifetype-1.1.1/class/gallery/dao/galleryalbum.cl
>> ass.php 2006-09-14 05:27:45 UTC (rev 3965)
>>> @@ -29,6 +29,8 @@
>>> var $_properties;
>>> var $_showAlbum;
>>> var $_mangledName;
>>> + var $_normalizedName;
>>> + var $_normalizedDescription;
>>>
>>> /**
>>> * Constructor of the class.
>>> @@ -45,7 +47,7 @@
>>> * @param showAlbum Whether to show this
>> album in the main page or not.
>>> * @param id An identifier for this album.
>> It is recommended not to set it.
>>> */
>>> - function GalleryAlbum( $ownerId, $name,
>> $description, $flags, $parentId, $date, $properties,
>> $showAlbum, $id = -1 )
>>> + function GalleryAlbum( $ownerId, $name, $description = '',
>>> + $flags, $parentId, $date, $properties, $showAlbum, $id = -1 )
>>> {
>>> $this->DbObject();
>>> $this->_ownerId = $ownerId; @@ -63,6 +65,8 @@
>>> $this->_children = null;
>>> $this->_resources = null;
>>> $this->_mangledName = "";
>>> + $this->_normalizedName = "";
>>> + $this->_normalizedDescription = "";
>>>
>>> $this->_pk = "id";
>>> $this->_fields = Array(
>>> @@ -76,7 +80,9 @@
>>> "show_album" => "getShowAlbum",
>>> "mangled_name" => "getMangledName",
>>> "num_resources" => "getNumResources",
>>> - "num_children" => "getNumChildren"
>>> + "num_children" => "getNumChildren",
>>> + "normalized_name" => "getNormalizedName",
>>> + "normalized_description" =>
>> "getNormalizedDescription"
>>> );
>>> }
>>>
>>> @@ -166,7 +172,6 @@
>>>
>>> return( $this->_parent );
>>> }
>>> -
>>>
>>> /**
>>> * Sets the parent id of the album. It is important
>>> that it is a valid @@ -390,6 +395,56 @@
>>> function setMangledName( $mangledName )
>>> {
>>> $this->_mangledName = $mangledName;
>>> - }
>>> + }
>>> +
>>> + /**
>>> + * Returns the normailzied name for full text search
>>> + *
>>> + * @return A normailzied name
>>> + */
>>> + function getNormalizedName()
>>> + {
>>> + if( $this->_normalizedName == "" ) {
>>> + include_once(
>> PLOG_CLASS_PATH."class/data/textfilter.class.php" );
>>> + $this->_normalizedName =
>> Textfilter::normalizeText( $this->getName());
>>> + }
>>> +
>>> + return( $this->_normalizedName );
>>> + }
>>> +
>>> + /**
>>> + * Sets the normailzied name of the album.
>>> + *
>>> + * @param normalized name
>>> + */
>>> + function setNormalizedName( $normalizedName )
>>> + {
>>> + $this->_normalizedName = $normalizedName;
>>> + }
>>> +
>>> + /**
>>> + * Returns the normailzied description for
>> full text search
>>> + *
>>> + * @return A normailzied description
>>> + */
>>> + function getNormalizedDescription()
>>> + {
>>> + if( $this->_normalizedDescription == "" ) {
>>> + include_once(
>> PLOG_CLASS_PATH."class/data/textfilter.class.php" );
>>> +
>> $this->_normalizedDescription = Textfilter::normalizeText(
>> $this->getDescription());
>>> + }
>>> +
>>> + return( $this->_normalizedDescription );
>>> + }
>>> +
>>> + /**
>>> + * Sets the normailzied description of the album.
>>> + *
>>> + * @param normalized description
>>> + */
>>> + function setNormalizedDescription( $normalizedDescription )
>>> + {
>>> + $this->_normalizedDescription =
>> $normalizedDescription;
>>> + }
>>> }
>>> ?>
>>> \ No newline at end of file
>>>
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>>>
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>
More information about the pLog-svn
mailing list