phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc/common_functions.inc.php, 1.16.2.12


From: nomail
Subject: [Phpgroupware-cvs] phpgwapi/inc/common_functions.inc.php, 1.16.2.12
Date: Sat, 6 Nov 2004 16:34:26 +0100

Update of /phpgwapi/inc
Modified Files:
        Branch: Version-0_9_16-branch
          common_functions.inc.php

date: 2004/11/06 15:34:26;  author: powerstat;  state: Exp;  lines: +20 -20

Log Message:
Bugfixes HTML; makes it a bit more W3C conform;
see patch  #3503
=====================================================================
Index: phpgwapi/inc/common_functions.inc.php
diff -u phpgwapi/inc/common_functions.inc.php:1.16.2.11 
phpgwapi/inc/common_functions.inc.php:1.16.2.12
--- phpgwapi/inc/common_functions.inc.php:1.16.2.11     Sat Sep  4 05:53:37 2004
+++ phpgwapi/inc/common_functions.inc.php       Sat Nov  6 15:34:26 2004
@@ -33,9 +33,9 @@
                        $expected_args[2] = 
Array('name'=>'lname','default'=>'bob', 'type'=>'string');
                        $recieved_args = func_get_args();
                        $args = safe_args($expected_args, 
$recieved_args,__LINE__,__FILE__);
-                       echo 'Full name: '.$args['fname'].' '.$args['fname'].' 
'.$args['lname'].'<br>';
+                       echo 'Full name: '.$args['fname'].' '.$args['fname'].' 
'.$args['lname'].'<br />';
                        //default result would be:
-                       // Full name: joe hick bob<br>
+                       // Full name: joe hick bob<br />
                }
                
                Using this it is possible to use the function in any of the 
following ways
@@ -46,7 +46,7 @@
                
somefunc(array('lname'=>'brown','fname'=>'jack','mname'=>'city'));
                
                For the last one, when using named params in an array you dont 
have to follow any order
-               All three would result in - Full name: jack city brown<br>
+               All three would result in - Full name: jack city brown<br />
                
                When you use this method of handling params you can secure your 
functions as well offer
                flexibility needed for both normal use and web services use.
@@ -54,7 +54,7 @@
                Users of your functions can also use ##DEFAULT## to use your 
default value for a param 
                when using the standard format like this:
                somefunc('jack','##DEFAULT##','brown');
-               This would result in - Full name: jack hick brown<br>
+               This would result in - Full name: jack hick brown<br />
                Its using the default value for the second param.
                Of course if you have the second param as a required field it 
will fail to work.
        */
@@ -97,7 +97,7 @@
                                                }
                                                else
                                                {
-                                                       echo 'Fatal Error: 
Invalid paramater type for '.$expected[$i]['name'].' on line '.$line.' of 
'.$file.'<br>';
+                                                       echo 'Fatal Error: 
Invalid paramater type for '.$expected[$i]['name'].' on line '.$line.' of 
'.$file.'<br />';
                                                        exit;
                                                }
                                        }
@@ -121,7 +121,7 @@
                                                }
                                                else
                                                {
-                                                       echo 'Fatal Error: 
Invalid paramater type for '.$key.' on line '.$line.' of '.$file.'<br>';
+                                                       echo 'Fatal Error: 
Invalid paramater type for '.$key.' on line '.$line.' of '.$file.'<br />';
                                                        exit;
                                                }
                                        }
@@ -132,7 +132,7 @@
                {
                        while (list($key) = each($required))
                        {
-                               echo 'Fatal Error: Missing required paramater 
'.$key.' on line '.$line.' of '.$file.'<br>';
+                               echo 'Fatal Error: Missing required paramater 
'.$key.' on line '.$line.' of '.$file.'<br />';
                        }
                        exit;
                }
@@ -753,7 +753,7 @@
 
                if ($DEBUG)
                {
-                       echo'<br>Input values: '
+                       echo'<br />Input values: '
                                . 'A="'.$a.'", B="'.$b.'"';
                }
                $newa = ereg_replace('pre','.',$a);
@@ -780,7 +780,7 @@
 
                for ($i=0;$i<count($testa);$i++)
                {
-                       if ($DEBUG) { echo'<br>Checking if '. 
intval($testa[$i]) . ' is less than ' . intval($testb[$i]) . ' ...'; }
+                       if ($DEBUG) { echo'<br />Checking if '. 
intval($testa[$i]) . ' is less than ' . intval($testb[$i]) . ' ...'; }
                        if (intval($testa[$i]) < intval($testb[$i]))
                        {
                                if ($DEBUG) { echo ' yes.'; }
@@ -811,20 +811,20 @@
                                $less = 0;
                        }
                }
-               if ($DEBUG) { echo '<br>Check value is: "'.$less.'"'; }
+               if ($DEBUG) { echo '<br />Check value is: "'.$less.'"'; }
                if ($less>0)
                {
-                       if ($DEBUG) { echo '<br>A is less than B'; }
+                       if ($DEBUG) { echo '<br />A is less than B'; }
                        return True;
                }
                elseif($less<0)
                {
-                       if ($DEBUG) { echo '<br>A is greater than B'; }
+                       if ($DEBUG) { echo '<br />A is greater than B'; }
                        return False;
                }
                else
                {
-                       if ($DEBUG) { echo '<br>A is equal to B'; }
+                       if ($DEBUG) { echo '<br />A is equal to B'; }
                        return False;
                }
        }
@@ -842,7 +842,7 @@
 
                if ($DEBUG)
                {
-                       echo'<br>Input values: '
+                       echo'<br />Input values: '
                                . 'A="'.$a.'", B="'.$b.'"';
                }
                $newa = ereg_replace('pre','.',$a);
@@ -861,7 +861,7 @@
 
                for ($i=0;$i<count($testa);$i++)
                {
-                       if ($DEBUG) { echo'<br>Checking if '. 
intval($testa[$i]) . ' is more than ' . intval($testb[$i]) . ' ...'; }
+                       if ($DEBUG) { echo'<br />Checking if '. 
intval($testa[$i]) . ' is more than ' . intval($testb[$i]) . ' ...'; }
                        if (intval($testa[$i]) > intval($testb[$i]))
                        {
                                if ($DEBUG) { echo ' yes.'; }
@@ -892,20 +892,20 @@
                                $less = 0;
                        }
                }
-               if ($DEBUG) { echo '<br>Check value is: "'.$less.'"'; }
+               if ($DEBUG) { echo '<br />Check value is: "'.$less.'"'; }
                if ($less>0)
                {
-                       if ($DEBUG) { echo '<br>A is greater than B'; }
+                       if ($DEBUG) { echo '<br />A is greater than B'; }
                        return True;
                }
                elseif($less<0)
                {
-                       if ($DEBUG) { echo '<br>A is less than B'; }
+                       if ($DEBUG) { echo '<br />A is less than B'; }
                        return False;
                }
                else
                {
-                       if ($DEBUG) { echo '<br>A is equal to B'; }
+                       if ($DEBUG) { echo '<br />A is equal to B'; }
                        return False;
                }
        }




reply via email to

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