aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'php/lib/forms.php')
-rw-r--r--php/lib/forms.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/php/lib/forms.php b/php/lib/forms.php
index e435181..3ef2c5c 100644
--- a/php/lib/forms.php
+++ b/php/lib/forms.php
@@ -11,23 +11,23 @@
* @param bool $slashes default to false, this parameter indicate if stripslashes is desired, usually use for magic qoutes
* @return mixed $str cleaned for HTML
*/
-function clean_out($str, $slashes=FALSE)
-{
+function clean_out($str, $slashes=FALSE)
+{
if (is_array($str))
{
foreach ($str as $key => $val)
{
- $str[$key] =& clean_out($val, $slashes);
+ $str[$key] = clean_out($val, $slashes);
}
}
else
{
if ($slashes)
- $str =& trim(htmlentities(stripslashes($str)));
+ $str = trim(htmlentities(stripslashes($str)));
else
- $str =& trim(htmlentities($str));
+ $str = trim(htmlentities($str));
}
-
+
return $str;
}
@@ -44,18 +44,18 @@ function clean_in($str, $single_quotes=FALSE, $decode=FALSE)
{
foreach ($str as $key => $val)
{
- $str[$key] =& clean_in($val, $single_quotes);
+ $str[$key] = clean_in($val, $single_quotes);
}
}
else
{
if (get_magic_quotes_gpc() === 1)
{
- $str =& trim($str);
+ $str = trim($str);
}
- else
+ else
{
- $str =& addslashes(trim($str));
+ $str = addslashes(trim($str));
}
if ($single_quotes) {
$str = "'" . $str . "'";
@@ -77,9 +77,9 @@ function array_days($month='',$year='')
{
$days = Array();
$num = 1;
-
+
// get total number of days of a particular month if given a month and year
- if (!empty($month) && !empty($year) && is_numeric($month)
+ if (!empty($month) && !empty($year) && is_numeric($month)
&& is_numeric($year) && $month > 0 && $month < 13)
{
$days_inmonth = (int) date("t", strtotime($year."-".$month."-01"));