Commit Graph

16 Commits

Author SHA1 Message Date
Chimo dc5dd69f2e Add default icon to OAuth apps
When MySQL runs in strict mode, it doesn't seem possible to add a new OAuth app.

This is because:
 * The 'icon' field has no defaults and also has NOT NULL constraint.
 * GS uploads/sets the icon[1] (if provided) after the SQL insert[2]

The easiest fix seemed to be to provide a default icon value.
This change sets the default to the  "blue peg" default avatar from the base theme.

[1]
7f30e61402/actions/newapplication.php (L176)

[2]
7f30e61402/actions/newapplication.php (L186)
2015-09-05 17:02:17 -04:00
Mikael Nordfeldth 2a32af084f ImageFile $id argument is only for File objects
Remember to eliminate the Avatar/group logo call to ImageFile->resize!
2015-03-11 00:20:48 +01:00
Mikael Nordfeldth 2f86cd8602 utf8mb4 conversion on database with index adjusts 2015-02-12 18:18:55 +01:00
Mikael Nordfeldth 2dfa0bfcee function delete in dataobjects now don't break strict syntax 2013-10-29 10:20:57 +01: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 1a9a8ea730 staticGet for sub-Managed_DataObject classes now calls parent
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.
2013-08-12 19:46:44 +02:00
Evan Prodromou 9ca3c3d1c3 move core schema to class files 2011-08-22 17:52:02 -04:00
Brion Vibber 1cd60579f5 Ticket #2811 use more consistent max limit for OAuth application registration descriptions; now using the field max of 255 rather than $config['site']['textlimit'] as fallback if $config['application']['desclimit'] is unset or out of bounds. 2010-10-11 12:52:32 -07:00
Siebrand Mazeland b03ece26eb * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:21:09 +02:00
Zach Copley 38bebb4c0d Allow developers to delete OAuth applications 2010-02-02 06:26:03 +00:00
Zach Copley 0d7490470d Can now edit/change application icon 2010-01-14 02:41:08 +00:00
Zach Copley d8abad7478 Exchanging authorized request tokens for access tokens working 2010-01-14 02:41:06 +00:00
Zach Copley b14a97f5f9 Add icons/icon upload to Oauth apps 2010-01-14 02:41:05 +00:00
Zach Copley dad67b030f Workflow for registering new OAuth apps pretty much done. 2010-01-14 02:41:04 +00:00
Zach Copley 6e64ce3777 Changed the OAuth app tables to refer to profiles instead of users.
Added an owner column to oauth_application.
2010-01-14 02:41:04 +00:00
Zach Copley 14bcac31b8 Add new OAuth application tables and DataObjects. Also add a new
column for consumer secret to consumer table.
2010-01-14 02:41:04 +00:00