Merge branch '1.0.x' of gitorious.org:statusnet/mainline into 1.0.x
* '1.0.x' of gitorious.org:statusnet/mainline:
include protected flag for users in JSON or XML
Force group scope on notices sent to a private-only group
* qna:
QnA - Allow answer revisions and marking a question as "best"
QnA - add best class to best answers
QnA - Better display of questions and answers in streams
QnA - save answer revisions and show # of revisions
Add the root index.php to gettext .pot template file generation; some error messages and such in there weren't making it into the TranslateWiki.net database.
Fix several L10n and i18n issues.
Add dummy method MessageListItem::messageListItemDummyMessages() to allow xgettext to add possible sources to POT files.
Mark a few i18n issues as FIXME as well as some messages for which the use case was not clear to me.
Merged some code on multiple lines into one.
Translator documentation added.
Remove superfluous whiteapace.
* qna:
Some work towards allowing revisions
Make new answers work
More plumbing
Work on QnA notice display -- in progress
* Move stuff around again * Make answers save
* Fix plugin filename * Make questions save!
Renamed QuestionAndAnswerPlugin to QnAPlugin
Most objects and forms are in place, now I just have to make it work.
Skeleton / Stub for Question and Answers micro-app plugin
Brion Vibber [Wed, 30 Mar 2011 19:50:56 +0000 (12:50 -0700)]
Fix timestamps in fallback content for EventPlugin
A bunch of the common_* functions for date formatting expect an interpretable string, rather than a Unix timestamp, as input. Switched to using the DB-formatted timestamps as we put them into the object rather than the unix timestamp intermediate value when formatting the plaintext and HTML fallback content.
Brion Vibber [Wed, 30 Mar 2011 19:36:54 +0000 (12:36 -0700)]
Format timestamps as UTC in ActivityStreams output. While using local times is legit per spec, it's confusing to have it change around and confuses some clients that don't handle zones right.
Brion Vibber [Tue, 29 Mar 2011 23:58:15 +0000 (16:58 -0700)]
Consolidate common code in micro-apps custom notice type display actions.
The ShowNoticeAction subclasses were cut-n-pasting a lot of prepare() code from ShowNoticeAction, though the only part that's different is how we look up the notice. Broke that out to a getNotice() method, so only that needs to be copied. Avoids extra copies of permission checks and other common code in this spot.
Brion Vibber [Tue, 29 Mar 2011 23:20:12 +0000 (16:20 -0700)]
Consolidate some precondition checks for repeats, fix a couple bits in the repeat command.
Notice::saveNew() now does these checks directly when making a repeat:
* make sure the original is valid and existing
* stop you from repeating your own message
* stop you from repeating something you've previously repeated
* prevent repeats of any non-public messages
* explicit inScope() check to make sure you can read the original too (just in case there's a funky extension at play that changes scoping rules)
These error conditions throw exceptions, which the caller either uses as an error message or passes on up the stack, without having to duplicate the checks in each i/o channel.
@evan Fixed message domain for messages in plugins for recent commits.
Numbered parameters when more than one used in a message.
L10n updates for consistency.
i18n for non-translatable exception.
Updated translator documentation.
Removed superfluous whitespace.
Evan Prodromou [Tue, 29 Mar 2011 15:53:26 +0000 (11:53 -0400)]
Disallow repeats (retweets) of private notices
We disallow repeating a notice (or whatever) if the scope of the
notice is too private. So, only notices that are public scope
(available to everyone in the world) or site scope (available to
everyone on the site) can be repeated.
Enforce this rule at a low level in Notice.php, and in the API,
commands, and Web UI. Repeat button doesn't appear on tightly-scoped
notices in the Web UI.