Commit graph

311 commits

Author SHA1 Message Date
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
912be23e16 Merge branch 'master' into tres
Conflicts:
	include/group.php
	include/text.php
	mod/acl.php
	mod/channel.php
	mod/connections.php
	mod/display.php
	mod/group.php
	mod/item.php
	mod/locs.php
	mod/network.php
	mod/photos.php
	mod/ping.php
	mod/starred.php
	mod/viewsrc.php
2015-01-29 15:09:35 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
ac594183c6 Merge branch 'master' into tres and add some work on the item_deleted flag refactor
Conflicts:
	include/attach.php
	include/onedirsync.php
	include/zot.php
	mod/locs.php
2015-01-26 18:27:03 -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
29436081a8 slow progress removing bitfields on item table 2015-01-21 16:06:25 -08: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
friendica
5a5466346c prepare for OS file storage, and add bbcode attachment link to mod/filestorage. This isn't beautiful, but it's a start. 2014-01-06 18:13:02 -08:00
friendica
8223f04b97 add potentially recursive set permissions function for file storage 2014-01-06 14:57:51 -08:00
friendica
061894d37f reddav - basic mkdir support - needs more work to be robust 2014-01-05 16:00:05 -08:00
friendica
f2ba6ed998 fix mimetype detection fallback 2014-01-03 14:18:06 -08:00
friendica
f89e7b2bd5 make the storage permissions tweakable for hosted environments where they may require tweaking. 2013-11-04 19:21:09 -08:00
friendica
1c5e2b8645 solid progress on attach_mkdir - but we need to figure out where to store 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. 2013-11-04 19:08:34 -08:00
friendica
d783183572 add attach_mkdir() 2013-11-03 20:55:58 -08:00
Christian Vogeley
f4dfb90dbc Service class items
Items / webpages /attachment message
2013-09-08 17:19:09 +02:00
friendica
41c411739f attachment permissions not right 2013-07-30 19:43:46 -07:00
friendica
a2a2ae2dd2 this might make edits update across the wire, or it might not 2013-02-28 18:20:42 -08:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
friendica
05ba851d52 mod/attach support for files/attachments using OS storage 2013-02-05 15:34:30 -08:00
friendica
7645b440e8 more progress on photos api 2013-02-02 01:58:11 -08:00
friendica
5ca88ca10a debugging of file attachment api - somewhat functional but the attachment info structure in the item table needs to be re-done. 2013-01-31 23:56:46 -08:00
friendica
02e099da45 file/attachment storage api with revision control - needs a bit more testing but the framework is in place 2013-01-31 16:13:44 -08:00
friendica
3767bba3c3 beginning of backend file/attachment api 2013-01-30 17:27:32 -08:00
Alexander Kampmann
355c42cb30 Merge branch 'master' of https://github.com/friendica/friendica
Conflicts:
	include/config.php
	update.php
2012-04-05 13:39:15 +02:00
friendica
d54042dd38 mime_content_type requires access to the file, not just the name 2012-01-28 12:09:17 -08:00
friendica
8aa2552372 add remove_user hook (it looks like dreamhost changed all my file permissions, this will make a nasty commit) 2012-01-18 16:21:30 -08:00
Friendika
ad1e827169 several fixes for attachments 2011-08-03 19:18:58 -07:00
Friendika
73b4faca5c basic file upload/attach 2011-05-24 22:40:52 -07:00