<?php
	/**************************************************************************\
	* phpGroupWare - Trouble Ticket System                                     *
	* http://www.phpgroupware.org                                              *
	* --------------------------------------------                             *
	*  This program is free software; you can redistribute it and/or modify it *
	*  under the terms of the GNU General Public License as published by the   *
	*  Free Software Foundation; either version 2 of the License, or (at your  *
	*  option) any later version.                                              *
	\**************************************************************************/
	/* $Id: default_records.inc.php 19058 2009-02-11 08:07:49Z skwashd $ */

	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. " values(0,0,0,-1,'public','tts','Platform','Global category for tts','platform')",__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query("SELECT cat_id from phpgw_categories where cat_name='Platform' and cat_owner=-1 and cat_appname='tts'",__LINE__,__FILE__);
	if($GLOBALS['phpgw_setup']->oProc->next_record())
	{
		$main = $GLOBALS['phpgw_setup']->oProc->f('cat_id');
	}
	$main = intval($main);

	$GLOBALS['phpgw_setup']->oProc->query('UPDATE phpgw_categories set cat_main=' . $main . ' where cat_id=' . $main,__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. ' values('. $main . ',' . $main . ",1,-1,'public','tts','Linux','Global category for tts','platform')",__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. ' values('. $main . ',' . $main . ",1,-1,'public','tts','Windows','Global category for tts','platform')",__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. ' values('. $main . ',' . $main . ",1,-1,'public','tts','MacOS','Global category for tts','platform')",__LINE__,__FILE__);


	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. " values(0,0,0,-1,'public','tts','Type','Global category for tts','type')",__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query("SELECT cat_id from phpgw_categories where cat_name='Type' and cat_owner=-1 and cat_appname='tts'",__LINE__,__FILE__);
	if($GLOBALS['phpgw_setup']->oProc->next_record())
	{
		$main = $GLOBALS['phpgw_setup']->oProc->f('cat_id');
	}
	$main = intval($main);

	$GLOBALS['phpgw_setup']->oProc->query('UPDATE phpgw_categories set cat_main=' . $main . ' where cat_id=' . $main,__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. ' values('. $main . ',' . $main . ",1,-1,'public','tts','Bug','Global category for tts','type')",__LINE__,__FILE__);

	$GLOBALS['phpgw_setup']->oProc->query('INSERT into phpgw_categories (cat_main,cat_parent,cat_level,cat_owner,cat_access,cat_appname,cat_name,cat_description,cat_data)'
										. ' values('. $main . ',' . $main . ",1,-1,'public','tts','Feature Request','Global category for tts','type')",__LINE__,__FILE__);
