summaryrefslogtreecommitdiff
path: root/classes/File_redirection.php
AgeCommit message (Collapse)Author
2010-12-02Fix for tickets #2917, #2262: user URL shortening options not being applied ↵Brion Vibber
in non-web channels common_shorten_links() can only access the web session's logged-in user, so never properly took user options into effect for posting via XMPP, API, mail, etc. Adds an optional $user parameter on common_shorten_links(), and a $user->shortenLinks() as a clearer interface for that. Tweaked some lower-level functions so $user gets passed down -- making the $notice_id param previously there for saving URLs at notice save time generalized a little. Note also ticket #2919: there's a lot of duplicate code calling the shortening, checking the length, and reporting near-identical error messages. These should be consolidated to aid in code and translation maintenance.
2010-11-17Add $config['attachments']['process_links'] to allow disabling processing of ↵Brion Vibber
mentioned URL links for attachment info (oEmbed lookups) and dereferencing of redirects that we didn't have shortened ourselves. This option may be useful for intranet sites that don't have direct access to the internet, as they may be unable to successfully fetch those resources.
2010-11-15Workaround for yfrog.com photo attachments: fudge ↵Brion Vibber
File_redirection::lookupWhere()'s HTTP handling -- when we get a 204 on a HEAD, double-check it by re-running as a GET. yfrog.com returns a 204 incorrectly for this case.
2010-09-28* i18n/L10n and translator documentation updates.Siebrand Mazeland
* whitespace and indentation updates
2010-08-12Fix for ticket 2513: "Can't linkify" error when some links are shortenedBrion Vibber
When bogus SSL sites etc were hit through a shortening redirect, sometimes link resolution kinda blew up and the user would get a "Can't linkify" error, aborting their post. Now catching this case and just passing through the URL without attempting to resolve it. Could benefit from an overall scrubbing of the freaky link/attachment code though...! :) http://status.net/open-source/issues/2513
2010-03-10Fixup script for files w/ bogus data saved into file record ('h bug')Brion Vibber
2010-03-10Fix for attachment "h bug": posting a shortened link to an oembed-able ↵Brion Vibber
resource that has been previously used in the system would incorrectly save "h" as the item's type and title.
2009-11-09Revert "Remove more contractions"Brion Vibber
This reverts commit 5ab709b73977131813884558bf56d97172a7aa26. Missed this one yesterday...
2009-11-08Remove more contractionsSiebrand Mazeland
* doesn't * won't * isn't * don't
2009-11-02Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, ↵Brion Vibber
adding redirect handling and convenience functions. Caching support will be added in future work after unit tests have been added. * extlib: add PEAR HTTP_Request2 0.4.1 alpha * extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility * moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries * adapted GeonamesPlugin for new HTTPResponse interface Note some plugins haven't been fully tested yet.
2009-11-02Revert "Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 ↵Brion Vibber
package, adding redirect handling and convenience functions." Going to restructure a little more before finalizing this... This reverts commit fa37967858c3c29000797e510e5f98aca8ab558f.
2009-11-02Rebuilt HTTPClient class as an extension of PEAR HTTP_Request2 package, ↵Brion Vibber
adding redirect handling and convenience functions. Caching support will be added in future work after unit tests have been added. * extlib: add PEAR HTTP_Request2 0.4.1 alpha * extlib: update PEAR Net_URL2 to 0.3.0 beta for HTTP_Request2 compatibility * moved direct usage of CURL and file_get_contents to HTTPClient class, excluding external-sourced libraries Note some plugins haven't been tested yet.
2009-09-27Fix some bugs in the URL linkification, and fixed the unit test.Craig Andrews
2009-08-26define LACONICA and accept LACONICA for backwards compatibilityEvan Prodromou
2009-08-25change LACONICA to STATUSNETEvan Prodromou
2009-08-25a distributed -> the distributedEvan Prodromou
2009-08-25change Laconica and Control Yourself to StatusNet in PHP filesEvan Prodromou
2009-08-24ftps protocol should be handled the same way as ftpCraig Andrews
Canon urls that have a protocol followed by a host (and no path) automatcally get a trailing slash by the canon function - make the unit test match that
2009-06-25avoid getting duplicate errors on uploadEvan Prodromou
2009-06-23append uploads to content rather than showing them doubleEvan Prodromou
2009-06-22change staticGet() from DB_DataObject to Memcached_DataObject for file classesEvan Prodromou
2009-06-22Database changes for file tablesEvan Prodromou
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-20Update copyright dates in files modified in 2009Evan Prodromou
2009-06-20change Controlez-Vous to Control YourselfEvan Prodromou
2009-05-27Handles local aliases (redirection) for file uploads attached to notices.Robin Millette
2009-05-18Removed dead code.Robin Millette
2009-05-13rewrote short url stuff to handle new file/url classes (redirections, ↵Robin Millette
oembed, mimetypes, etc.)
2009-05-11db stuff for URLs: redirections, oembed, etc.Robin Millette