apps/federation/lib/DbHandler.php
/**
	 * check if server already exists in the database table
	 *
	 * @param string $url
	 * @return bool
	 */
check if server already exists in the database table
@param string $url
@return bool
check if server already exists in the database table @param string $url @return bool
public function serverExists($url) {
		$hash = $this->hash($url);
		$query = $this->connection->getQueryBuilder();
		$query->select('url')->from($this->dbTable)
			->where($query->expr()->eq('url_hash', $query->createParameter('url_hash')))
			->setParameter('url_hash', $hash);
		$result = $query->execute()->fetchAll();
		return !empty($result);
	}
public function serverExists ( $ url ) { $ hash = $ this -> hash ( $ url ) ; $ query = $ this -> connection -> getQueryBuilder ( ) ; $ query -> select ( 'url' ) -> from ( $ this -> dbTable ) -> where ( $ query -> expr ( ) -> eq ( 'url_hash' , $ query -> createParameter ( 'url_hash' ) ) ) -> setParameter ( 'url_hash' , $ hash ) ; $ result = $ query -> execute ( ) -> fetchAll ( ) ; return ! empty ( $ result ) ; }
check if server already exists in the database table
 @param string $url
 @return bool
check if server already exists in the database table @param string $url @return bool