[pLog-svn] r3932 - plog/trunk/class/action/admin
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Sun Sep 3 19:01:03 GMT 2006
Author: oscar
Date: 2006-09-03 19:01:02 +0000 (Sun, 03 Sep 2006)
New Revision: 3932
Modified:
plog/trunk/class/action/admin/admindoregisterblogaction.class.php
Log:
fixed issue 1019 (http://bugs.lifetype.net/view.php?id=1019)
Modified: plog/trunk/class/action/admin/admindoregisterblogaction.class.php
===================================================================
--- plog/trunk/class/action/admin/admindoregisterblogaction.class.php 2006-09-03 18:29:57 UTC (rev 3931)
+++ plog/trunk/class/action/admin/admindoregisterblogaction.class.php 2006-09-03 19:01:02 UTC (rev 3932)
@@ -12,6 +12,8 @@
include_once( PLOG_CLASS_PATH."class/dao/articlecategories.class.php" );
include_once( PLOG_CLASS_PATH."class/data/timestamp.class.php" );
include_once( PLOG_CLASS_PATH."class/net/http/subdomains.class.php" );
+ include_once( PLOG_CLASS_PATH."class/gallery/dao/galleryalbums.class.php" );
+ include_once( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
class AdminDoRegisterBlogAction extends AdminAction
{
@@ -130,8 +132,27 @@
$t = new Timestamp();
$article->setDateObject( $t );
$articles = new Articles();
- $articles->addArticle( $article );
+ $articles->addArticle( $article );
+ // create a new link category and album
+ $t = new Timestamp();
+ $album = new GalleryAlbum( $newBlogId, // blog id
+ $locale->tr( "register_default_album_name" ), // album name
+ $locale->tr( "register_default_album_description" ), // album description
+ GALLERY_RESOURCE_PREVIEW_AVAILABLE, // flags
+ 0, // no parent id
+ $t->getTimestamp(), // current date
+ Array(), // no properties
+ true ); // show the album in the interface
+ $albums = new GalleryAlbums();
+ $albums->addAlbum( $album );
+
+ // add a new default mylinkscategory
+ include_once( PLOG_CLASS_PATH."class/dao/mylinkscategories.class.php" );
+ $linksCategory = new MyLinksCategory( $locale->tr("register_default_category" ), $newBlogId );
+ $linksCategories = new MyLinksCategories();
+ $linksCategories->addMyLinksCategory( $linksCategory );
+
// after we update everything, we need to get the userInfo from db and set to session again.
include_once( PLOG_CLASS_PATH."class/dao/users.class.php" );
$users = new Users();
More information about the pLog-svn
mailing list