phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.123.2.5,1.12


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.123.2.5,1.123.2.6
Date: Sun, 27 Oct 2002 23:01:23 -0500

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.common.inc.php 
Log Message:
update function image to use lang

Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.123.2.5
retrieving revision 1.123.2.6
diff -C2 -r1.123.2.5 -r1.123.2.6
*** class.common.inc.php        16 Oct 2002 21:28:01 -0000      1.123.2.5
--- class.common.inc.php        28 Oct 2002 04:01:20 -0000      1.123.2.6
***************
*** 862,909 ****
                }
  
!               function image($appname,$image='',$ext='')
                {
!                       if(is_array($image))
                        {
!                               $i = 0;
!                               
if(isset($this->found_files[$appname][$image[$i].$ext]))
                                {
!                                       $image_found = 
$GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files[$appname][$image[$i].$ext].'/'.$image[$i].$ext;
                                }
!                               else
!                               {
!                                       $image_found = 
$this->find_image($appname,$image[$i].$ext);
!                               }
!                               $c_image = count($image);
!                               $i++;
!                               while($image_found == '' && $i<$c_image)
                                {
!                                       
if(isset($this->found_files[$appname][$image[$i].$ext]))
!                                       {
!                                               $image_found = 
$GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files[$appname][$image[$i].$ext].'/'.$image[$i].$ext;
!                                       }
!                                       else
!                                       {
!                                               $image_found = 
$this->find_image($appname,$image[$i].$ext);
!                                               $i++;
!                                       }
                                }
!                               return $image_found;
                        }
!                       elseif($image != '')
                        {
!                               
if(isset($this->found_files[$appname][$image.$ext]))
                                {
!                                       return 
$GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files[$appname][$image.$ext].'/'.$image.$ext;
                                }
                                else
                                {
!                                       return 
$this->find_image($appname,$image.$ext);
                                }
                        }
!                       else
!                       {
!                               return '';
!                       }
                }
  
--- 862,896 ----
                }
  
!               function image($appname,$image='',$ext='',$use_lang=True)
                {
!                       if (!is_array($image))
                        {
!                               if (empty($image))
                                {
!                                       return '';
                                }
!                               $image = array($image);
!                       }
!                       if ($use_lang)
!                       {
!                               while (list(,$img) = each($image))
                                {
!                                       $lang_images[] = $img . '_' . 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
!                                       $lang_images[] = $img;
                                }
!                               $image = $lang_images;
                        }
!                       while (!$image_found && list(,$img) = each($image))
                        {
!                               
if(isset($this->found_files[$appname][$img.$ext]))
                                {
!                                       $image_found = 
$GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files[$appname][$img.$ext].'/'.$img.$ext;
                                }
                                else
                                {
!                                       $image_found = 
$this->find_image($appname,$img.$ext);
                                }
                        }
!                       return $image_found;
                }
  





reply via email to

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