Commit Graph

12 Commits

Author SHA1 Message Date
Mikael Nordfeldth 861e838add pkeyGet is now static and more similar to getKV
Memcached_DataObject now defines
   * pkeyGetClass to avoid collision with Managed_DataObject pkeyGet
   * getClassKV to avoid collision with Managed_DataObject getKV
2013-08-18 15:42:51 +02:00
Mikael Nordfeldth 2a4dc77a63 The overloaded DB_DataObject function staticGet is now called getKV
I used this hacky sed-command (run it from your GNU Social root, or change the first grep's path to where it actually lies) to do a rough fix on all ::staticGet calls and rename them to ::getKV

   sed -i -s -e '/DataObject::staticGet/I!s/::staticGet/::getKV/Ig' $(grep -R ::staticGet `pwd`/* | grep -v -e '^extlib' | grep -v DataObject:: |grep -v "function staticGet"|cut -d: -f1 |sort |uniq)

If you're applying this, remember to change the Managed_DataObject and Memcached_DataObject function definitions of staticGet to getKV!

This might of course take some getting used to, or modification fo StatusNet plugins, but the result is that all the static calls (to staticGet) are now properly made without breaking PHP Strict Standards. Standards are there to be followed (and they caused some very bad confusion when used with get_called_class)

Reasonably any plugin or code that tests for the definition of 'GNUSOCIAL' or similar will take this change into consideration.
2013-08-18 13:13:56 +02:00
Mikael Nordfeldth c36608b233 Some statically called functions in plugins now declared statically 2013-08-18 11:18:45 +02:00
Mikael Nordfeldth 6c4c4319ef Plugins with classes that extend Managed_DataObject get better code reuse
The switch to having a function in Managed_DataObject is now being applied
to plugins which can use this as well.

There are some plugins that still use Memcached_DataObject, but these will
be taken care of later.
2013-08-12 20:00:01 +02:00
Evan Prodromou c468b0d7f3 explicitly name URI attribute for Poll_response 2011-07-04 15:47:09 -04:00
Evan Prodromou 333876c6a9 don't force replies to empty set in Poll_response 2011-07-02 00:49:04 -04:00
Siebrand Mazeland 843ace580d i18n/L10n updates
Translator documentation added
2011-03-11 19:05:28 +01:00
Siebrand Mazeland 76bffe1a64 * Superfluous whitespace removed
* Small L10n updates
2011-03-11 18:31:22 +01:00
Brion Vibber eccadb4a7b cleanup... Poll main & response events seem to sorta work over ostatus now 2011-03-10 13:56:54 -08:00
Brion Vibber d6c8c61076 AS output/input for poll responses 2011-03-10 13:41:23 -08:00
Brion Vibber e085ef5ef5 Work on turning poll responses into activities so we can send them over ostatus bridge. Not yet bridging. 2011-03-10 12:38:25 -08:00
Brion Vibber 3438a78c02 Initial checkin of Poll plugin: micro-app to post mini polls/surveys from the notice form.
This version is fairly basic; votes do not (yet) show a reply, they just got in the table. No pretty graphs for the results yet, just text.
The ActivityStream output is temporary and probably should be replaced; the current structures for adding custom data aren't really ready yet (especially since we need to cover JSON and Atom formats, probably pretty differently)

Uses similar system as Bookmark for attaching to notices -- saves a custom URI for an alternate action, which we can then pass in and hook back up to our poll object. This can probably do with a little more simplification in the parent MicroAppPlugin class.

Currently adds two tables:
- poll holds the main poll info: id and URI to associate with the notice, then the question and a text blob with the options.
- poll_response records the selections picked by our nice fellows.

Hopefully no off-by-one bugs left in the selection, but I give no guarantees. ;)
Some todo notes in the README and in doc comments.
2011-03-07 21:28:36 -08:00