phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] [19048] use the phpgw::get_var method


From: Caeies
Subject: [Phpgroupware-cvs] [19048] use the phpgw::get_var method
Date: Wed, 04 Feb 2009 17:59:41 +0000

Revision: 19048
          
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=19048
Author:   Caeies
Date:     2009-02-04 17:59:41 +0000 (Wed, 04 Feb 2009)

Log Message:
-----------
use the phpgw::get_var method

Modified Paths:
--------------
    core/trunk/addressbook/inc/hook_deleteaccount.inc.php

Modified: core/trunk/addressbook/inc/hook_deleteaccount.inc.php
===================================================================
--- core/trunk/addressbook/inc/hook_deleteaccount.inc.php       2009-02-04 
17:59:14 UTC (rev 19047)
+++ core/trunk/addressbook/inc/hook_deleteaccount.inc.php       2009-02-04 
17:59:41 UTC (rev 19048)
@@ -13,14 +13,15 @@
        /* $Id$ */
 
        $contacts = CreateObject('phpgwapi.contacts');
-
-       if ( (int) $_POST['new_owner'] == 0 )
+       $new_owner = phpgw::get_var('new_owner', 'int', 'POST');
+       $account_id =  phpgw::get_var('account_id', 'int', 'POST');
+       if ( $new_owner == 0 )
        {
-               $contacts->delete_all(intval($_POST['account_id']));
+               $contacts->delete_all($account_id);
        }
        else
        {
-               $contacts->change_owner($_POST['account_id'], 
$_POST['new_owner']);
-               $contacts->change_owner_others($_POST['account_id'], 
$_POST['new_owner']);
+               $contacts->change_owner($account_id, $new_owner);
+               $contacts->change_owner_others($account_id, $new_owner);
        }
 ?>






reply via email to

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