]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Correctly access length constants
authorLuke Fitzgerald <lw.fitzgerald@googlemail.com>
Wed, 16 Jun 2010 01:03:31 +0000 (02:03 +0100)
committerLuke Fitzgerald <lw.fitzgerald@googlemail.com>
Wed, 16 Jun 2010 01:03:31 +0000 (02:03 +0100)
plugins/Msn/extlib/phpmsnclass/msn.class.php

index 74a7e3eec1993d61bc522b93715c4c51e2757f20..967fa97874b48c9f7d0fdee845cde37670459e40 100644 (file)
@@ -42,6 +42,12 @@ class MSN {
     const DELMEMBER_URL = 'https://contacts.msn.com/abservice/SharingService.asmx';\r
     const DELMEMBER_SOAP = 'http://www.msn.com/webservices/AddressBook/DeleteMember';\r
     \r
+    // the message length (include header) is limited (maybe since WLM 8.5 released)\r
+    // for WLM: 1664 bytes\r
+    // for YIM: 518 bytes\r
+    const MAX_MSN_MESSAGE_LEN = 1664;\r
+    const MAX_YAHOO_MESSAGE_LEN = 518;\r
+    \r
     private $debug;\r
     private $timeout;\r
     \r
@@ -80,13 +86,6 @@ class MSN {
     private $font_co = '333333';\r
     private $font_ef = '';\r
 \r
-\r
-    // the message length (include header) is limited (maybe since WLM 8.5 released)\r
-    // for WLM: 1664 bytes\r
-    // for YIM: 518 bytes\r
-    const max_msn_message_len = 1664;\r
-    const max_yahoo_message_len = 518;\r
-\r
     // Begin added for StatusNet\r
 \r
     private $aContactList = array();\r
@@ -3013,9 +3012,9 @@ X-OIM-Sequence-Num: 1
         $msg_header = "MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\nX-MMS-IM-Format: FN=$this->font_fn; EF=$this->font_ef; CO=$this->font_co; CS=0; PF=22\r\n\r\n";\r
         $msg_header_len = strlen($msg_header);\r
         if ($network == 1)\r
-            $maxlen = $this->max_msn_message_len - $msg_header_len;\r
+            $maxlen = self::MAX_MSN_MESSAGE_LEN - $msg_header_len;\r
         else\r
-            $maxlen = $this->max_yahoo_message_len - $msg_header_len;\r
+            $maxlen = self::MAX_YAHOO_MESSAGE_LEN - $msg_header_len;\r
         $sMessage = str_replace("\r", '', $sMessage);\r
         $msg = substr($sMessage, 0, $maxlen);\r
         return $msg_header.$msg;\r