<?php
/*
 * content/widget/Rebuild.class.php
 * 
 * CopyRight(C) 2010 Shopformer Development Team. All Right Reserved
 * URL: http://sourceforge.jp/projects/shopformer/
 * 
 * 
 * Mail: m_nakashima@users.sourceforge.jp
 * Auther: Masanori Nakashima
 * Last Update: 2010-08-23
 */
require_once( dirname(dirname(dirname(__FILE__)))
	.DIRECTORY_SEPARATOR.'system'
	.DIRECTORY_SEPARATOR.'login'
	.DIRECTORY_SEPARATOR.'ModuleBase.class.php');
require_once( dirname(dirname(__FILE__))
	.DIRECTORY_SEPARATOR.'DaoWiget.class.php');
class content_widget_Rebuild extends system_login_ModuleBase {
	function content_widget_Rebuild() {
	}
	function execute( & $request ) {
		$fileUri			= strtolower(trim(stripslashes($_GET['wfile'])));
		if( strlen(trim($fileUri)) == 0 ) {
			$request->addError('ファイルURIを指定してください');
		}
		if( !$request->isError() ) {
			$widgetObject		= new content_DaoWiget($fileUri);
			$widgetObject->load( $request );
			$widgetObject->rebuildAll( $request );
			$request->setAttribute('content.widget.widgetObject',$widgetObject );
		}
	}
}
?>