phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] notes/inc class.bo.inc.php, 1.2.2.1.2.2, 1.2.2.1.2.3


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] notes/inc class.bo.inc.php, 1.2.2.1.2.2, 1.2.2.1.2.3 class.so.inc.php, 1.2.4.3, 1.2.4.4 hook_deleteaccount.inc.php, 1.1, 1.1.4.1
Date: Fri, 10 Oct 2003 02:05:24 +0000

Update of /cvsroot/phpgroupware/notes/inc
In directory subversions:/tmp/cvs-serv27861/inc

Modified Files:
      Tag: Version-0_9_16-branch
        class.bo.inc.php class.so.inc.php hook_deleteaccount.inc.php 
Log Message:
sql and globals

Index: class.bo.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.bo.inc.php,v
retrieving revision 1.2.2.1.2.2
retrieving revision 1.2.2.1.2.3
diff -C2 -d -r1.2.2.1.2.2 -r1.2.2.1.2.3
*** class.bo.inc.php    26 Aug 2003 13:27:26 -0000      1.2.2.1.2.2
--- class.bo.inc.php    10 Oct 2003 02:05:22 -0000      1.2.2.1.2.3
***************
*** 63,72 ****
                        }
  
!                       $_start   = $GLOBALS['HTTP_POST_VARS']['start']   ? 
$GLOBALS['HTTP_POST_VARS']['start']   : $GLOBALS['HTTP_GET_VARS']['start'];
!                       $_search  = $GLOBALS['HTTP_POST_VARS']['search']  ? 
$GLOBALS['HTTP_POST_VARS']['search']  : $GLOBALS['HTTP_GET_VARS']['search'];
!                       $_sort    = $GLOBALS['HTTP_POST_VARS']['sort']    ? 
$GLOBALS['HTTP_POST_VARS']['sort']    : $GLOBALS['HTTP_GET_VARS']['sort'];
!                       $_order   = $GLOBALS['HTTP_POST_VARS']['order']   ? 
$GLOBALS['HTTP_POST_VARS']['order']   : $GLOBALS['HTTP_GET_VARS']['order'];
!                       $_filter  = $GLOBALS['HTTP_POST_VARS']['filter']  ? 
$GLOBALS['HTTP_POST_VARS']['filter']  : $GLOBALS['HTTP_GET_VARS']['filter'];
!                       $_fcat_id = $GLOBALS['HTTP_POST_VARS']['fcat_id'] ? 
$GLOBALS['HTTP_POST_VARS']['fcat_id'] : $GLOBALS['HTTP_GET_VARS']['fcat_id'];
  
                        if(!empty($_start) || ($_start == '0') || ($_start == 
0))
--- 63,72 ----
                        }
  
!                       $_start   = $_POST['start']   ? $_POST['start']   : 
$_GET['start'];
!                       $_search  = $_POST['search']  ? $_POST['search']  : 
$_GET['search'];
!                       $_sort    = $_POST['sort']    ? $_POST['sort']    : 
$_GET['sort'];
!                       $_order   = $_POST['order']   ? $_POST['order']   : 
$_GET['order'];
!                       $_filter  = $_POST['filter']  ? $_POST['filter']  : 
$_GET['filter'];
!                       $_fcat_id = $_POST['fcat_id'] ? $_POST['fcat_id'] : 
$_GET['fcat_id'];
  
                        if(!empty($_start) || ($_start == '0') || ($_start == 
0))
***************
*** 88,92 ****
                                $this->cat_id = $_fcat_id;
                        }
!                       if((isset($GLOBALS['HTTP_POST_VARS']['fcat_id']) || 
isset($GLOBALS['HTTP_GET_VARS']['fcat_id'])) &&
                                ($_fcat_id == '0' || $_fcat_id == 0 || 
$_fcat_id == ''))
                        {
--- 88,92 ----
                                $this->cat_id = $_fcat_id;
                        }
!                       if((isset($_POST['fcat_id']) || 
isset($_GET['fcat_id'])) &&
                                ($_fcat_id == '0' || $_fcat_id == 0 || 
$_fcat_id == ''))
                        {

Index: hook_deleteaccount.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/hook_deleteaccount.inc.php,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -C2 -d -r1.1 -r1.1.4.1
*** hook_deleteaccount.inc.php  28 Nov 2001 03:42:56 -0000      1.1
--- hook_deleteaccount.inc.php  10 Oct 2003 02:05:22 -0000      1.1.4.1
***************
*** 18,29 ****
        $db2->lock($table_locks);
  
!       if(intval($GLOBALS['HTTP_POST_VARS']['new_owner'])==0)
        {
!               $db2->query('DELETE FROM phpgw_notes WHERE 
note_owner='.intval($GLOBALS['HTTP_POST_VARS']['account_id']),__LINE__,__FILE__);
        }
        else
        {
!               $db2->query('UPDATE phpgw_notes SET 
note_owner='.intval($GLOBALS['HTTP_POST_VARS']['new_owner'])
!                       . ' WHERE 
note_owner='.intval($GLOBALS['HTTP_POST_VARS']['account_id']),__LINE__,__FILE__);
        }
        $db2->unlock();
--- 18,29 ----
        $db2->lock($table_locks);
  
!       if(intval($_POST['new_owner'])==0)
        {
!               $db2->query('DELETE FROM phpgw_notes WHERE 
note_owner='.intval($_POST['account_id']),__LINE__,__FILE__);
        }
        else
        {
!               $db2->query('UPDATE phpgw_notes SET 
note_owner='.intval($_POST['new_owner'])
!                       . ' WHERE 
note_owner='.intval($_POST['account_id']),__LINE__,__FILE__);
        }
        $db2->unlock();

Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/notes/inc/class.so.inc.php,v
retrieving revision 1.2.4.3
retrieving revision 1.2.4.4
diff -C2 -d -r1.2.4.3 -r1.2.4.4
*** class.so.inc.php    26 Aug 2003 13:27:26 -0000      1.2.4.3
--- class.so.inc.php    10 Oct 2003 02:05:22 -0000      1.2.4.4
***************
*** 24,28 ****
                        $this->db2    = $this->db;
                        $this->grants = 
$GLOBALS['phpgw']->acl->get_grants('notes');
!                       $this->owner  = 
$GLOBALS['phpgw_info']['user']['account_id'];
                }
  
--- 24,28 ----
                        $this->db2    = $this->db;
                        $this->grants = 
$GLOBALS['phpgw']->acl->get_grants('notes');
!                       $this->owner  = 
intval($GLOBALS['phpgw_info']['user']['account_id']);
                }
  
***************
*** 69,83 ****
                        if ($lastmod >= 0)
                        {
!                               $filtermethod .= " note_date > $lastmod ";
                        } 
  
                        if ($cat_id)
                        {
!                               $filtermethod .= " AND note_category=$cat_id ";
                        }
  
                        if ($search)
                        {
!                               $searchmethod = " AND note_content like 
'%$search%'";
                        }
                        
--- 69,83 ----
                        if ($lastmod >= 0)
                        {
!                               $filtermethod .= ' note_date > ' . 
intval($lastmod) . ' ';
                        } 
  
                        if ($cat_id)
                        {
!                               $filtermethod .= ' AND note_category=' . 
intval($cat_id) . ' ';
                        }
  
                        if ($search)
                        {
!                               $searchmethod = " AND note_content like 
'%".$this->db->db_addslashes($search)."%'";
                        }
                        
***************
*** 98,108 ****
                        while ($this->db->next_record())
                        {
!                               $notes[$i]['id']                = 
intval($this->db->f('note_id'));
!                               $notes[$i]['owner']             = 
$this->db->f('note_owner');
                                $notes[$i]['owner_id']  = 
intval($this->db->f('note_owner'));
                                $notes[$i]['access']    = 
$this->db->f('note_access');
!                               $notes[$i]['date']              = 
$this->db->f('note_date');
                                $notes[$i]['category']  = 
intval($this->db->f('note_category'));
!                               $notes[$i]['content']   = 
$this->db->f('note_content');
                                $notes[$i]['grants']    = 
intval($this->grants[$this->db->f('note_owner')]);
                                $notes[$i]['lastmod']   = 
intval($this->db->f('note_date'));
--- 98,108 ----
                        while ($this->db->next_record())
                        {
!                               $notes[$i]['id']        = 
intval($this->db->f('note_id'));
!                               $notes[$i]['owner']     = 
$this->db->f('note_owner');
                                $notes[$i]['owner_id']  = 
intval($this->db->f('note_owner'));
                                $notes[$i]['access']    = 
$this->db->f('note_access');
!                               $notes[$i]['date']      = 
$this->db->f('note_date');
                                $notes[$i]['category']  = 
intval($this->db->f('note_category'));
!                               $notes[$i]['content']   = 
$this->db->f('note_content', True);
                                $notes[$i]['grants']    = 
intval($this->grants[$this->db->f('note_owner')]);
                                $notes[$i]['lastmod']   = 
intval($this->db->f('note_date'));
***************
*** 114,124 ****
                function read_single_note($note_id)
                {
!                       $this->db->query("select * from phpgw_notes where 
note_id='$note_id'",__LINE__,__FILE__);
  
                        if ($this->db->next_record())
                        {
!                               $note['id']                     = 
intval($this->db->f('note_id'));
                                $note['owner']          = 
$this->db->f('note_owner');
!                               $note['content']        = 
$this->db->f('note_content');
                                $note['access']         = 
$this->db->f('note_access');
                                $note['date']           = 
$this->db->f('note_date');
--- 114,124 ----
                function read_single_note($note_id)
                {
!                       $this->db->query('SELECT * FROM phpgw_notes WHERE 
note_id=' . intval($note_id),__LINE__,__FILE__);
  
                        if ($this->db->next_record())
                        {
!                               $note['id']             = 
intval($this->db->f('note_id'));
                                $note['owner']          = 
$this->db->f('note_owner');
!                               $note['content']        = 
$this->db->f('note_content', True);
                                $note['access']         = 
$this->db->f('note_access');
                                $note['date']           = 
$this->db->f('note_date');
***************
*** 157,161 ****
                {
                        $note_id = (int) $note_id;
!                       $this->db->query('DELETE FROM phpgw_notes WHERE 
note_id=' . $note_id,__LINE__,__FILE__);
                }
        }
--- 157,161 ----
                {
                        $note_id = (int) $note_id;
!                       $this->db->query('DELETE FROM phpgw_notes WHERE 
note_id=' . intval($note_id),__LINE__,__FILE__);
                }
        }





reply via email to

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