From: Evan Prodromou Date: Fri, 21 Aug 2009 12:29:51 +0000 (-0400) Subject: Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c78772b2748f70acc8158b665218fe53b277a031;p=quix0rs-gnu-social.git Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x Conflicts: actions/postnotice.php --- c78772b2748f70acc8158b665218fe53b277a031 diff --cc actions/postnotice.php index 3d2c4d5b42,97e887c460..14152a83d6 --- a/actions/postnotice.php +++ b/actions/postnotice.php @@@ -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)); + } } } ?>