Commit Graph

28 Commits

Author SHA1 Message Date
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
Mikael Nordfeldth bd60ab2e05 fix typo on provider_url 2013-08-12 13:01:47 +02:00
Evan Prodromou feb9030fb9 Remove sequenceKey() since we now use Managed_DataObject 2011-08-22 18:05:37 -04:00
Evan Prodromou 9ca3c3d1c3 move core schema to class files 2011-08-22 17:52:02 -04:00
Brion Vibber 4f323efdf7 Encapsulate the oEmbed -> oohembed fallback into oEmbedHelper class. Also added a chance to whitelist sites that don't show discovery info but do have oEmbed API endpoints, and to provide alternate APIs for some common services.
Newly supported:
- TwitPic: added a local function using TwitPic's API, since the oohembed implementation for TwitPic produced invalid output which Services_oEmbed rejects. (bug filed upstream)

Tweaked...
- Flickr: works, now using whitelist to use their endpoint directly instead of going through oohembed
- Youtube: worked around a bug in Services_oEmbed which broke the direct use of API discovery info, so we don't have to use oohembed.

Not currently working...
- YFrog: whitelisting their endpoint directly as the oohembed output is broken, but this doesn't appear to work currently as I think things are confused by YFrog's servers giving a '204 No Content' response on our HEAD checks on the original link.
2010-11-12 17:41:35 -08:00
Brion Vibber 2c4313467f Save oEmbed photo references as thumbnails if there's not a separate thumbnail_url entry in the return data. This fixes thumb saving for Flickr photo references. 2010-11-12 14:03:08 -08:00
Brion Vibber 694448e0aa Add attachments 'thumb_width' and 'thumb_height' settings for inline thumbs, defaulting to 100x75.
This is used as the max thumb width/height for oEmbed requests (replacing the old default of 500x400 which was more suitable for the lightbox).
2010-11-08 17:36:02 -08:00
Siebrand Mazeland b03ece26eb * i18n/L10n and translator documentation updates.
* whitespace and indentation updates
2010-09-28 23:21:09 +02:00
Brion Vibber 294b290dd9 Fixup script for files w/ bogus data saved into file record ('h bug') 2010-03-10 15:13:16 -08:00
Brion Vibber f02cb7c718 Fix for attachment "h bug": posting a shortened link to an oembed-able resource that has been previously used in the system would incorrectly save "h" as the item's type and title. 2010-03-10 15:13:16 -08:00
Evan Prodromou 2e42d3336a check before saving a thumbnail 2010-01-10 13:25:16 -08:00
Evan Prodromou a08c76a434 Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
Conflicts:
	classes/laconica.ini
2009-08-27 14:52:32 -07:00
Craig Andrews d9e8dabaf4 Save the mimetype for oEmbed linked url 2009-08-26 14:53:52 -04:00
Evan Prodromou df86aa7214 define LACONICA and accept LACONICA for backwards compatibility 2009-08-26 10:41:36 -04:00
Evan Prodromou 865b716f09 change LACONICA to STATUSNET 2009-08-25 18:42:34 -04:00
Evan Prodromou 4737563b95 a distributed -> the distributed 2009-08-25 18:14:12 -04:00
Evan Prodromou c8b8f07af1 change Laconica and Control Yourself to StatusNet in PHP files 2009-08-25 18:12:20 -04:00
Craig Andrews a35794e3c3 Try oEmbed discovery before using oohembed 2009-07-15 17:10:36 -04:00
Evan Prodromou e744eba7eb oembed and thumbnail don't need sequences 2009-06-23 09:52:31 -07:00
Evan Prodromou 2e9fc34d4f change staticGet() from DB_DataObject to Memcached_DataObject for file classes 2009-06-22 14:24:40 -07:00
Evan Prodromou 05e5122802 Database changes for file tables
Some minor database changes for file tables. Namely:

 * Added a timestamp to all tables
 * Added a filename column for local files
 * Change some tables that had unnecessary auto-increment primary
   keys when they had another unique column that should act as
   the primary key
 * Change engine from MyISAM to InnoDB for a couple of files.

Also, rebuilt the DB_DataObject files for all these tables.
2009-06-22 14:19:41 -07:00
Evan Prodromou aec6456c91 Update copyright dates in files modified in 2009 2009-06-20 16:12:55 -07:00
Evan Prodromou 793a6a1155 change Controlez-Vous to Control Yourself 2009-06-20 16:00:04 -07:00
Robin Millette 28d02ec8cd Make oohembed endpoint configurable. 2009-06-17 16:44:33 -04:00
Robin Millette fecb8c706d Attachments and their list now provide "ajax" view. Also added a few sidebars relating tags and attachments. 2009-05-15 15:04:58 -04:00
Robin Millette 3b7ee5a5f9 rewrote short url stuff to handle new file/url classes (redirections, oembed, mimetypes, etc.) 2009-05-13 14:27:32 -04:00
Robin Millette d010d811ba db stuff for URLs: redirections, oembed, etc. 2009-05-11 13:45:00 -04:00