fix #8131 - chinese translations
[Pman.Core] / DataObjects / Core_ip_access.php
index 86d3fce..f803de0 100644 (file)
@@ -35,7 +35,8 @@ class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject
                 empty($ff->Pman['XMPP']) ||
                 empty($ff->Pman['XMPP']['username']) ||
                 empty($ff->Pman['XMPP']['password']) ||
-                empty($ff->Pman['XMPP']['to'])
+                empty($ff->Pman['XMPP']['to']) ||
+                empty($ff->Pman['XMPP']['url'])
         ) {
             return;
         }
@@ -44,18 +45,13 @@ class Pman_Core_DataObjects_Core_ip_access extends DB_DataObject
             
         $conn = new Net_XMPP('talk.google.com', 5222, $ff->Pman['XMPP']['username'], $ff->Pman['XMPP']['password'], 'xmpphp', 'gmail.com', $printlog=false, $loglevel=Net_XMPP_Log::LEVEL_VERBOSE);
 
-        $url = "{$ff->baseURL}/Core/VerifyAccess/{$this->id}/{$this->authorized_key}";
-        
-        $message = <<<EOF
-            New IP Login Required\n
-            {$url}
-EOF;
+        $url = "{$ff->Pman['XMPP']['url']}/Core/VerifyAccess/{$this->id}/{$this->authorized_key}";
         
         try {
             $conn->connect();
             $conn->processUntil('session_start');
             $conn->presence();
-            $conn->message($ff->Pman['XMPP']['to'], $message);
+            $conn->message($ff->Pman['XMPP']['to'], "New IP Login Required\n{$url}");
             $conn->disconnect();
             
         } catch(XMPPHP_Exception $e) {
@@ -66,5 +62,4 @@ EOF;
         
     }
     
-    
 }