Prechádzať zdrojové kódy

Avoid using 'gethostname()' which is not always available.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@1041 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 14 rokov pred
rodič
commit
1251a34ef5
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      core/action.class.inc.php

+ 1 - 1
core/action.class.inc.php

@@ -237,7 +237,7 @@ class ActionEmail extends ActionNotification
 			$sBody = MetaModel::ApplyParams($this->Get('body'), $aContextArgs);
 			
 			$oObj = $aContextArgs['this->object()'];
-			$sServerIP = gethostbyname(gethostname());
+			$sServerIP = $_SERVER['SERVER_ADDR']; //gethostbyname(gethostname());
 			$sReference = '<iTop/'.get_class($oObj).'/'.$oObj->GetKey().'@'.$sServerIP.'>';
 
 			$oEmail = new EMail();