*
* @author Roland Haeder <webmaster@shipsimu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2014 Hub Developer Team
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Hub Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.shipsimu.org
*
/**
* If the found UNL (address) matches own external or internal address
*
+ * @param $unl UNL to test
* @return $ifMatches Whether the found UNL matches own addresss
*/
- public function isOwnAddress () {
- // Get current UNL (from universalNodeLocatorData array)
- $currentUnl = $this->getCurrentUniversalNodeLocator();
-
+ public function isOwnAddress ($unl) {
// Get own external UNL
$externalUnl = HubTools::determineOwnExternalAddress();
$internalUnl = HubTools::determineOwnInternalAddress();
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: currentUnl=' . $currentUnl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
- //* DIE-DEBUG: */ die(__METHOD__.':currentUnl=' . $currentUnl . ',this='.print_r($this, TRUE));
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ',externalUnl=' . $externalUnl . ',internalUnl=' . $internalUnl);
+ //* DIE-DEBUG: */ die(__METHOD__.':unl=' . $unl . ',this='.print_r($this, TRUE));
// Is it the same?
- $ifMatches = (($currentUnl === $externalUnl) || ($currentUnl === $internalUnl));
+ $ifMatches = (($unl === $externalUnl) || ($unl === $internalUnl));
// Debug message
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches));
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('[' . __METHOD__ . ':' . __LINE__ . ']: ifMatches=' . intval($ifMatches));
// Return result
return $ifMatches;