phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.browser.inc.php,1.14.2.1,1.14


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.browser.inc.php,1.14.2.1,1.14.2.2
Date: Thu, 25 Apr 2002 05:45:52 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv10989

Modified Files:
      Tag: Version-0_9_14-branch
        class.browser.inc.php 
Log Message:
formatting and cleanup

Index: class.browser.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.browser.inc.php,v
retrieving revision 1.14.2.1
retrieving revision 1.14.2.2
diff -C2 -r1.14.2.1 -r1.14.2.2
*** class.browser.inc.php       24 Apr 2002 13:29:17 -0000      1.14.2.1
--- class.browser.inc.php       25 Apr 2002 09:45:50 -0000      1.14.2.2
***************
*** 34,38 ****
                var $data;
  
!               function browser ()
                {
                        global $HTTP_USER_AGENT;
--- 34,38 ----
                var $data;
  
!               function browser()
                {
                        global $HTTP_USER_AGENT;
***************
*** 40,74 ****
                                Determine browser and version
                        */
!                       if (ereg( 'MSIE 
([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER = $log_version[1];
                                $this->BROWSER_AGENT = 'IE';
                        }
!                       elseif (ereg( 'Opera 
([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
!                               ereg( 
'Opera/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER   = $log_version[1];
                                $this->BROWSER_AGENT = 'OPERA';
                        }
!                       elseif ( eregi( 'iCab 
([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
!                               eregi( 
'iCab/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER   = $log_version[1];
                                $this->BROWSER_AGENT = 'iCab';
                        } 
!                       elseif ( eregi( 
'Netscape6/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version)) 
                        {
                                $this->BROWSER_VER   = $log_version[1];
                                $this->BROWSER_AGENT = 'Netscape';
                        }
! 
!                       elseif (ereg( 
'Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
!                               ereg( 
'Konqueror/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER=$log_version[1];
                                $this->BROWSER_AGENT='Konqueror';
                        }
! 
!                       elseif (ereg( 
'Mozilla/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER=$log_version[1];
--- 40,72 ----
                                Determine browser and version
                        */
!                       if(ereg('MSIE 
([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER = $log_version[1];
                                $this->BROWSER_AGENT = 'IE';
                        }
!                       elseif(ereg('Opera 
([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) ||
!                               
ereg('Opera/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER   = $log_version[1];
                                $this->BROWSER_AGENT = 'OPERA';
                        }
!                       elseif(eregi('iCab 
([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version) ||
!                               
eregi('iCab/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER   = $log_version[1];
                                $this->BROWSER_AGENT = 'iCab';
                        } 
!                       
elseif(eregi('Netscape6/([0-9].[0-9a-zA-Z]{1,4})',$HTTP_USER_AGENT,$log_version))
 
                        {
                                $this->BROWSER_VER   = $log_version[1];
                                $this->BROWSER_AGENT = 'Netscape';
                        }
!                       
elseif(ereg('Konqueror/([0-9].[0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version) 
||
!                               
ereg('Konqueror/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER=$log_version[1];
                                $this->BROWSER_AGENT='Konqueror';
                        }
!                       
elseif(ereg('Mozilla/([0-9].[0-9]{1,2})',$HTTP_USER_AGENT,$log_version))
                        {
                                $this->BROWSER_VER=$log_version[1];
***************
*** 84,104 ****
                                Determine platform
                        */
!                       if (strstr($HTTP_USER_AGENT,'Win'))
                        {
                                $this->BROWSER_PLATFORM='Win';
                        }
!                       else if (strstr($HTTP_USER_AGENT,'Mac'))
                        {
                                $this->BROWSER_PLATFORM='Mac';
                        }
!                       else if (strstr($HTTP_USER_AGENT,'Linux'))
                        {
                                $this->BROWSER_PLATFORM='Linux';
                        }
!                       else if (strstr($HTTP_USER_AGENT,'Unix'))
                        {
                                $this->BROWSER_PLATFORM='Unix';
                        }
!                       else if (strstr($HTTP_USER_AGENT,'Beos'))
                        {
                                $this->BROWSER_PLATFORM='Beos';
--- 82,102 ----
                                Determine platform
                        */
!                       if(strstr($HTTP_USER_AGENT,'Win'))
                        {
                                $this->BROWSER_PLATFORM='Win';
                        }
!                       elseif(strstr($HTTP_USER_AGENT,'Mac'))
                        {
                                $this->BROWSER_PLATFORM='Mac';
                        }
!                       elseif(strstr($HTTP_USER_AGENT,'Linux'))
                        {
                                $this->BROWSER_PLATFORM='Linux';
                        }
!                       elseif(strstr($HTTP_USER_AGENT,'Unix'))
                        {
                                $this->BROWSER_PLATFORM='Unix';
                        }
!                       elseif(strstr($HTTP_USER_AGENT,'Beos'))
                        {
                                $this->BROWSER_PLATFORM='Beos';
***************
*** 123,141 ****
                        // per the xhmtl spec, so we need to fix this to include
                        // all compliant browsers we know of.
!                       if ($this->BROWSER_AGENT == 'IE')
                        {
                                $this->br = '<br/>';
-                       }
-                       else
-                       {
-                               $this->br = '<br>';
-                       }
- 
-                       if ($this->BROWSER_AGENT =='IE')
-                       {
                                $this->p = '<p/>';
                        }
                        else
                        {
                                $this->p = '<p>';
                        }
--- 121,132 ----
                        // per the xhmtl spec, so we need to fix this to include
                        // all compliant browsers we know of.
!                       if($this->BROWSER_AGENT == 'IE')
                        {
                                $this->br = '<br/>';
                                $this->p = '<p/>';
                        }
                        else
                        {
+                               $this->br = '<br>';
                                $this->p = '<p>';
                        }
***************
*** 170,174 ****
                function is_linux()
                {
!                       if ($this->get_platform()=='Linux')
                        {
                                return true;
--- 161,165 ----
                function is_linux()
                {
!                       if($this->get_platform()=='Linux')
                        {
                                return true;
***************
*** 182,186 ****
                function is_unix()
                {
!                       if ($this->get_platform()=='Unix')
                        {
                                return true;
--- 173,177 ----
                function is_unix()
                {
!                       if($this->get_platform()=='Unix')
                        {
                                return true;
***************
*** 194,198 ****
                function is_beos()
                {
!                       if ($this->get_platform()=='Beos')
                        {
                                return true;
--- 185,189 ----
                function is_beos()
                {
!                       if($this->get_platform()=='Beos')
                        {
                                return true;
***************
*** 206,210 ****
                function is_mac()
                {
!                       if ($this->get_platform()=='Mac')
                        {
                                return true;
--- 197,201 ----
                function is_mac()
                {
!                       if($this->get_platform()=='Mac')
                        {
                                return true;
***************
*** 218,222 ****
                function is_windows()
                {
!                       if ($this->get_platform()=='Win')
                        {
                                return true;
--- 209,213 ----
                function is_windows()
                {
!                       if($this->get_platform()=='Win')
                        {
                                return true;
***************
*** 230,234 ****
                function is_ie()
                {
!                       if ($this->get_agent()=='IE')
                        {
                                return true;
--- 221,225 ----
                function is_ie()
                {
!                       if($this->get_agent()=='IE')
                        {
                                return true;
***************
*** 242,246 ****
                function is_netscape()
                {
!                       if ($this->get_agent()=='MOZILLA')
                        {
                                return true;
--- 233,237 ----
                function is_netscape()
                {
!                       if($this->get_agent()=='MOZILLA')
                        {
                                return true;
***************
*** 254,258 ****
                function is_opera()
                {
!                       if ($this->get_agent()=='OPERA')
                        {
                                return true;
--- 245,249 ----
                function is_opera()
                {
!                       if($this->get_agent()=='OPERA')
                        {
                                return true;
***************
*** 267,277 ****
                function 
content_header($fn='',$mime='',$length='',$nocache=True)
                {
!                       if (!$mime)
                        {
                                $mime='application/octet-stream';
                        }
!                       if ($fn)
                        {
!                               if ($this->get_agent() == 'IE') // && 
browser_get_version() == "5.5")
                                {
                                        $attachment = '';
--- 258,268 ----
                function 
content_header($fn='',$mime='',$length='',$nocache=True)
                {
!                       if(!$mime)
                        {
                                $mime='application/octet-stream';
                        }
!                       if($fn)
                        {
!                               if($this->get_agent() == 'IE') // && 
browser_get_version() == "5.5")
                                {
                                        $attachment = '';
***************
*** 286,295 ****
                                header('Content-type: '.$mime);
  
!                               if ($length)
                                {
                                        header('Content-length: '.$length);
                                }
  
!                               if ($nocache)
                                {
                                        header('Pragma: no-cache');
--- 277,286 ----
                                header('Content-type: '.$mime);
  
!                               if($length)
                                {
                                        header('Content-length: '.$length);
                                }
  
!                               if($nocache)
                                {
                                        header('Pragma: no-cache');




reply via email to

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