Commit graph

71 commits

Author SHA1 Message Date
marijus
fb198b8a05 item_unseen update 2015-02-13 10:01:26 +01:00
friendica
da2349bb6a provide relief to sites that are severely impacted by the slow ITEM_UNSEEN searches. This does not incorporate any other flag optimisations as that will require a major DB update and possibly involve significant downtime. This is just to bite off a little chunk now and provide some much needed relief. 2015-02-12 17:45:25 -08:00
friendica
2b2fa5a973 issue #843 2015-02-11 20:38:06 -08:00
marijus
e2aa0a273c improve sql query 2015-02-09 21:46:22 +01:00
marijus
1abb17c880 typo 2015-02-05 21:46:46 +01:00
marijus
1d5321798a forgot to remove some debug stuff 2015-02-05 21:31:05 +01:00
marijus
be0e6ed6d7 make file activity respect parent dir permissions work 2015-02-05 21:16:21 +01:00
marijus
e5849f9432 not quite there yet but getting closer a little 2015-02-04 22:55:22 +01:00
marijus
a80057fec7 comment out latest changes - needs more testing 2015-02-02 17:45:30 +01:00
marijus
ed3b5f8251 comment this out for now - it is not always true 2015-02-02 17:12:13 +01:00
marijus
2546b0a525 one important line missing 2015-02-02 16:48:49 +01:00
marijus
74da8f2e87 we also need folder here 2015-02-02 15:31:51 +01:00
marijus
1b30e43c45 typo 2015-02-02 15:26:35 +01:00
marijus
e0bc01a7f6 just select perms 2015-02-02 15:25:30 +01:00
marijus
c29483b88c respect parent dir permissions 2015-02-02 15:18:44 +01:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
marijus
63f1ae5e20 optimize check query 2015-01-24 14:35:21 +01:00
marijus
e4e990df06 the old item must be removed before the new is created 2015-01-24 12:22:04 +01:00
marijus
4379354021 disable notices 2015-01-24 01:15:54 +01:00
marijus
0cbe64c360 some more kiss 2015-01-24 01:13:02 +01:00
marijus
ea209a84ab typo 2015-01-23 15:06:30 +01:00
marijus
b4f1cc5044 we get the object info before it is deleted now 2015-01-23 15:03:19 +01:00
marijus
8789c96e78 some code restructure 2015-01-23 14:50:39 +01:00
marijus
d94114ec98 add some mimetypes 2015-01-22 12:12:42 +01:00
marijus
3731ff97ff make $links an array of links 2015-01-22 04:57:59 +01:00
marijus
4ff71fc0c7 change mod/sharedwithme backend to use activity object - this is not backwards compatible 2015-01-22 02:34:38 +01:00
friendica
ec6e147935 put cloud back in get_cloudpath - just have to be careful where we use it. 2015-01-19 14:31:45 -08:00
friendica
89a2012f7f remove all hardwired references to 'cloud' in the files interfaces and replace with $a->module. It's OK to leave them in the RedBrowser component because this will remain under /cloud. All the DAV bits need to be abstracted as they will eventually end up under /dav. $a->module will contain the correct string to use. 2015-01-18 17:52:09 -08:00
marijus
1c2d956d7f basic proof of concept file activity support - will send activity via the filestorage module and via attach_delete() 2015-01-18 14:44:58 +01:00
marijus
8e034a3b6b fix recursive file permissions 2014-12-30 13:56:27 +01:00
friendica
5bb794cc28 allow directory searches to be filtered by (public forums) and/or (! public forums) 2014-11-23 18:22:19 -08:00
Habeas Codice
7d0659bb2b postgres fixes 2014-11-18 11:43:00 -08:00
Habeas Codice
1a5a5c7edb PostgreSQL support initial commit
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)
2014-11-13 12:21:58 -08:00
Klaus Weidenbach
bc2ad74813 When you delete something in /cloud stay in the right folder.
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.
2014-10-14 00:15:41 +02:00
friendica
3a31ddea2b provide os_mkdir to workaround permission issues with php mkdir 2014-07-16 01:07:00 -07:00
Klaus Weidenbach
ffea675240 Add rename support for DAV directories.
This works only over DAV right now, no GUI yet.
2014-06-30 01:08:29 +02:00
Klaus Weidenbach
322091cd12 Fixed some more timestamp bugs in RedDAV.
Fixed an SQL-query in RedFile::put(), where parameters where in wrong order.
2014-06-29 17:49:46 +02:00
Klaus Weidenbach
5be3ba8436 Fixed a wrong timestamp update when adding a file.
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.
2014-06-29 16:00:21 +02:00
tuscanhobbit
4c78c3bdee Oops I left some debug stuff around 2014-06-24 12:13:54 +02:00
tuscanhobbit
cc4001fce7 Fixes to links and forward URLs in filestorage 2014-06-24 12:05:11 +02:00
Klaus
d755fb83a7 Doxygen include/attach.php
Some Doxygen as far as I understood and some styleguides.
2014-02-19 21:04:20 +01:00
friendica
6b15e57cdb add epub mimetype (application/epub+zip) 2014-02-02 02:43:36 -08:00
friendica
cff7056f8f mod_attach: output stream wasn't working 2014-01-11 12:58:00 -08:00
friendica
74e099b135 fix cloud path in filestorage edit page 2014-01-10 18:33:46 -08:00
friendica
3298768d95 directory creation error, display localtimes on cloud webpage, doc updates 2014-01-10 00:47:40 -08:00
friendica
ee2bea37e9 mod_filestorage: provide a URL for linking to webpages and other websites 2014-01-09 21:01:53 -08:00
friendica
a309bc0d47 only let visitors remove their own files. 2014-01-09 19:20:10 -08:00
friendica
6eda806444 This should be approaching completion for file OS storage. May be a few minor bugs remaining due to some late-breaking fixes but I've been testing it as I go. 2014-01-08 18:06:52 -08:00
friendica
4011837805 more work on dav - deletion and a bit more progress on OS storage 2014-01-07 18:47:33 -08:00
friendica
b8564134aa make storage limit service classes apply to accounts, not channels. Also include a css file that was missing from work yesterday. 2014-01-07 14:10:28 -08:00