mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
missing deleteaccount hook for timesheets
This commit is contained in:
parent
1c886276a8
commit
525daf4a3e
@ -5,7 +5,7 @@
|
|||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* @package timesheet
|
* @package timesheet
|
||||||
* @copyright (c) 2005-11 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @copyright (c) 2005-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
@ -695,6 +695,32 @@ class timesheet_bo extends so_sql_cf
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* delete / move all timesheets of a given user
|
||||||
|
*
|
||||||
|
* @param array $data
|
||||||
|
* @param int $data['account_id'] owner to change
|
||||||
|
* @param int $data['new_owner'] new owner or 0 for delete
|
||||||
|
*/
|
||||||
|
function deleteaccount($data)
|
||||||
|
{
|
||||||
|
$account_id = $data['account_id'];
|
||||||
|
$new_owner = $data['new_owner'];
|
||||||
|
|
||||||
|
if (!$new_owner)
|
||||||
|
{
|
||||||
|
egw_link::unlink(0, TIMESHEET_APP, '', $account_id);
|
||||||
|
parent::delete(array('ts_owner' => $account_id));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->db->update($this->table_name, array(
|
||||||
|
'ts_owner' => $new_owner,
|
||||||
|
), array(
|
||||||
|
'ts_owner' => $account_id,
|
||||||
|
), __LINE__, __FILE__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set a status for timesheet entry identified by $keys
|
* set a status for timesheet entry identified by $keys
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* @package timesheet
|
* @package timesheet
|
||||||
* @subpackage setup
|
* @subpackage setup
|
||||||
* @copyright (c) 2005-10 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @copyright (c) 2005-13 by Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
@ -32,7 +32,7 @@ $setup_info[TIMESHEET_APP]['description'] =
|
|||||||
'Tracking times and other activities for the Projectmanager.';
|
'Tracking times and other activities for the Projectmanager.';
|
||||||
$setup_info[TIMESHEET_APP]['note'] =
|
$setup_info[TIMESHEET_APP]['note'] =
|
||||||
'The TimeSheet application is sponsored by:<ul>
|
'The TimeSheet application is sponsored by:<ul>
|
||||||
<li> <a href="http://www.stylite.de" target="_blank">Stylite GmbH</a></li>
|
<li> <a href="http://www.stylite.de" target="_blank">Stylite AG</a></li>
|
||||||
<li> <a href="http://www.outdoor-training.de" target="_blank">Outdoor Unlimited Training GmbH</a></li>
|
<li> <a href="http://www.outdoor-training.de" target="_blank">Outdoor Unlimited Training GmbH</a></li>
|
||||||
</ul>';
|
</ul>';
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ $setup_info[TIMESHEET_APP]['hooks']['admin'] = 'timesheet_hooks::all_hooks';
|
|||||||
$setup_info[TIMESHEET_APP]['hooks']['sidebox_menu'] = 'timesheet_hooks::all_hooks';
|
$setup_info[TIMESHEET_APP]['hooks']['sidebox_menu'] = 'timesheet_hooks::all_hooks';
|
||||||
$setup_info[TIMESHEET_APP]['hooks']['search_link'] = 'timesheet_hooks::search_link';
|
$setup_info[TIMESHEET_APP]['hooks']['search_link'] = 'timesheet_hooks::search_link';
|
||||||
$setup_info[TIMESHEET_APP]['hooks']['pm_cumulate'] = 'timesheet_hooks::cumulate';
|
$setup_info[TIMESHEET_APP]['hooks']['pm_cumulate'] = 'timesheet_hooks::cumulate';
|
||||||
|
$setup_info[TIMESHEET_APP]['hooks']['deleteaccount'] = 'timesheet.timesheet_bo.deleteaccount';
|
||||||
|
|
||||||
/* Dependencies for this app to work */
|
/* Dependencies for this app to work */
|
||||||
$setup_info[TIMESHEET_APP]['depends'][] = array(
|
$setup_info[TIMESHEET_APP]['depends'][] = array(
|
||||||
|
Loading…
Reference in New Issue
Block a user