public static function createXDomain($domain)
	{
		$db = \App::get('db');

		if (empty($domain) || ($domain == 'hubzero'))
		{
			return false;
		}

		$query = 'SELECT domain_id FROM `#__xdomains` WHERE ' .
				 '#__xdomains.domain=' . $db->quote($domain);

		$db->setQuery($query);

		$result = $db->loadObject();

		if (empty($result))
		{
			$query = 'INSERT INTO `#__xdomains` (domain) VALUES (' . $db->quote($domain) . ')';

			$db->setQuery($query);

			$db->query();

			$domain_id = $db->insertid();
		}
		else
		{
			$domain_id = $result->domain_id;
		}

		return $domain_id;
	}
public static function createXDomain($domain)
	{
		$db = \App::get('db');

		if (empty($domain) || ($domain == 'hubzero'))
		{
			return false;
		}

		$query = 'SELECT domain_id FROM `#__xdomains` WHERE ' .
				 '#__xdomains.domain=' . $db->quote($domain);

		$db->setQuery($query);

		$result = $db->loadObject();

		if (empty($result))
		{
			$query = 'INSERT INTO `#__xdomains` (domain) VALUES (' . $db->quote($domain) . ')';

			$db->setQuery($query);

			$db->query();

			$domain_id = $db->insertid();
		}
		else
		{
			$domain_id = $result->domain_id;
		}

		return $domain_id;
	}
public static function createXDomain ( $ domain ) { $ db = \ App :: get ( 'db' ) ; if ( empty ( $ domain ) || ( $ domain == 'hubzero' ) ) { return false ; } $ query = 'SELECT domain_id FROM `#__xdomains` WHERE ' . '#__xdomains.domain=' . $ db -> quote ( $ domain ) ; $ db -> setQuery ( $ query ) ; $ result = $ db -> loadObject ( ) ; if ( empty ( $ result ) ) { $ query = 'INSERT INTO `#__xdomains` (domain) VALUES (' . $ db -> quote ( $ domain ) . ')' ; $ db -> setQuery ( $ query ) ; $ db -> query ( ) ; $ domain_id = $ db -> insertid ( ) ; } else { $ domain_id = $ result -> domain_id ; } return $ domain_id ; }
Creeate a domain record

@param   string   $domain
@return  boolean
Creeate a domain record