[pLog-svn] r511 - plog/trunk
subaochen at devel.plogworld.net
subaochen at devel.plogworld.net
Fri Dec 17 09:05:11 GMT 2004
Author: subaochen
Date: 2004-12-17 09:05:10 +0000 (Fri, 17 Dec 2004)
New Revision: 511
Modified:
plog/trunk/wizard.php
Log:
when update from 0.3.2 to 1.0:
1 create table articles_text
2 copy all articles' text... to articles_text
but, drop all unneeded coloumns in articles table? not yet.
Modified: plog/trunk/wizard.php
===================================================================
--- plog/trunk/wizard.php 2004-12-17 01:26:46 UTC (rev 510)
+++ plog/trunk/wizard.php 2004-12-17 09:05:10 UTC (rev 511)
@@ -1206,7 +1206,7 @@
function perform()
{
// we need to create the new tables here
- $newTables = Array( 21, 22, 23 );
+ $newTables = Array( 21, 22, 23, 24 );
global $Tables;
global $Changes;
@@ -1539,10 +1539,30 @@
}
+ //
+ // process the articles' text
+ //
+ function updateArticleText()
+ {
+ $dbPrefix = $this->dbPrefix;
+ $query = "INSERT INTO ".$dbPrefix."articles_text(article_id,text,topic,normalized_text,normalized_topic,mangled_topic)".
+ " SELECT old.id,old.text,old.topic,old.normalized_text,old.normalized_topic,old.mangled_topic ".
+ "FROM ".$dbPrefix."articles as old";
+ $result = $this->db->Execute( $query );
+
+ if( !$result ) {
+ $this->message .= "There was an error updating the articles_text table.<br/>";
+ return false;
+ }
+
+ $this->message .= "articles_text table updated successfully!<br/>";
+
+ return true;
+ }
function perform()
{
$updaters = Array( "updateArticleCategories", "updateArticleComments",
- "updateBlogs", "updateAlbums", "updateResources" );
+ "updateBlogs", "updateAlbums", "updateResources", "updateArticleText" );
// loop through each one of the methods to take care of updating one of the tables
foreach( $updaters as $method ) {
More information about the pLog-svn
mailing list