1. 02 Oct, 2013 2 commits
  2. 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!
      b0dfc70a
  3. 30 Sep, 2013 1 commit
    • 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
      a23c4aa2
  4. 09 Sep, 2013 1 commit
    • 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.
      747fe9d5
  5. 18 Aug, 2013 1 commit
    • 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.
      2a4dc77a
  6. 25 Apr, 2011 1 commit
  7. 31 Jan, 2011 1 commit
  8. 10 Jun, 2010 1 commit
  9. 18 May, 2010 1 commit
  10. 30 Mar, 2010 2 commits
  11. 23 Mar, 2010 1 commit
  12. 11 Mar, 2010 1 commit
  13. 19 Nov, 2009 1 commit
  14. 08 Nov, 2009 2 commits
  15. 31 Oct, 2009 1 commit
  16. 01 Sep, 2009 1 commit
  17. 26 Aug, 2009 1 commit
  18. 25 Aug, 2009 3 commits
  19. 20 Jun, 2009 2 commits
  20. 12 Jun, 2009 1 commit
    • Sarven Capadisli's avatar
      Takes care of http://laconi.ca/trac/ticket/1372 and a minor part of · 4c61f98c
      Sarven Capadisli authored
      http://laconi.ca/trac/ticket/1367
      
      One of the bugs was to replace foaf:knows with the weaker
      sioc:follows. This is done, but foaf:knows is also retained when the
      subscription is bidirectional.
      
      Primary topic of the file is an Agent rather than a Person.
      
      rdfs:comment replaced by bio:olb which is a fairly popular RDF
      property for one-line biographies
      
      rdf:about attribute to the <OnlineAccount> elements in a manner
      consistent with the RSS 1.0 feed.
      
      Changed the OnlineAccount's homepage property to an accountProfilePage
      property. Will be added to FOAF spec soon (already widely used).
      
      Added a <weblog> property from the Agent to their profile page.
      
      Thanks to Toby Inkster for the patch.
      http://buzzword.org.uk/2009/laconica-0.7.3-foafsioc.patch
      4c61f98c
  21. 13 Apr, 2009 2 commits
    • Evan Prodromou's avatar
      isReadOnly() now takes arguments · 7f81597a
      Evan Prodromou authored
      Add an array of arguments to isReadOnly() method of actions, to let
      them change their results depending on what actions are called.
      Primarily used by the 'api' action. Ideally in the future that will be
      multiple actions. But this might still be useful.
      7f81597a
    • Evan Prodromou's avatar
      isReadOnly() now takes arguments · e9e75fc9
      Evan Prodromou authored
      Add an array of arguments to isReadOnly() method of actions, to let
      them change their results depending on what actions are called.
      Primarily used by the 'api' action. Ideally in the future that will be
      multiple actions. But this might still be useful.
      e9e75fc9
  22. 03 Apr, 2009 4 commits
  23. 22 Jan, 2009 1 commit
  24. 15 Jan, 2009 3 commits
  25. 23 Dec, 2008 4 commits
    • Evan Prodromou's avatar
      move opening brace of class declaration to next line · b264c03d
      Evan Prodromou authored
      Another gigantor PEAR coding standards patch. Here, I've moved the
      opening curly bracket on a class statement to the following line.
      
      darcs-hash:20081223194923-84dde-77a93de314caadbcb5b70bf346a4648be77a864e.gz
      b264c03d
    • Evan Prodromou's avatar
      TRUE · 7ad2f2a3
      Evan Prodromou authored
      More PEAR coding standards global changes. Here, I've changed all
      instances of TRUE to true and FALSE to false.
      
      darcs-hash:20081223194428-84dde-cb1a1e6f679acd68e864545c4d4dd8752d6a6257.gz
      7ad2f2a3
    • Evan Prodromou's avatar
      change function headers to K&R style · 04ef1ba8
      Evan Prodromou authored
      Another huge change, for PEAR code standards compliance. Function
      headers have to be in K&R style (opening brace on its own line),
      instead of having the opening brace on the same line as the function
      and parameters. So, a little perl magic found all the function
      definitions and move the opening brace to the next line (properly
      indented... usually).
      
      darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
      04ef1ba8
    • Evan Prodromou's avatar
      replace NULL with null · eb2f9c98
      Evan Prodromou authored
      Another global search-and-replace update. Here, I've replaced the PHP
      keyword 'NULL' with its lowercase version. This is another PEAR code
      standards change.
      
      darcs-hash:20081223192129-84dde-4a0182e0ec16a01ad88745ad3e08f7cb501aee0b.gz
      eb2f9c98