]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
authorEvan Prodromou <evan@controlyourself.ca>
Fri, 21 Aug 2009 12:29:51 +0000 (08:29 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Fri, 21 Aug 2009 12:29:51 +0000 (08:29 -0400)
Conflicts:
actions/postnotice.php

1  2 
actions/postnotice.php

index 3d2c4d5b4227163f82b25afca2b3169daccd4440,97e887c4605459510eadef665ce96a37e0ce6f2b..14152a83d64d36387445e2fdf3cf348ca33a179a
@@@ -66,11 -82,16 +82,17 @@@ class PostnoticeAction extends Actio
      function checkNotice()
      {
          $content = common_shorten_links($_POST['omb_notice_content']);
 -        if (mb_strlen($content) > 140) {
 -            throw new Exception(_('The notice content is too long.'));
 +        if (Notice::contentTooLong($content)) {
 +            $this->clientError(_('Invalid notice content'), 400);
 +            return false;
          }
-         return true;
+         $license      = $_POST['omb_notice_license'];
+         $site_license = common_config('license', 'url');
+         if ($license && !common_compatible_license($license, $site_license)) {
+             throw new Exception(sprintf(_('Notice license ā€˜%sā€™ is not ' .
+                                           'compatible with site license ā€˜%sā€™.'),
+                                         $license, $site_license));
+         }
      }
  }
  ?>