Changeset 3294 in subversion
- Timestamp:
- Feb 26, 2010 6:43:19 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/main.inc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/main.inc
r3263 r3294 597 597 function get_input_value($fname, $source, $allow_html=FALSE, $charset=NULL) 598 598 { 599 global $OUTPUT;600 599 $value = NULL; 601 600 … … 614 613 } 615 614 615 return parse_input_value($value, $allow_html, $charset); 616 } 617 618 /** 619 * Parse/validate input value. See get_input_value() 620 * Performs stripslashes() and charset conversion if necessary 621 * 622 * @param string Input value 623 * @param boolean Allow HTML tags in field value 624 * @param string Charset to convert into 625 * @return string Parsed value 626 */ 627 function parse_input_value($value, $allow_html=FALSE, $charset=NULL) 628 { 629 global $OUTPUT; 630 616 631 if (empty($value)) 617 632 return $value; 633 634 if (is_array($value)) { 635 foreach ($value as $idx => $val) 636 $value[$idx] = parse_input_value($val, $allow_html, $charset); 637 return $value; 638 } 618 639 619 640 // strip single quotes if magic_quotes_sybase is enabled … … 629 650 630 651 // convert to internal charset 631 if (is_object($OUTPUT) )652 if (is_object($OUTPUT) && $charset) 632 653 return rcube_charset_convert($value, $OUTPUT->get_charset(), $charset); 633 654 else
Note: See TracChangeset
for help on using the changeset viewer.
