phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] tts setup/setup.inc.php inc/class.bo_hooks.inc....


From: Dave Hall
Subject: [Phpgroupware-cvs] tts setup/setup.inc.php inc/class.bo_hooks.inc....
Date: Wed, 27 Dec 2006 02:57:18 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    tts
Changes by:     Dave Hall <skwashd>     06/12/27 02:57:18

Modified files:
        setup          : setup.inc.php 
Added files:
        inc            : class.bo_hooks.inc.php 
Removed files:
        inc            : class.tts_bo_hooks.inc.php 

Log message:
        moved tts_bo_hooks to class.bo_hooks.inc.php for new prefixed class 
names

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/tts/inc/class.bo_hooks.inc.php?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/tts/inc/class.tts_bo_hooks.inc.php?cvsroot=phpgroupware&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/tts/setup/setup.inc.php?cvsroot=phpgroupware&r1=1.15&r2=1.16

Patches:
Index: setup/setup.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/tts/setup/setup.inc.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- setup/setup.inc.php 26 Dec 2006 12:54:44 -0000      1.15
+++ setup/setup.inc.php 27 Dec 2006 02:57:18 -0000      1.16
@@ -6,7 +6,7 @@
        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
        * @package tts
        * @subpackage setup
-       * @version $Id: setup.inc.php,v 1.15 2006/12/26 12:54:44 skwashd Exp $
+       * @version $Id: setup.inc.php,v 1.16 2006/12/27 02:57:18 skwashd Exp $
        */
 
        /* Basic information about this app */
@@ -28,9 +28,9 @@
        $setup_info['tts']['hooks'][] = 'preferences';
        $setup_info['tts']['hooks'][] = 'settings';
        $setup_info['tts']['hooks'][] = 'deleteaccount';
-       $setup_info['tts']['hooks']['cat_add'] = 'tts.tts_bo_hooks.cat_add';
-       $setup_info['tts']['hooks']['cat_delete'] = 
'tts.tts_bo_hooks.cat_delete';
-       $setup_info['tts']['hooks']['cat_edit'] = 'tts.tts_bo_hooks.cat_edit';
+       $setup_info['tts']['hooks']['cat_add'] = 'tts.bo_hooks.cat_add';
+       $setup_info['tts']['hooks']['cat_delete'] = 'tts.bo_hooks.cat_delete';
+       $setup_info['tts']['hooks']['cat_edit'] = 'tts.bo_hooks.cat_edit';
 
        /* Dependencies for this app to work */
        $setup_info['tts']['depends'][] = array(

Index: inc/class.bo_hooks.inc.php
===================================================================
RCS file: inc/class.bo_hooks.inc.php
diff -N inc/class.bo_hooks.inc.php
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ inc/class.bo_hooks.inc.php  27 Dec 2006 02:57:18 -0000      1.1
@@ -0,0 +1,79 @@
+<?php
+       /**
+       * TTS Hooks Manager
+       * @author Dave Hall - skwashd at phpgroupware.org
+       * @copyright Copyright (C) 2006 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package tts
+       * @version $Id: class.bo_hooks.inc.php,v 1.1 2006/12/27 02:57:18 
skwashd Exp $
+       */
+
+       /**
+       * Centralise hook management to make life a little easier
+       *
+       * @package tts
+       */
+       class tts_bo_hooks
+       {
+               
+               /**
+               * Handle a new category being added, namely to create the 
required location 
+               * and db table for custom fields
+               */
+               function cat_add($cat_data)
+               {
+                       if ( isset($cat_data['cat_owner']) && 
$cat_data['cat_owner'] != -1 )
+                       {
+                               return false; //nothing needed to be done, we 
only care about global cats
+                       }
+                       
$GLOBALS['phpgw']->acl->add_location("C{$cat_data['cat_id']}", lang('ticket 
type: %1', $cat_data['cat_name']), 'tts', true, 
"phpgw_tts_c{$cat_data['cat_id']}");
+                       
+                       // we interupt your normal programming for this special 
annoucement
+                       $hon = $GLOBALS['phpgw']->db->Halt_On_Error;
+                       $GLOBALS['phpgw']->db->Halt_On_Error = 'report';
+                       
+                       $oProc = 
CreateObject('phpgwapi.schema_proc',$GLOBALS['phpgw_info']['server']['db_type']);
+                       $oProc->m_odb =& $GLOBALS['phpgw']->db;
+                       
+                       $oProc->CreateTable("phpgw_tts_c{$cat_data['cat_id']}", 
array
+                       (
+                               'fd' => array
+                               (
+                                       'ticket_id'     => array('type' => 
'int', 'precision' => 4, 'nullable' => false)
+                               ),
+                               'pk' => array('ticket_id'),
+                               'fk' => array(),
+                               'ix' => array(),
+                               'uc' => array()
+                       ));
+                       
+                       // we now return you to your normal prograaming
+                       $GLOBALS['phpgw']->db->Halt_On_Error = $hon;
+               }
+
+               /**
+               * Handle a category being deleted, namely to remove the 
location 
+               * and table for custom fields
+               */
+               function cat_delete($cat_data)
+               {
+                       if ( isset($cat_data['cat_owner']) && 
$cat_data['cat_owner'] != -1 )
+                       {
+                               return false; //nothing needed to be done, we 
only care about global cats
+                       }
+                       //TODO add code here to delete the ticket types and to 
clean up the ACL table
+               }
+               
+               /**
+               * Handle a category being editted, namely to update the 
location info
+               */
+               function cat_edit($cat_data)
+               {
+                       if ( isset($cat_data['cat_owner']) && 
$cat_data['cat_owner'] != -1 )
+                       {
+                               return false; //nothing needed to be done, we 
only care about global cats
+                       }
+                       
$GLOBALS['phpgw']->acl->update_location_description("C{$cat_data['cat_id']}", 
lang('ticket type: %1', $cat_data['cat_name']), 'tts');
+               }
+       }
+?>

Index: inc/class.tts_bo_hooks.inc.php
===================================================================
RCS file: inc/class.tts_bo_hooks.inc.php
diff -N inc/class.tts_bo_hooks.inc.php
--- inc/class.tts_bo_hooks.inc.php      14 Oct 2006 05:39:41 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-<?php
-       /**
-       * TTS Hooks Manager
-       * @author Dave Hall - skwashd at phpgroupware.org
-       * @copyright Copyright (C) 2006 Free Software Foundation, Inc. 
http://www.fsf.org/
-       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
-       * @package tts
-       * @version $Id: class.tts_bo_hooks.inc.php,v 1.1 2006/10/14 05:39:41 
skwashd Exp $
-       */
-
-       /**
-       * Centralise hook management to make life a little easier
-       *
-       * @package tts
-       */
-       class tts_bo_hooks
-       {
-               
-               /**
-               * Handle a new category being added, namely to create the 
required location 
-               * and db table for custom fields
-               */
-               function cat_add($cat_data)
-               {
-                       if ( isset($cat_data['cat_owner']) && 
$cat_data['cat_owner'] != -1 )
-                       {
-                               return false; //nothing needed to be done, we 
only care about global cats
-                       }
-                       
$GLOBALS['phpgw']->acl->add_location("C{$cat_data['cat_id']}", lang('ticket 
type: %1', $cat_data['cat_name']), 'tts', true, 
"phpgw_tts_c{$cat_data['cat_id']}");
-                       
-                       // we interupt your normal programming for this special 
annoucement
-                       $hon = $GLOBALS['phpgw']->db->Halt_On_Error;
-                       $GLOBALS['phpgw']->db->Halt_On_Error = 'report';
-                       
-                       $oProc = 
CreateObject('phpgwapi.schema_proc',$GLOBALS['phpgw_info']['server']['db_type']);
-                       $oProc->m_odb =& $GLOBALS['phpgw']->db;
-                       
-                       $oProc->CreateTable("phpgw_tts_c{$cat_data['cat_id']}", 
array
-                       (
-                               'fd' => array
-                               (
-                                       'ticket_id'     => array('type' => 
'int', 'precision' => 4, 'nullable' => false)
-                               ),
-                               'pk' => array('ticket_id'),
-                               'fk' => array(),
-                               'ix' => array(),
-                               'uc' => array()
-                       ));
-                       
-                       // we now return you to your normal prograaming
-                       $GLOBALS['phpgw']->db->Halt_On_Error = $hon;
-               }
-
-               /**
-               * Handle a category being deleted, namely to remove the 
location 
-               * and table for custom fields
-               */
-               function cat_delete($cat_data)
-               {
-                       if ( isset($cat_data['cat_owner']) && 
$cat_data['cat_owner'] != -1 )
-                       {
-                               return false; //nothing needed to be done, we 
only care about global cats
-                       }
-                       //TODO add code here to delete the ticket types and to 
clean up the ACL table
-               }
-               
-               /**
-               * Handle a category being editted, namely to update the 
location info
-               */
-               function cat_edit($cat_data)
-               {
-                       if ( isset($cat_data['cat_owner']) && 
$cat_data['cat_owner'] != -1 )
-                       {
-                               return false; //nothing needed to be done, we 
only care about global cats
-                       }
-                       
$GLOBALS['phpgw']->acl->update_location_description("C{$cat_data['cat_id']}", 
lang('ticket type: %1', $cat_data['cat_name']), 'tts');
-               }
-       }
-?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]