<?php
/*
Plugin - PlogHaiku
Copyright (C) 2005 Darren Greer
                                                                                
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
*/

include_once(PLOG_CLASS_PATH."class/view/plugintemplatedview.class.php");
include_once(PLOG_CLASS_PATH."class/action/admin/blogowneradminaction.class.php");
include_once(PLOG_CLASS_PATH."plugins/ploghaiku/class/dao/ploghaikudao.class.php");
include_once(PLOG_CLASS_PATH."plugins/ploghaiku/class/dao/ploghaikuobject.class.php");

class InitializeHaikuAction extends BlogOwnerAdminAction
{

  function perform()
  {
    $emsg = $smsg = "";

    $haikuDao = new PlogHaikuDao();

    if ($haikuDao->initializeHaiku( $this->_blogInfo->getId(), $this->_blogInfo->getOwner()))
    {
      $smsg .= $this->_locale->tr( "haiku_table_created_ok" );
    } else {
      $emsg .= $this->_locale->tr( "error_creating_haiku_table" );
    }

    Controller::setForwardAction("Manage");
  }

}

?>
