Code Duplication    Length = 4-5 lines in 2 locations

phpgwapi/inc/class.egw_json.inc.php 1 location

@@ 682-686 (lines=5) @@
679
{
680
	public function __call($name, $args)
681
	{
682
		if (substr($name, 0, 3) == 'add')
683
		{
684
			$name = substr($name, 3);
685
			$name[0] = strtolower($name[0]);
686
		}
687
		return call_user_func_array(array(egw_json_response::get(), $name), $args);
688
	}
689

calendar/inc/class.calendar_ical.inc.php 1 location

@@ 2780-2783 (lines=4) @@
2777
					break;
2778
				case 'ORGANIZER':
2779
					$event['organizer'] = $attributes['value'];	// no egw field, but needed in AS
2780
					if (strtolower(substr($event['organizer'],0,7)) == 'mailto:')
2781
					{
2782
						$event['organizer'] = substr($event['organizer'],7);
2783
					}
2784
					if (!empty($attributes['params']['CN']))
2785
					{
2786
						$event['organizer'] = $attributes['params']['CN'].' <'.$event['organizer'].'>';