Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 124-127 (lines=4) @@
121
	 */
122
	protected function exec($check_only=false)
123
	{
124
		if (!empty($this->domain) && !preg_match('/^([a-z0-9_-]+\.)*[a-z0-9]+/i',$this->domain))
125
		{
126
			throw new Api\Exception\WrongUserinput(lang("'%1' is no valid domain name!",$this->domain));
127
		}
128
		if ($this->remote_id && $check_only && !in_array($this->sub_command, array('set_mailbox', 'sid2uidnumber', 'copy2ad')))
129
		{
130
			return true;	// further checks can only done locally

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

@@ 94-97 (lines=4) @@
91
	 */
92
	protected function exec($check_only=false)
93
	{
94
		if (!empty($this->domain) && !preg_match('/^([a-z0-9_-]+\.)*[a-z0-9]+/i',$this->domain))
95
		{
96
			throw new Api\Exception\WrongUserinput(lang("'%1' is no valid domain name!",$this->domain));
97
		}
98
		if ($this->remote_id && $check_only) return true;	// further checks can only done locally
99
100
		$this->_merge_defaults();