<?php
# Movable Type (r) Open Source (C) 2001-2010 Six Apart, Ltd.
# This program is distributed under the terms of the
# GNU General Public License, version 2.
#
# $Id: class.mt_website.php 5225 2010-01-27 07:14:14Z takayama $

require_once("class.baseobject.php");

/***
 * Class for mt_blog (website)
 */
class Website extends Blog
{
    function Save() {
        if (empty($this->blog_class))
            $this->blog_class = 'website';
        return parent::Save();
    }

    function blogs() {
        $where = "blog_parent_id = " . $this->id;

        require_once('class.mt_blog.php');
        $blog = new Blog();
        $blogs = $blog->Find($where);
        return $blogs;
    }

    function site_path() {
        return $this->blog_site_path;
    }

    function site_url() {
        return $this->blog_site_url;
    }
}

// Relations
ADODB_Active_Record::ClassHasMany('Website', 'mt_blog_meta','blog_meta_blog_id');	
?>
