aboutsummaryrefslogtreecommitdiffstats
path: root/include/attach.php
Commit message (Collapse)AuthorAgeFilesLines
* allow directory searches to be filtered by (public forums) and/or (! public ↵friendica2014-11-231-0/+1
| | | | forums)
* postgres fixesHabeas Codice2014-11-181-3/+3
|
* PostgreSQL support initial commitHabeas Codice2014-11-131-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were 11 main types of changes: - UPDATE's and DELETE's sometimes had LIMIT 1 at the end of them. This is not only non-compliant but it would certainly not do what whoever wrote it thought it would. It is likely this mistake was just copied from Friendica. All of these instances, the LIMIT 1 was simply removed. - Bitwise operations (and even some non-zero int checks) erroneously rely on MySQL implicit integer-boolean conversion in the WHERE clauses. This is non-compliant (and bad programming practice to boot). Proper explicit boolean conversions were added. New queries should use proper conventions. - MySQL has a different operator for bitwise XOR than postgres. Rather than add yet another dba_ func, I converted them to "& ~" ("AND NOT") when turning off, and "|" ("OR") when turning on. There were no true toggles (XOR). New queries should refrain from using XOR when not necessary. - There are several fields which the schema has marked as NOT NULL, but the inserts don't specify them. The reason this works is because mysql totally ignores the constraint and adds an empty text default automatically. Again, non-compliant, obviously. In these cases a default of empty text was added. - Several statements rely on a non-standard MySQL feature (http://dev.mysql.com/doc/refman/5.5/en/group-by-handling.html). These queries can all be rewritten to be standards compliant. Interestingly enough, the newly rewritten standards compliant queries run a zillion times faster, even on MySQL. - A couple of function/operator name translations were needed (RAND/RANDOM, GROUP_CONCAT/STRING_AGG, UTC_NOW, REGEXP/~, ^/#) -- assist functions added in the dba_ - INTERVALs: postgres requires quotes around the value, mysql requires that there are not quotes around the value -- assist functions added in the dba_ - NULL_DATE's -- Postgres does not allow the invalid date '0000-00-00 00:00:00' (there is no such thing as year 0 or month 0 or day 0). We use '0001-01-01 00:00:00' for postgres. Conversions are handled in Zot/item packets automagically by quoting all dates with dbescdate(). - char(##) specifications in the schema creates fields with blank spaces that aren't trimmed in the code. MySQL apparently treats char(##) as varchar(##), again, non-compliant. Since postgres works better with text fields anyway, this ball of bugs was simply side-stepped by using 'text' datatype for all text fields in the postgres schema. varchar was used in a couple of places where it actually seemed appropriate (size constraint), but without rigorously vetting that all of the PHP code actually validates data, new bugs might come out from under the rug. - postgres doesn't store nul bytes and a few other non-printables in text fields, even when quoted. bytea fields were used when storing binary data (photo.data, attach.data). A new dbescbin() function was added to handle this transparently. - postgres does not support LIMIT #,# syntax. All databases support LIMIT # OFFSET # syntax. Statements were updated to be standard. These changes require corresponding changes in the coding standards. Please review those before adding any code going forward. Still on my TODO list: - remove quotes from non-reserved identifiers and make reserved identifiers use dba func for quoting - Rewrite search queries for better results (both MySQL and Postgres)
* When you delete something in /cloud stay in the right folder.Klaus Weidenbach2014-10-141-109/+135
| | | | | | | When you deleted a file in /cloud you was always jumped back to /cloud/[channel], now you will stay in the parent folder. Some more doxygen documentation. Removed duplicate data from logging output and reduced logging in RedDAV in general.
* provide os_mkdir to workaround permission issues with php mkdirfriendica2014-07-161-2/+2
|
* Add rename support for DAV directories.Klaus Weidenbach2014-06-301-3/+3
| | | | This works only over DAV right now, no GUI yet.
* Fixed some more timestamp bugs in RedDAV.Klaus Weidenbach2014-06-291-13/+30
| | | | Fixed an SQL-query in RedFile::put(), where parameters where in wrong order.
* Fixed a wrong timestamp update when adding a file.Klaus Weidenbach2014-06-291-4/+4
| | | | | | | When a file was uploaded the timestamp of the containing folder should get updated, but the timestamp of the first file in the folder was mistakenly updated. There are some more wrong timestamps, but still looking for the bug.
* Oops I left some debug stuff aroundtuscanhobbit2014-06-241-5/+11
|
* Fixes to links and forward URLs in filestoragetuscanhobbit2014-06-241-0/+39
|
* Doxygen include/attach.phpKlaus2014-02-191-70/+126
| | | Some Doxygen as far as I understood and some styleguides.
* add epub mimetype (application/epub+zip)friendica2014-02-021-0/+1
|
* mod_attach: output stream wasn't workingfriendica2014-01-111-1/+2
|
* fix cloud path in filestorage edit pagefriendica2014-01-101-1/+1
|
* directory creation error, display localtimes on cloud webpage, doc updatesfriendica2014-01-101-1/+1
|
* mod_filestorage: provide a URL for linking to webpages and other websitesfriendica2014-01-091-0/+45
|
* only let visitors remove their own files.friendica2014-01-091-8/+12
|
* This should be approaching completion for file OS storage. May be a few ↵friendica2014-01-081-4/+11
| | | | minor bugs remaining due to some late-breaking fixes but I've been testing it as I go.
* more work on dav - deletion and a bit more progress on OS storagefriendica2014-01-071-3/+56
|
* make storage limit service classes apply to accounts, not channels. Also ↵friendica2014-01-071-2/+2
| | | | include a css file that was missing from work yesterday.
* prepare for OS file storage, and add bbcode attachment link to ↵friendica2014-01-061-2/+8
| | | | mod/filestorage. This isn't beautiful, but it's a start.
* add potentially recursive set permissions function for file storagefriendica2014-01-061-1/+41
|
* reddav - basic mkdir support - needs more work to be robustfriendica2014-01-051-6/+9
|
* fix mimetype detection fallbackfriendica2014-01-031-10/+5
|
* make the storage permissions tweakable for hosted environments where they ↵friendica2013-11-041-2/+2
| | | | may require tweaking.
* solid progress on attach_mkdir - but we need to figure out where to store ↵friendica2013-11-041-11/+73
| | | | default file permissions. This should be separate from post/item permissions and we won't be able to set permissions from the DAV interface so if we want something private we have to provide these permissions in our preferences.
* add attach_mkdir()friendica2013-11-031-0/+71
|
* Service class itemsChristian Vogeley2013-09-081-1/+1
| | | | Items / webpages /attachment message
* attachment permissions not rightfriendica2013-07-301-2/+2
|
* this might make edits update across the wire, or it might notfriendica2013-02-281-0/+61
|
* start formatting for Doxygenfriendica2013-02-251-1/+1
|
* mod/attach support for files/attachments using OS storagefriendica2013-02-051-4/+4
|
* more progress on photos apifriendica2013-02-021-0/+11
|
* debugging of file attachment api - somewhat functional but the attachment ↵friendica2013-01-311-6/+7
| | | | info structure in the item table needs to be re-done.
* file/attachment storage api with revision control - needs a bit more testing ↵friendica2013-01-311-2/+281
| | | | but the framework is in place
* beginning of backend file/attachment apifriendica2013-01-301-0/+68
|
* Merge branch 'master' of https://github.com/friendica/friendicaAlexander Kampmann2012-04-051-0/+0
| | | | | | Conflicts: include/config.php update.php
* mime_content_type requires access to the file, not just the namefriendica2012-01-281-6/+8
|
* add remove_user hook (it looks like dreamhost changed all my file ↵friendica2012-01-181-0/+0
| | | | permissions, this will make a nasty commit)
* several fixes for attachmentsFriendika2011-08-031-5/+6
|
* basic file upload/attachFriendika2011-05-241-0/+80