phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: phpgwapi/inc php3_support_functions.inc.php,1.12


From: Miles Lott <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc php3_support_functions.inc.php,1.12,1.13
Date: Sun, 10 Feb 2002 07:28:27 -0500

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

Modified Files:
        php3_support_functions.inc.php 
Log Message:
formatting; reorder by alpha

Index: php3_support_functions.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/php3_support_functions.inc.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** php3_support_functions.inc.php      16 Jan 2002 06:33:06 -0000      1.12
--- php3_support_functions.inc.php      10 Feb 2002 12:28:24 -0000      1.13
***************
*** 3,6 ****
--- 3,9 ----
         * phpGroupWare API - PHP3 Compatibility layer                          
    *
         * This file written by Dan Kuykendall <address@hidden>            *
+        * and Mark Peters <address@hidden>                               *
+        * and Miles Lott <address@hidden>                                *
+        * and Jason Wies <address@hidden>                                   *
         * Has replications of PHP4 only functions to allow for transparent 
PHP3    *
         * compatibility                                                        
    *
***************
*** 29,38 ****
         * array_keys() returns the keys, numeric and string, from the input 
array.
         */
!       function array_keys ($arr, $term='')
        {
                $t = array();
!               while (list($k,$v) = each($arr))
                {
!                       if ($term && $v != $term)
                        {
                                continue;
--- 32,41 ----
         * array_keys() returns the keys, numeric and string, from the input 
array.
         */
!       function array_keys($arr, $term='')
        {
                $t = array();
!               while(list($k,$v) = each($arr))
                {
!                       if($term && $v != $term)
                        {
                                continue;
***************
*** 48,64 ****
         * of one are appended to the end of the previous one. It returns the 
resulting array.
         */
!       function array_merge ($array1, $array2, $array3 = '', $array4 = '', 
$array5 = '', $array6 = '', $array7 = '', $array8 = '', $array9 = '', $array10 
= '')
        {
!               $rarray = array ();
  
!               for ($i = 1; $i <= 10; $i++)
                {
                        $this_array = ${'array' . $i};
!                       if (is_array ($this_array))
                        {
!                               reset ($this_array);
!                               while (list ($key, $value) = each ($this_array))
                                {
!                                       if (is_int ($key))
                                        {
                                                $rarray[] = $value;
--- 51,67 ----
         * of one are appended to the end of the previous one. It returns the 
resulting array.
         */
!       function array_merge($array1, $array2, $array3='', $array4='', 
$array5='', $array6='', $array7='', $array8='', $array9='', $array10='')
        {
!               $rarray = array();
  
!               for($i = 1; $i <= 10; $i++)
                {
                        $this_array = ${'array' . $i};
!                       if(is_array($this_array))
                        {
!                               reset($this_array);
!                               while(list($key,$value) = each($this_array))
                                {
!                                       if(is_int($key))
                                        {
                                                $rarray[] = $value;
***************
*** 142,151 ****
         * otherwise.
         */
!       function array_search ($needle, $haystack, $strict = False)
        {
                @reset($haystack);
                while(list($key,$value) = each($haystack))
                {
!                       if ($haystack[$key]==$needle && (!$strict || 
gettype($haystack[$key])==gettype($needle)))
                        {
                                return $key;
--- 145,154 ----
         * otherwise.
         */
!       function array_search($needle, $haystack, $strict=False)
        {
                @reset($haystack);
                while(list($key,$value) = each($haystack))
                {
!                       if($haystack[$key]==$needle && (!$strict || 
gettype($haystack[$key])==gettype($needle)))
                        {
                                return $key;
***************
*** 198,202 ****
                while(list($key,$value) = each($array))
                {
!                       if (!isset($reversed_array[$value]))
                        {
                                $reversed_array[$value] = $key;
--- 201,205 ----
                while(list($key,$value) = each($array))
                {
!                       if(!isset($reversed_array[$value]))
                        {
                                $reversed_array[$value] = $key;
***************
*** 229,235 ****
         * otherwise.
         */
!       function in_array ($needle, $haystack, $strict = False)
        {
!               if(is_array ($haystack) && count($haystack))
                {
                        for(@reset($haystack); $x=each($haystack); )
--- 232,238 ----
         * otherwise.
         */
!       function in_array($needle, $haystack, $strict = False)
        {
!               if(is_array($haystack) && count($haystack))
                {
                        for(@reset($haystack); $x=each($haystack); )
***************
*** 250,258 ****
        function is_bool($var)
        {
!               $retval = gettype($var) ;
!               if ( strcmp( $retval, 'unknown type') == 0 )
                {
                        /* Chances are that we have a boolean */
!                       if ($var == True || $var == False)
                        {
                                return True;
--- 253,261 ----
        function is_bool($var)
        {
!               $retval = gettype($var);
!               if(strcmp($retval,'unknown type') == 0)
                {
                        /* Chances are that we have a boolean */
!                       if($var == True || $var == False)
                        {
                                return True;
***************
*** 269,285 ****
        }
  
-       /* str_repeat (PHP 4 >= 4.0.0)
-        *   string str_repeat (string input, int multiplier)
-        * Returns input_str repeated multiplier times. multiplier has to be 
greater than 0.
-        */
-       function str_repeat($input,$multiplier)
-       {
-               for($i=0,$output='';$i<$multiplier;$i++)
-               {
-                       $output .= $input;
-               }
-               return $output;
-       }
- 
        function print_r($array)
        {
--- 272,275 ----
***************
*** 287,291 ****
                {
                        echo '<ul>';
!                       while (list($index, $subarray) = each($array) )
                        {
                                echo '<li>'.$index.' <code>=&gt;</code>';
--- 277,281 ----
                {
                        echo '<ul>';
!                       while(list($index, $subarray) = each($array) )
                        {
                                echo '<li>'.$index.' <code>=&gt;</code>';
***************
*** 299,302 ****
--- 289,305 ----
                        echo $array;
                }
+       }
+ 
+       /* str_repeat (PHP 4 >= 4.0.0)
+        *   string str_repeat (string input, int multiplier)
+        * Returns input_str repeated multiplier times. multiplier has to be 
greater than 0.
+        */
+       function str_repeat($input,$multiplier)
+       {
+               for($i=0,$output='';$i<$multiplier;$i++)
+               {
+                       $output .= $input;
+               }
+               return $output;
        }
  ?>




reply via email to

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