[evolvis-commits] r17579: whitespace
mirabilos at evolvis.org
mirabilos at evolvis.org
Wed Oct 5 11:50:17 CEST 2011
Author: mirabilos
Date: 2011-10-05 11:50:17 +0200 (Wed, 05 Oct 2011)
New Revision: 17579
Modified:
trunk/gforge_base/evolvisforge/gforge/common/include/utils.php
Log:
whitespace
Modified: trunk/gforge_base/evolvisforge/gforge/common/include/utils.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/include/utils.php 2011-10-05 09:49:23 UTC (rev 17578)
+++ trunk/gforge_base/evolvisforge/gforge/common/include/utils.php 2011-10-05 09:50:17 UTC (rev 17579)
@@ -13,7 +13,7 @@
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation; either version 2 of the License,
* or (at your option) any later version.
- *
+ *
* FusionForge is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@@ -26,11 +26,11 @@
*/
/**
- * removeCRLF() - remove any Carriage Return-Line Feed from a string.
+ * removeCRLF() - remove any Carriage Return-Line Feed from a string.
* That function is useful to remove the possibility of a CRLF Injection when sending mail
* All the data that we will send should be passed through that function
*
- * @param string The string that we want to empty from any CRLF
+ * @param string The string that we want to empty from any CRLF
*/
function util_remove_CRLF($str) {
return strtr($str, "\015\012", ' ');
@@ -126,7 +126,7 @@
}
exec ("/bin/echo ". util_prep_string_for_sendmail($body2) .
- " | ".$sys_sendmail_path." -f'$from' -t -i > /dev/null 2>&1 &");
+ " | ".$sys_sendmail_path." -f'$from' -t -i > /dev/null 2>&1 &");
// WARNING : popen commented code probably brought some trouble, we will use the pipe method as we were before
/*if (!$handle = popen($sys_sendmail_path." -f'$from' -t -i", "w")) {
echo "<p>Error: cannot run '$sys_sendmail_path' - mail not sent</p>\n";
@@ -151,7 +151,7 @@
$name,$charset,"UTF-8")).
"?=";
}
-
+
return $name." <".$email."> ";
}
@@ -197,7 +197,7 @@
if (!function_exists('mb_convert_encoding') || $charset == 'UTF-8') {
return $str;
}
-
+
return mb_convert_encoding($str,$charset,"UTF-8");
}
@@ -393,7 +393,7 @@
if ($code <= 0x7F ||
$code >= 0xC0) {
//Here is single byte character
- //or head of multi byte character
+ //or head of multi byte character
return $wrap;
}
//Do not break multi byte character
@@ -453,8 +453,8 @@
*
*/
function util_make_links ($data='') {
- if(empty($data)) {
- return $data;
+ if(empty($data)) {
+ return $data;
}
$lines = split("\n",$data);
$newText = "";
@@ -693,14 +693,14 @@
$headersCellData[] = array($fieldName);
}
}
-
+
/* Create the title */
if(strlen($title) > 0) {
$titleCellData = array();
$titleCellData[] = array($title, 'colspan="'.count($headersCellData).'"');
echo $HTML->multiTableRow('', $titleCellData, TRUE);
}
-
+
/* Display the headers */
if($displayHeaders) {
echo $HTML->multiTableRow('', $headersCellData, TRUE);
@@ -761,10 +761,10 @@
*/
function validate_emails ($addresses, $separator=',') {
if (strlen($addresses) == 0) return array();
-
+
$emails = explode($separator, $addresses);
$ret = array();
-
+
if (is_array($emails)) {
foreach ($emails as $email) {
$email = trim($email); // This is done so we can validate lists like "a at b.com, c at d.com"
@@ -840,7 +840,7 @@
* @version 1.0
* @param int bytes is the size
* @param bool base10 enable base 10 representation, otherwise
- * default base 2 is used
+ * default base 2 is used
* @param int round number of fractional digits
* @param array labels strings associated to each 2^10 or
* 10^3(base10==true) multiple of base units
@@ -903,12 +903,12 @@
$chunksize = 1*(1024*1024); // 1MB chunks
$buffer = '';
$byteCounter = 0;
-
+
$handle = fopen($filename, 'rb');
if ($handle === false) {
return false;
}
-
+
while (!feof($handle)) {
$buffer = fread($handle, $chunksize);
echo $buffer;
@@ -935,7 +935,7 @@
}
function util_url_prefix() {
- if ($GLOBALS['sys_use_ssl'])
+ if ($GLOBALS['sys_use_ssl'])
return "https://";
else
return "http://";
@@ -999,7 +999,7 @@
!isset ($result[$k]) || !is_array ($result[$k])) {
$result[$k] = $v ;
}
-
+
$result[$k] = array_replace_recursive ($result[$k],
$v) ;
}
@@ -1324,11 +1324,11 @@
}
function removeEmptyArrayIndexes($arr) {
- for ($i=0 ; $i<=count($arr);$i++) {
- if ($arr[$i]=="" || $arr[$i] == null) {
- unset($arr[$i]); //eleminate empty indexes
- }
- }
+ for ($i = 0; $i <= count($arr); $i++) {
+ if ($arr[$i] == "" || $arr[$i] == null) {
+ unset($arr[$i]); //eleminate empty indexes
+ }
+ }
return $arr;
}
More information about the evolvis-commits
mailing list