Code Duplication    Length = 5-8 lines in 2 locations

setup/inc/class.setup_cmd_ldap.inc.php 1 location

@@ 689-696 (lines=8) @@
686
		if (!($type = $GLOBALS['egw_info']['server']['sql_encryption_type'])) $type = 'md5';
687
688
		$matches = null;
689
		if (preg_match('/^\\{(.*)\\}(.*)$/',$hash,$matches))
690
		{
691
			list(,$type,$hash) = $matches;
692
		}
693
		elseif (preg_match('/^[0-9a-f]{32}$/',$hash))
694
		{
695
			$type = 'md5';
696
		}
697
		switch(strtolower($type))
698
		{
699
			case 'plain':

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

@@ 321-325 (lines=5) @@
318
			$email = $id;
319
			$name = '';
320
			$matches = null;
321
			if (preg_match('/^(.*) *<([a-z0-9_.@-]{8,})>$/iU',$email,$matches))
322
			{
323
				$name = $matches[1];
324
				$email = $matches[2];
325
			}
326
			$data[] = array(
327
				'res_id' => $id,
328
				'email' => $email,