]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/facebookaction.php
Merge branch '0.8.x' into 0.9.x
[quix0rs-gnu-social.git] / lib / facebookaction.php
index ca67a094af0442821f5c74034199393ea70ba600..b86276a0aba0c47ad8e1c136dd48f05e32784fd1 100644 (file)
@@ -35,7 +35,6 @@ if (!defined('STATUSNET') && !defined('LACONICA'))
 require_once INSTALLDIR.'/lib/facebookutil.php';
 require_once INSTALLDIR.'/lib/noticeform.php';
 
-
 class FacebookAction extends Action
 {
 
@@ -180,7 +179,6 @@ class FacebookAction extends Action
 
     }
 
-
     // Make this into a widget later
     function showLocalNav()
     {
@@ -240,7 +238,6 @@ class FacebookAction extends Action
         $this->endHTML();
     }
 
-
     function showInstructions()
     {
 
@@ -256,13 +253,8 @@ class FacebookAction extends Action
         $this->elementStart('dd');
         $this->elementStart('p');
         $this->text(sprintf($loginmsg_part1, common_config('site', 'name')));
-        if (!common_config('site', 'openidonly')) {
-            $this->element('a',
-                array('href' => common_local_url('register')), _('Register'));
-        } else {
-            $this->element('a',
-                array('href' => common_local_url('openidlogin')), _('Register'));
-        }
+        $this->element('a',
+            array('href' => common_local_url('register')), _('Register'));
         $this->text($loginmsg_part2);
     $this->elementEnd('p');
         $this->elementEnd('dd');
@@ -271,7 +263,6 @@ class FacebookAction extends Action
         $this->elementEnd('div');
     }
 
-
     function showLoginForm($msg = null)
     {
 
@@ -316,7 +307,6 @@ class FacebookAction extends Action
 
     }
 
-
     function updateProfileBox($notice)
     {
 
@@ -398,7 +388,6 @@ class FacebookAction extends Action
         $this->xw->openURI('php://output');
     }
 
-
     /**
      * Generate pagination links
      *
@@ -457,8 +446,9 @@ class FacebookAction extends Action
         } else {
             $content_shortened = common_shorten_links($content);
 
-            if (mb_strlen($content_shortened) > 140) {
-                $this->showPage(_('That\'s too long. Max notice size is 140 chars.'));
+            if (Notice::contentTooLong($content_shortened)) {
+                $this->showPage(sprintf(_('That\'s too long. Max notice size is %d chars.'),
+                                        Notice::maxContent()));
                 return;
             }
         }