phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] bookmarks/inc class.so.inc.php, 1.1.2.3, 1.1.2.4 clas


From: Dave Hall <address@hidden>
Subject: [Phpgroupware-cvs] bookmarks/inc class.so.inc.php, 1.1.2.3, 1.1.2.4 class.ui.inc.php, 1.1.2.9, 1.1.2.10 hook_bookmarks_about.inc.php, 1.4, 1.4.4.1
Date: Thu, 09 Oct 2003 09:12:26 +0000

Update of /cvsroot/phpgroupware/bookmarks/inc
In directory subversions:/tmp/cvs-serv13690/inc

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

Index: hook_bookmarks_about.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/hook_bookmarks_about.inc.php,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -C2 -d -r1.4 -r1.4.4.1
*** hook_bookmarks_about.inc.php        17 Nov 2001 01:42:47 -0000      1.4
--- hook_bookmarks_about.inc.php        9 Oct 2003 09:12:24 -0000       1.4.4.1
***************
*** 7,19 ****
        function about_app()
        {
!               global $HTTP_USER_AGENT;
  
                $browser= 'UNKNOWN';
  
!               if (ereg('MSIE',$HTTP_USER_AGENT))
                {
                        $browser = 'MSIE';
                }
!               elseif (ereg('Mozilla',$HTTP_USER_AGENT))
                {
                        $browser = 'NETSCAPE';
--- 7,19 ----
        function about_app()
        {
!               $_SERVER['HTTP_USER_AGENT'];
  
                $browser= 'UNKNOWN';
  
!               if (ereg('MSIE',$_SERVER['HTTP_USER_AGENT']))
                {
                        $browser = 'MSIE';
                }
!               elseif (ereg('Mozilla',$_SERVER['HTTP_USER_AGENT']))
                {
                        $browser = 'NETSCAPE';
***************
*** 40,44 ****
                        $tpl->parse('browser_quik_mark','ns',True);
                }
!               $tpl->set_var('user_agent',$HTTP_USER_AGENT);
                
$tpl->set_var('create_url',$GLOBALS['phpgw_info']['server']['webserver_url'] . 
'/login.php');
  
--- 40,44 ----
                        $tpl->parse('browser_quik_mark','ns',True);
                }
!               $tpl->set_var('user_agent',$_SERVER['HTTP_USER_AGENT']);
                
$tpl->set_var('create_url',$GLOBALS['phpgw_info']['server']['webserver_url'] . 
'/login.php');
  

Index: class.ui.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/class.ui.inc.php,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.10
diff -C2 -d -r1.1.2.9 -r1.1.2.10
*** class.ui.inc.php    25 Jun 2003 02:36:51 -0000      1.1.2.9
--- class.ui.inc.php    9 Oct 2003 09:12:24 -0000       1.1.2.10
***************
*** 155,167 ****
                {
                        //if we redirect to edit categories, we remember form 
values and try to come back to create
!                       if ($GLOBALS['HTTP_POST_VARS']['edit_category_x'] || 
$GLOBALS['HTTP_POST_VARS']['edit_category_y'])
                        {
!                               
$this->bo->grab_form_values($this->location_info['returnto'],'create',$GLOBALS['HTTP_POST_VARS']['bookmark']);
                                
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=bookmarks&global_cats=True'));
                        }
                        //save bookmark
!                       if ($GLOBALS['HTTP_POST_VARS']['save_x'] || 
$GLOBALS['HTTP_POST_VARS']['save_y'])
                        {
!                               $bookmark = 
$GLOBALS['HTTP_POST_VARS']['bookmark'];
                                $bm_id = $this->bo->add($bookmark);
                                if ($bm_id)
--- 155,167 ----
                {
                        //if we redirect to edit categories, we remember form 
values and try to come back to create
!                       if ($_POST['edit_category_x'] || 
$_POST['edit_category_y'])
                        {
!                               
$this->bo->grab_form_values($this->location_info['returnto'],'create',$_POST['bookmark']);
                                
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=bookmarks&global_cats=True'));
                        }
                        //save bookmark
!                       if ($_POST['save_x'] || $_POST['save_y'])
                        {
!                               $bookmark = $_POST['bookmark'];
                                $bm_id = $this->bo->add($bookmark);
                                if ($bm_id)
***************
*** 184,188 ****
                        }
                        //if the user cancelled we go back to the view we came 
from
!                       if ($GLOBALS['HTTP_POST_VARS']['cancel_x'] || 
$GLOBALS['HTTP_POST_VARS']['cancel_y'])
                        {
                                unset($this->location_info['returnto2']);
--- 184,188 ----
                        }
                        //if the user cancelled we go back to the view we came 
from
!                       if ($_POST['cancel_x'] || $_POST['cancel_y'])
                        {
                                unset($this->location_info['returnto2']);
***************
*** 250,256 ****
                function edit()
                {
!                       if (isset($GLOBALS['HTTP_GET_VARS']['bm_id']))
                        {
!                               $bm_id = $GLOBALS['HTTP_GET_VARS']['bm_id'];
                        }
                        elseif (is_array($this->location_info))
--- 250,256 ----
                function edit()
                {
!                       if (isset($_GET['bm_id']))
                        {
!                               $bm_id = $_GET['bm_id'];
                        }
                        elseif (is_array($this->location_info))
***************
*** 259,263 ****
                        }
                        //if the user cancelled we go back to the view we came 
from
!                       if ($GLOBALS['HTTP_POST_VARS']['cancel_x'] || 
$GLOBALS['HTTP_POST_VARS']['cancel_y'])
                        {
                                unset($this->location_info['returnto2']);
--- 259,263 ----
                        }
                        //if the user cancelled we go back to the view we came 
from
!                       if ($_POST['cancel_x'] || $_POST['cancel_y'])
                        {
                                unset($this->location_info['returnto2']);
***************
*** 266,270 ****
                        }
                        //delete bookmark and go back to view we came from
!                       if ($GLOBALS['HTTP_POST_VARS']['delete_x'] || 
$GLOBALS['HTTP_POST_VARS']['delete_y'])
                        {
                                $this->bo->delete($bm_id);
--- 266,270 ----
                        }
                        //delete bookmark and go back to view we came from
!                       if ($_POST['delete_x'] || $_POST['delete_y'])
                        {
                                $this->bo->delete($bm_id);
***************
*** 274,286 ****
                        }
                        //if we redirect to edit categories, we remember form 
values and try to come back to edit
!                       if ($GLOBALS['HTTP_POST_VARS']['edit_category_x'] || 
$GLOBALS['HTTP_POST_VARS']['edit_category_y'])
                        {
!                               
$this->bo->grab_form_values($this->location_info['returnto'],'edit',$GLOBALS['HTTP_POST_VARS']['bookmark']);
                                
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=bookmarks&global_cats=True'));
                        }
                        //save bookmark and go to view interface
!                       if ($GLOBALS['HTTP_POST_VARS']['save_x'] || 
$GLOBALS['HTTP_POST_VARS']['save_y'])
                        {
!                               $bookmark = 
$GLOBALS['HTTP_POST_VARS']['bookmark'];
                                if ($this->bo->update($bm_id,$bookmark))
                                {
--- 274,286 ----
                        }
                        //if we redirect to edit categories, we remember form 
values and try to come back to edit
!                       if ($_POST['edit_category_x'] || 
$_POST['edit_category_y'])
                        {
!                               
$this->bo->grab_form_values($this->location_info['returnto'],'edit',$_POST['bookmark']);
                                
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/index.php','menuaction=preferences.uicategories.index&cats_app=bookmarks&global_cats=True'));
                        }
                        //save bookmark and go to view interface
!                       if ($_POST['save_x'] || $_POST['save_y'])
                        {
!                               $bookmark = $_POST['bookmark'];
                                if ($this->bo->update($bm_id,$bookmark))
                                {
***************
*** 396,410 ****
                                $bm_cat = $this->location_info['bm_cat'];
                        }
!                       if (isset($GLOBALS['HTTP_GET_VARS']['bm_cat']))
                        {
!                               $bm_cat = $GLOBALS['HTTP_GET_VARS']['bm_cat'];
                        }
!                       if (isset($GLOBALS['HTTP_GET_VARS']['start']))
                        {
!                               $start = $GLOBALS['HTTP_GET_VARS']['start'];
                        }
!                       if (isset($GLOBALS['HTTP_POST_VARS']['start']))
                        {
!                               $start = $GLOBALS['HTTP_POST_VARS']['start'];
                        }
                        $this->location_info['start'] = $start;
--- 396,410 ----
                                $bm_cat = $this->location_info['bm_cat'];
                        }
!                       if (isset($_GET['bm_cat']))
                        {
!                               $bm_cat = $_GET['bm_cat'];
                        }
!                       if (isset($_GET['start']))
                        {
!                               $start = $_GET['start'];
                        }
!                       if (isset($_POST['start']))
                        {
!                               $start = $_POST['start'];
                        }
                        $this->location_info['start'] = $start;
***************
*** 481,492 ****
                                $x = $this->location_info['x'];
                        }
!                       if (isset($GLOBALS['HTTP_POST_VARS']['x']))
                        {
!                               $x = $GLOBALS['HTTP_POST_VARS']['x'];
                                $this->location_info['x'] = $x;
                        }
!                       if (isset($GLOBALS['HTTP_POST_VARS']['start']))
                        {
!                               $start = $GLOBALS['HTTP_POST_VARS']['start'];
                                $this->location_info['searchstart'] = $start;
                        }
--- 481,492 ----
                                $x = $this->location_info['x'];
                        }
!                       if (isset($_POST['x']))
                        {
!                               $x = $_POST['x'];
                                $this->location_info['x'] = $x;
                        }
!                       if (isset($_POST['start']))
                        {
!                               $start = $_POST['start'];
                                $this->location_info['searchstart'] = $start;
                        }
***************
*** 881,887 ****
                function view()
                {
!                       if (isset($GLOBALS['HTTP_GET_VARS']['bm_id']))
                        {
!                               $bm_id = $GLOBALS['HTTP_GET_VARS']['bm_id'];
                        }
                        elseif (is_array($this->location_info))
--- 881,887 ----
                function view()
                {
!                       if (isset($_GET['bm_id']))
                        {
!                               $bm_id = $_GET['bm_id'];
                        }
                        elseif (is_array($this->location_info))
***************
*** 890,894 ****
                        }
                        //if the user cancelled we go back to the view we came 
from
!                       if ($GLOBALS['HTTP_POST_VARS']['cancel_x'] || 
$GLOBALS['HTTP_POST_VARS']['cancel_y'])
                        {
                                unset($this->location_info['returnto2']);
--- 890,894 ----
                        }
                        //if the user cancelled we go back to the view we came 
from
!                       if ($_POST['cancel_x'] || $_POST['cancel_y'])
                        {
                                unset($this->location_info['returnto2']);
***************
*** 897,901 ****
                        }
                        //delete bookmark and go back to view we came from
!                       if ($GLOBALS['HTTP_POST_VARS']['delete_x'] || 
$GLOBALS['HTTP_POST_VARS']['delete_y'])
                        {
                                $this->bo->delete($bm_id);
--- 897,901 ----
                        }
                        //delete bookmark and go back to view we came from
!                       if ($_POST['delete_x'] || $_POST['delete_y'])
                        {
                                $this->bo->delete($bm_id);
***************
*** 904,908 ****
                                return;
                        }
!                       if ($GLOBALS['HTTP_POST_VARS']['edit_x'] || 
$GLOBALS['HTTP_POST_VARS']['edit_y'])
                        {
                                $this->edit();
--- 904,908 ----
                                return;
                        }
!                       if ($_POST['edit_x'] || $_POST['edit_y'])
                        {
                                $this->edit();
***************
*** 994,1007 ****
                        ));
  
!                       if ($GLOBALS['HTTP_POST_VARS']['send']) // Send button 
clicked
                        {
                                $validate = createobject('phpgwapi.validator');
                                // Strip space and tab from anywhere in the To 
field
!                               $to = 
$validate->strip_space($GLOBALS['HTTP_POST_VARS']['to']);
  
                                // Trim the subject
!                               $subject = 
$GLOBALS['phpgw']->strip_html(trim($GLOBALS['HTTP_POST_VARS']['subject']));
  
!                               $message = 
$GLOBALS['phpgw']->strip_html($GLOBALS['HTTP_POST_VARS']['message']);
  
                                // Do we have all necessary data?
--- 994,1007 ----
                        ));
  
!                       if ($_POST['send'])     // Send button clicked
                        {
                                $validate = createobject('phpgwapi.validator');
                                // Strip space and tab from anywhere in the To 
field
!                               $to = $validate->strip_space($_POST['to']);
  
                                // Trim the subject
!                               $subject = 
$GLOBALS['phpgw']->strip_html(trim($_POST['subject']));
  
!                               $message = 
$GLOBALS['phpgw']->strip_html($_POST['message']);
  
                                // Do we have all necessary data?
***************
*** 1055,1061 ****
                        if (empty($message))
                        {
!                               if 
(is_array($GLOBALS['HTTP_POST_VARS']['item_cb']))
                                {
!                                       while (list(,$id) = 
each($GLOBALS['HTTP_POST_VARS']['item_cb']))
                                        {
                                                $bookmark = 
$this->bo->read($id);
--- 1055,1061 ----
                        if (empty($message))
                        {
!                               if (is_array($_POST['item_cb']))
                                {
!                                       while (list(,$id) = 
each($_POST['item_cb']))
                                        {
                                                $bookmark = 
$this->bo->read($id);
***************
*** 1068,1072 ****
                                else
                                {
!                                       $bookmark = 
$this->bo->read($GLOBALS['HTTP_GET_VARS']['bm_id']);
                                        $links[] = array(
                                                'name' => $bookmark['name'],
--- 1068,1072 ----
                                else
                                {
!                                       $bookmark = 
$this->bo->read($_GET['bm_id']);
                                        $links[] = array(
                                                'name' => $bookmark['name'],
***************
*** 1103,1108 ****
                function mass()
                {
!                       $item_cb = $GLOBALS['HTTP_POST_VARS']['item_cb'];
!                       if ($GLOBALS['HTTP_POST_VARS']['delete_x'] || 
$GLOBALS['HTTP_POST_VARS']['delete_y'])
                        {
                                if (is_array($item_cb))
--- 1103,1108 ----
                function mass()
                {
!                       $item_cb = $_POST['item_cb'];
!                       if ($_POST['delete_x'] || $_POST['delete_y'])
                        {
                                if (is_array($item_cb))
***************
*** 1121,1125 ****
                                $this->_list();
                        }
!                       elseif ($GLOBALS['HTTP_POST_VARS']['mail_x'] || 
$GLOBALS['HTTP_POST_VARS']['mail_y'])
                        {
                                $this->mail();
--- 1121,1125 ----
                                $this->_list();
                        }
!                       elseif ($_POST['mail_x'] || $_POST['mail_y'])
                        {
                                $this->mail();
***************
*** 1129,1133 ****
                function redirect()
                {
!                       $bm_id = $GLOBALS['HTTP_GET_VARS']['bm_id'];
                        $bookmark = $this->bo->read($bm_id);
                        $ts = explode(",",$bookmark['info']);
--- 1129,1133 ----
                function redirect()
                {
!                       $bm_id = $_GET['bm_id'];
                        $bookmark = $this->bo->read($bm_id);
                        $ts = explode(",",$bookmark['info']);
***************
*** 1192,1194 ****
                        $GLOBALS['phpgw']->common->phpgw_footer();
                }
!       }
\ No newline at end of file
--- 1192,1194 ----
                        $GLOBALS['phpgw']->common->phpgw_footer();
                }
!       }

Index: class.so.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/bookmarks/inc/class.so.inc.php,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -C2 -d -r1.1.2.3 -r1.1.2.4
*** class.so.inc.php    16 May 2003 20:55:24 -0000      1.1.2.3
--- class.so.inc.php    9 Oct 2003 09:12:24 -0000       1.1.2.4
***************
*** 79,83 ****
                function read($id)
                {
!                       $query = "SELECT * FROM phpgw_bookmarks WHERE 
bm_id=$id";
                        $this->db->query($query);
                        if ($this->db->next_record())
--- 79,83 ----
                function read($id)
                {
!                       $query = 'SELECT * FROM phpgw_bookmarks WHERE bm_id=' 
intval($id);
                        $this->db->query($query);
                        if ($this->db->next_record())
***************
*** 103,107 ****
                function exists($url)
                {
!                       $query = sprintf("select count(*) from phpgw_bookmarks 
where bm_url='%s' and bm_owner='%s'",$url, 
$GLOBALS['phpgw_info']['user']['account_id']);
                        $this->db->query($query,__LINE__,__FILE__);
                        $this->db->next_record();
--- 103,110 ----
                function exists($url)
                {
!                       $query  = 'SELECT COUNT(*)'
!                               . ' FROM phpgw_bookmarks'
!                               . " WHERE bm_url='" . 
$this->db->db_addslashes($url) . "'"
!                               . ' AND bm_owner=' . 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->db->query($query,__LINE__,__FILE__);
                        $this->db->next_record();
***************
*** 146,150 ****
                        }
  
!                       $this->db->query("select bm_info from phpgw_bookmarks 
where bm_id='$id'",__LINE__,__FILE__);
                        $this->db->next_record();
                        $ts = explode(',',$GLOBALS['phpgw']->db->f('bm_info'));
--- 149,153 ----
                        }
  
!                       $this->db->query('SELECT bm_info FROM phpgw_bookmarks 
WHERE bm_id=' .intval($id),__LINE__,__FILE__);
                        $this->db->next_record();
                        $ts = explode(',',$GLOBALS['phpgw']->db->f('bm_info'));
***************
*** 159,163 ****
                                        $values['url'], 
addslashes($values['name']), addslashes($values['desc']), 
addslashes($values['keywords']), 
  //                                    $category, $subcategory, 
$values['rating'], $timestamps, $values['access'], $id);
!                                       $values['category'],$values['rating'], 
$timestamps, $values['access'], $id);
  
                        if ($this->db->query($query,__LINE__,__FILE__))
--- 162,166 ----
                                        $values['url'], 
addslashes($values['name']), addslashes($values['desc']), 
addslashes($values['keywords']), 
  //                                    $category, $subcategory, 
$values['rating'], $timestamps, $values['access'], $id);
!                                       $values['category'],$values['rating'], 
$timestamps, $values['access'], intval($id));
  
                        if ($this->db->query($query,__LINE__,__FILE__))
***************
*** 174,178 ****
                function updatetimestamp($id,$timestamp)
                {
!                       $query = "UPDATE phpgw_bookmarks SET 
bm_info='$timestamp', bm_visits=bm_visits+1 WHERE bm_id=$id";
                        $this->db->query($query,__LINE__,__FILE__);
                }
--- 177,183 ----
                function updatetimestamp($id,$timestamp)
                {
!                       $query = 'UPDATE phpgw_bookmarks'
!                               . ' SET bm_info=' . intval($timestamp) 
!                               . ' , bm_visits=bm_visits+1 WHERE bm_id=' 
.intval($id);
                        $this->db->query($query,__LINE__,__FILE__);
                }
***************
*** 180,184 ****
                function delete($id)
                {
!                       $query = "delete from phpgw_bookmarks where bm_id=$id";
                        $this->db->query($query,__LINE__,__FILE__);
                        if ($this->db->Errno != 0)
--- 185,189 ----
                function delete($id)
                {
!                       $query = 'DELETE FROM phpgw_bookmarks WHERE bm_id=' . 
intval($id);
                        $this->db->query($query,__LINE__,__FILE__);
                        if ($this->db->Errno != 0)
***************
*** 188,190 ****
                        return true;
                }
!       }
\ No newline at end of file
--- 193,195 ----
                        return true;
                }
!       }





reply via email to

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