<?php
/**
* @version	$Id: custom_data_config.php 13086 2010-01-12 19:47:40Z alex $
* @package	In-Portal
* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license      GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/

defined('FULL_PATH') or die('restricted access!');

	$config = Array (
		'Prefix' => 'cdata',

		'QueryString' => Array (
			1 => 'id',
			2 => 'event',
		),

		'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
		'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
		'EventHandlerClass' => Array('class' => 'CustomDataEventHandler', 'file' => 'custom_data_event_handler.php', 'build_event' => 'OnBuild'),
		'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
		'AutoLoad' => true,

		'IDField' => 'CustomDataId',

		'ParentTableKey' => 'ResourceId',
		'ForeignKey' => 'ResourceId',
		'AutoDelete' => true,
		'AutoClone' => true,

		'CalculatedFields' => Array (
			'' => Array(),
		),

		'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
		'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),

		'Fields' => Array (
		    'CustomDataId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
		    'ResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
		),
	);