1. 28 Oct, 2013 2 commits
  2. 17 Oct, 2013 1 commit
  3. 15 Oct, 2013 2 commits
  4. 08 Oct, 2013 2 commits
  5. 07 Oct, 2013 1 commit
  6. 06 Oct, 2013 4 commits
  7. 02 Oct, 2013 1 commit
  8. 01 Oct, 2013 1 commit
    • mmn's avatar
      Properly unlink all old avatars when deleting/uploading a new · b0dfc70a
      mmn authored
      We're also now using $config['image']['jpegquality'] to determine the
      quality setting for resized images.
      To set Avatar max size, adjust $config['avatar']['maxsize']
      The getAvatar call now throws exceptions too. Related changes applied.
      Now let's move Profile->avatarUrl to the Avatar class!
  9. 30 Sep, 2013 3 commits
    • mmn's avatar
      Fixed regression in latest Avatar fixes · cced063e
      mmn authored
      I thought typing would fix it, but there's a problem earlier in the
      execution chain which will be fixed in the future.
    • mmn's avatar
      Avatar resizing improvements and better code reuse · a23c4aa2
      mmn authored
      * getOriginal added to Avatar class
          This is a static function that retrieves the original avatar in a leaner
          way than Profile->getOriginalAvatar() did (see below).
          This will throw an Exception if there was none to be found.
      * getProfileAvatars added to Avatar class
          This gets all Avatars from a profile and returns them in an array.
      * newSize added to Avatar class
          This will scale an original avatar or throw an Exception (originally from
          Avatar::getOriginal) if one wasn't found.
      * deleteFromProfile added to Avatar class
          Deletes all avatars for a Profile. This makes the code much smarter when
          removing all avatars from a user.
          Previously only specific, hardcoded (through constants) sizes would be
          deleted. If you ever changed lib/framework.php then many oddsized avatars
          would remain with the old method.
      * Migrated Profile class to new Avatar::getOriginal support
          Profile class now uses Avatar::getOriginal through its own
          $this->getOriginalAvatar and thus remains backwards compatible.
      * Updating stock GNU Social to use Avatar::getOriginal
          All places where core StatusNet code used the
          $profile->getOriginalAvatar, it will now useAvatar::getOriginal with
          proper error handling.
      * Updated Profile class to use Avatar::newSize
          When doing setOriginal, the scaling will be done with the new method
          introduced in this merge.
          This also edits the _fillAvatar function to avoid adding NULL values to
          the array (which causes errors when attempting to access array entries as
          objects). See issue #3478 at http://status.net/open-source/issues/3478
    • mmn's avatar
      Implemented WebFinger and replaced our XRD with PEAR XML_XRD · a0e107f1
      mmn authored
      New plugins:
      * LRDD
          LRDD implements client-side RFC6415 and RFC7033 resource descriptor
          discovery procedures. I.e. LRDD, host-meta and WebFinger stuff.
          OStatus and OpenID now depend on the LRDD plugin (XML_XRD).
      * WebFinger
          This plugin implements the server-side of RFC6415 and RFC7033. Note:
          WebFinger technically doesn't handle XRD, but we serve both that and
          JRD (JSON Resource Descriptor), depending on Accept header and one
          ugly hack to check for old StatusNet installations.
          WebFinger depends on LRDD.
      We might make this even prettier by using Net_WebFinger, but it is not
      currently RFC7033 compliant (no /.well-known/webfinger resource GETs).
      Disabling the WebFinger plugin would effectively render your site non-
      federated (which might be desired on a private site).
      Disabling the LRDD plugin would make your site unable to do modern web
      URI lookups (making life just a little bit harder).
  10. 21 Sep, 2013 1 commit
  11. 19 Sep, 2013 2 commits
  12. 16 Sep, 2013 1 commit
  13. 09 Sep, 2013 2 commits
    • mmn's avatar
      Declaring some more static functions properly · 99312c8c
      mmn authored
      As a bonus I added type declaration on Profile_block::exists and
      Subscription::exists respectively.
    • mmn's avatar
      Tidying up getUser calls to profiles and some events · 747fe9d5
      mmn authored
      getUser calls are much more strict, and one place where this was found was
      in the (un)subscribe start/end event handlers, which resulted in making the
      Subscription class a bit stricter, regarding ::start and ::cancel at least.
      Several minor fixes in many files were made due to this.
      This does NOT touch the Foreign_link function, which should also have a more
      strict getUser call. That is a future project.
  14. 29 Aug, 2013 2 commits
  15. 19 Aug, 2013 1 commit
    • mmn's avatar
      Don't use DB_DataObject::factory (statically at least) · 0785cc24
      mmn authored
      Not all instances of this has been fixed, but at least the ones
      in the base class of Memcached_DataObject.
      Avatar fix (in classes/Profile.php) requires a pkeyGet function
      in the Avatar class (or as in this tree, the parent class of
  16. 18 Aug, 2013 2 commits
    • mmn's avatar
      pkeyGet is now static and more similar to getKV · 861e838a
      mmn authored
      Memcached_DataObject now defines
         * pkeyGetClass to avoid collision with Managed_DataObject pkeyGet
         * getClassKV to avoid collision with Managed_DataObject getKV
    • mmn's avatar
      The overloaded DB_DataObject function staticGet is now called getKV · 2a4dc77a
      mmn authored
      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.
  17. 12 Aug, 2013 1 commit
    • mmn's avatar
      staticGet for sub-Managed_DataObject classes now calls parent · 1a9a8ea7
      mmn authored
      The parent class for our database objects, Managed_DataObject, has a
      dynamically assigned class in staticGet which objects get put into,
      leaving us with less code to do the same thing.
      We will probably have to move away from the DB_DataObject 'staticGet'
      call as it is nowadays deprecated.
  18. 16 Jul, 2013 1 commit
    • Joshua Wise's avatar
      Escape $tag passed to Profile::getTaggedSubscribers() · c5a710e0
      Joshua Wise authored
      This patch escapes the $tag parameter in
      Profile::getTaggedSubscribers(). The parameter is not escaped either
      in actions/subscriptions.php or in actions/apiuserfollowers.php. So
      there is a potential for SQL injection here.
  19. 04 Jul, 2012 2 commits
  20. 25 Mar, 2012 2 commits
  21. 22 Mar, 2012 2 commits
  22. 31 Dec, 2011 2 commits
  23. 30 Sep, 2011 2 commits