]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '1.0.x' into testing
authorEvan Prodromou <evan@status.net>
Tue, 31 May 2011 21:16:45 +0000 (17:16 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 31 May 2011 21:16:45 +0000 (17:16 -0400)
lib/mail.php
lib/noticelistitem.php
plugins/MobileProfile/MobileProfilePlugin.php
plugins/Msn/extlib/phpmsnclass/msn.class.php
theme/base/css/display.css
theme/base/css/ie.css
theme/base/images/icons/arrow_right.png [new file with mode: 0644]
theme/neo/css/mp-screen.css

index eaef2285b59d6bdb5fd52e2c7b63d9bbbd825eb1..6c6450ab50b49001015cb22bae83754731bac4a4 100644 (file)
@@ -240,14 +240,13 @@ function mail_subscribe_notify_profile($listenee, $other)
         $headers['To']      = $name . ' <' . $listenee->email . '>';
         // TRANS: Subject of new-subscriber notification e-mail.
         // TRANS: %1$s is the subscribing user's nickname, %2$s is the StatusNet sitename.
-        $headers['Subject'] = sprintf(_('%1$s is now listening to '.
-                                        'your notices on %2$s.'),
+        $headers['Subject'] = sprintf(_('%1$s is now following you on %2$s.'),
                                       $other->getBestName(),
                                       common_config('site', 'name'));
 
         // TRANS: Main body of new-subscriber notification e-mail.
         // TRANS: %1$s is the subscriber's long name, %2$s is the StatusNet sitename.
-        $body = sprintf(_('%1$s is now listening to your notices on %2$s.'),
+        $body = sprintf(_('%1$s is now following you on %2$s.'),
                         $long_name,
                         common_config('site', 'name')) .
                 mail_profile_block($other) .
index 2d41e53017318acf9ba3565cd3e0cdd0f7ece6bc..b56cd28092a36eb23771d30466dfb7607b2498fc 100644 (file)
@@ -229,31 +229,44 @@ class NoticeListItem extends Widget
 
     function showAddressees()
     {
-        $this->out->elementStart('span', 'addressees');
-
-        $cnt = $this->showGroupAddressees(true);
-        $cnt = $this->showProfileAddressees($cnt == 0);
-
-        $this->out->elementEnd('span', 'addressees');
+        $ga = $this->getGroupAddressees();
+        $pa = $this->getProfileAddressees();
+
+        $a = array_merge($ga, $pa);
+
+        if (!empty($a)) {
+            $this->out->elementStart('span', 'addressees');
+            $first = true;
+            foreach ($a as $addr) {
+                if (!$first) {
+                    // TRANS: Separator in profile addressees list.
+                    $this->out->text(_m('SEPARATOR',', '));
+                } else {
+                    // TRANS: Start of profile addressees list.
+                    $first = false;
+                }
+                $text = $addr['text'];
+                unset($addr['text']);
+                $this->out->element('a', $addr, $text);
+            }
+            $this->out->elementEnd('span', 'addressees');
+        }
     }
 
-    function showGroupAddressees($first)
+    function getGroupAddressees()
     {
+        $ga = array();
+
         $groups = $this->getGroups();
 
         foreach ($groups as $group) {
-            if (!$first) {
-                $this->out->text( _m('SEPARATOR',', '));
-            } else {
-                $first = false;
-            }
-            $this->out->element('a', array('href' => $group->homeUrl(),
-                                           'title' => $group->nickname,
-                                           'class' => 'addressee group'),
-                                $group->getBestName());
+            $ga[] = array('href' => $group->homeUrl(),
+                          'title' => $group->nickname,
+                          'class' => 'addressee group',
+                          'text' => $group->getBestName());
         }
 
-        return count($groups);
+        return $ga;
     }
 
     function getGroups()
@@ -261,25 +274,20 @@ class NoticeListItem extends Widget
         return $this->notice->getGroups();
     }
 
-    function showProfileAddressees($first)
+    function getProfileAddressees()
     {
+        $pa = array();
+
         $replies = $this->getReplyProfiles();
 
         foreach ($replies as $reply) {
-            if (!$first) {
-                // TRANS: Separator in profile addressees list.
-                $this->out->text(_m('SEPARATOR',', '));
-            } else {
-                // TRANS: Start of profile addressees list.
-                $first = false;
-            }
-            $this->out->element('a', array('href' => $reply->profileurl,
-                                           'title' => $reply->nickname,
-                                           'class' => 'addressee account'),
-                                $reply->getBestName());
+            $pa[] = array('href' => $reply->profileurl,
+                          'title' => $reply->nickname,
+                          'class' => 'addressee account',
+                          'text' => $reply->getBestName());
         }
 
-        return count($replies);
+        return $pa;
     }
 
     function getReplyProfiles()
index 196a262095baa7034ed096da6b7441d52f313909..e149573e88dc65fbde74770761d4ce02377d41ae 100644 (file)
@@ -49,6 +49,7 @@ class MobileProfilePlugin extends WAP20Plugin
 {
     public $DTD            = null;
     public $serveMobile    = false;
+    public $reallyMobile   = false;
     public $mobileFeatures = array();
 
     function __construct($DTD='http://www.wapforum.org/DTD/xhtml-mobile10.dtd')
@@ -160,6 +161,7 @@ class MobileProfilePlugin extends WAP20Plugin
                         $this->setMobileFeatures($httpuseragent);
 
                         $this->serveMobile = true;
+                        $this->reallyMobile = true;
                         break;
                     }
                 }
@@ -201,21 +203,28 @@ class MobileProfilePlugin extends WAP20Plugin
 
         header('Content-Type: '.$type);
 
-        $action->extraHeaders();
-        if (preg_match("/.*\/.*xml/", $type)) {
-            // Required for XML documents
-            $action->xw->startDocument('1.0', 'UTF-8');
-        }
-        $action->xw->writeDTD('html',
-                        '-//WAPFORUM//DTD XHTML Mobile 1.0//EN',
-                        $this->DTD);
+        if ($this->reallyMobile) {
+
+           $action->extraHeaders();
+           if (preg_match("/.*\/.*xml/", $type)) {
+               // Required for XML documents
+               $action->xw->startDocument('1.0', 'UTF-8');
+           }
+           $action->xw->writeDTD('html',
+                           '-//WAPFORUM//DTD XHTML Mobile 1.0//EN',
+                           $this->DTD);
 
-        $language = $action->getLanguage();
+            $language = $action->getLanguage();
 
-        $action->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml',
+            $action->elementStart('html', array('xmlns' => 'http://www.w3.org/1999/xhtml',
                                             'xml:lang' => $language));
 
-        return false;
+            return false;
+
+        } else {
+        return true;
+        }
+
     }
 
     function setMobileFeatures($useragent)
index 3d10c25b2c2ce5cba68bc1fe8d4b70da0f67a7be..5675eb5c2fcb4bc26ba1bc4977039f98d7fa2851 100644 (file)
@@ -2973,7 +2973,7 @@ X-OIM-Sequence-Num: 1
         // <wsse:BinarySecurityToken Id="Compact1">t=tick&p=</wsse:BinarySecurityToken>\r
         // <wst:BinarySecret>binary secret</wst:BinarySecret>\r
         // RST2: messenger.msn.com\r
-        // <wsse:BinarySecurityToken Id="PPToken2">t=tick</wsse:BinarySecurityToken>\r
+        // <wsse:BinarySecurityToken Id="Compact2">t=tick</wsse:BinarySecurityToken>\r
         // RST3: contacts.msn.com\r
         // <wsse:BinarySecurityToken Id="Compact3">t=tick&p=</wsse:BinarySecurityToken>\r
         // RST4: messengersecure.live.com\r
@@ -2985,7 +2985,7 @@ X-OIM-Sequence-Num: 1
         preg_match("#".\r
             "<wsse\:BinarySecurityToken Id=\"Compact1\">(.*)</wsse\:BinarySecurityToken>(.*)".\r
             "<wst\:BinarySecret>(.*)</wst\:BinarySecret>(.*)".\r
-            "<wsse\:BinarySecurityToken Id=\"PPToken2\">(.*)</wsse\:BinarySecurityToken>(.*)".\r
+            "<wsse\:BinarySecurityToken Id=\"Compact2\">(.*)</wsse\:BinarySecurityToken>(.*)".\r
             "<wsse\:BinarySecurityToken Id=\"Compact3\">(.*)</wsse\:BinarySecurityToken>(.*)".\r
             "<wsse\:BinarySecurityToken Id=\"Compact4\">(.*)</wsse\:BinarySecurityToken>(.*)".\r
             "<wsse\:BinarySecurityToken Id=\"Compact5\">(.*)</wsse\:BinarySecurityToken>(.*)".\r
index 6ae14d2c7dfec13c2b67f61f1439006082c49eee..40656b7cf959ce642e9aa7e9ce30e851d36d76ea 100644 (file)
@@ -418,10 +418,6 @@ address .poweredby {
     content: '\25B8';
 }
 
-.notice .addressees:empty:before {
-    content: none;
-}
-
 .fn {
     overflow: hidden;
 }
index a1144b489b7bdd3de0f40412392f281d82d41e5f..c6ddbac654403419fc9fc6463443a795dcf7d4cf 100644 (file)
@@ -99,12 +99,21 @@ line-height:auto;
     filter: alpha(opacity=0);
 }
 
+.notice .addressees:before {
+    content: '\003E';
+}
+
 /* IE7 */ 
 
 *+html .input_forms {
     margin-bottom: -20px;
 }
 
+*+html .notice .addressees {
+    background: url(../images/icons/arrow_right.png) no-repeat top left;
+    padding-left: 16px;
+}
+
 /* IE6 */
 
 #content {
diff --git a/theme/base/images/icons/arrow_right.png b/theme/base/images/icons/arrow_right.png
new file mode 100644 (file)
index 0000000..cefa7c2
Binary files /dev/null and b/theme/base/images/icons/arrow_right.png differ
index 0dabae74cd675a44141623a42a101bc1fb64241e..578736810e419998d0fc136d2dae850889fcbee8 100644 (file)
@@ -427,10 +427,6 @@ margin-left:0 !important;
     content: '\003E';
 }
 
-.notice .addressees:empty {
-    display: none;
-}
-
 .user_in .notice div.entry-content {
   max-width: 150px;
 }