diff options
| author | Christian Fowler <spider@viovio.com> | 2008-05-17 04:02:59 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2008-05-17 04:02:59 +0000 |
| commit | 86043bca55bf308fa9b3d01e5495d0a74d7a5033 (patch) | |
| tree | 9942601c4f2538be58c850b748e7f4985da498c0 /admin | |
| parent | 42a89eb99dd2866305b45cfb948176bf9c424329 (diff) | |
| download | blogs-86043bca55bf308fa9b3d01e5495d0a74d7a5033.tar.gz blogs-86043bca55bf308fa9b3d01e5495d0a74d7a5033.tar.bz2 blogs-86043bca55bf308fa9b3d01e5495d0a74d7a5033.zip | |
de-tick GenID call, make sure bitblog content type is registered, set modifier_user_id
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/upgrade_inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php index 017ac98..3edf798 100644 --- a/admin/upgrade_inc.php +++ b/admin/upgrade_inc.php @@ -53,6 +53,9 @@ array( 'DATADICT' => array( // query3: create a blogs_blog_id_seq and bring the table up to date with the current max blog_id used in the blogs table - this basically for mysql array( 'PHP' => ' global $gBitSystem; + // make sure bitblog content type is registered + require_once( BLOGS_PKG_PATH."BitBlog.php" ); + $tempBlog = new BitBlog(); $query = "SELECT * FROM `'.BIT_DB_PREFIX.'blogs` b"; if( $rs = $gBitSystem->mDb->query( $query ) ) { while( !$rs->EOF ) { @@ -63,6 +66,7 @@ array( 'PHP' => ' $contentHash["content_id"] = $conId; $contentHash["content_type_guid"] = BITBLOG_CONTENT_TYPE_GUID; $contentHash["user_id"] = $rs->fields["user_id"]; + $contentHash["modifier_user_id"] = $rs->fields["user_id"]; $contentHash["format_guid"] = PLUGIN_GUID_TIKIWIKI; $contentHash["data"] = $rs->fields["description"]; $contentHash["title"] = substr( $rs->fields["title"], 0, 160 ); @@ -80,7 +84,7 @@ array( 'PHP' => ' $query2 = "INSERT INTO `'.BIT_DB_PREFIX.'blogs_posts_map` (`post_content_id`,`blog_content_id`,`date_added`) (SELECT blp.`content_id`, blc.`content_id`, bplc.`created` FROM `'.BIT_DB_PREFIX.'blog_posts` blp INNER JOIN `'.BIT_DB_PREFIX.'liberty_content` bplc ON(blp.`content_id`=bplc.`content_id`) INNER JOIN `'.BIT_DB_PREFIX.'blogs` bl ON(blp.`blog_id`=bl.`blog_id`) INNER JOIN `'.BIT_DB_PREFIX.'liberty_content` blc ON(bl.`content_id`=blc.`content_id`))"; $gBitSystem->mDb->query( $query2 ); $query3 = $gBitDb->getOne("SELECT MAX(blog_id) FROM `'.BIT_DB_PREFIX.'blogs`"); - $tempId = $gBitDb->mDb->GenID("`'.BIT_DB_PREFIX.'blogs_blog_id_seq`", $query3); + $tempId = $gBitDb->mDb->GenID("blogs_blog_id_seq", $query3); ' ), // Drop moved columns |
