Commit graph

172 commits

Author SHA1 Message Date
Mario Vavti
e2a15d0ec9 fix photo visibility switch on photo upload 2015-10-13 14:05:27 +02:00
redmatrix
91895c52ca missing underscore 2015-10-12 19:54:01 -07:00
redmatrix
fc28af8518 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	include/attach.php
2015-10-12 19:52:21 -07:00
redmatrix
3545626950 attach_list_files had some problems - wasn't used until now apparently 2015-10-12 19:49:06 -07:00
redmatrix
6a7079a594 small change to allow a person with sufficient privileges the ability to import a file into their cloud storage from elsewhere in the server filesystem - without nuking it in the process. 2015-10-12 18:55:02 -07:00
redmatrix
f2fefb91d5 change photo permissions when attach permissions are changed through mod/filestorage, and fix lockview for photos. 2015-09-18 01:53:04 -07:00
redmatrix
55ab968edf make js_upload work with hubzilla. It still needs a rewrite. 2015-09-05 17:35:00 -07:00
redmatrix
9cebd24987 change attach_store to allow a predefined item to accompany a photo 2015-08-26 22:13:20 -07:00
redmatrix
5fa2aa6d48 lots of stuff that was needed for successful photo import from red 2015-08-24 20:58:12 -07:00
redmatrix
50a1e0c618 attach_store needs a lot of documenting to understand what's going on and how it got to be this way. Here's the bird's eye view. 2015-08-13 17:11:59 -07:00
redmatrix
7e43da43a1 more file permissions inheritance work 2015-08-06 17:42:53 -07:00
redmatrix
91bbfcf554 photo permission inheritance. We want to use the folder permissions unless specific permissions have been set to over-ride them. If nothing is set, use the channel default. We may have to mess with his further in the case of somebody trying to create a public photo directory when their normal permissions are set to private. Kind of a chicken/egg problem because the folder permissions will be empty. 2015-08-06 17:09:09 -07:00
redmatrix
f45cb8cf1f minor - add all the newly supported table columns 2015-07-30 20:04:02 -07:00
redmatrix
d5a40cac25 Merge branch 'master' of https://github.com/redmatrix/redmatrix
several dav fixes
Conflicts:
	include/items.php
2015-07-30 17:11:16 -07:00
redmatrix
ed3d9d1f80 some photo/attach permissions issues 2015-07-18 16:39:12 -07:00
redmatrix
b06b6f798f localise event calendar 2015-06-25 18:23:48 -07:00
redmatrix
86588bdd6c more work on photos, including os_storage for the size '0' photo and numbering duplicate filenames 2015-06-23 22:46:39 -07:00
redmatrix
33c9d8e06b all file attachments are now stored natively, still have photos-0 to store natively 2015-06-18 22:12:26 -07:00
redmatrix
2963be60e5 more photos work 2015-06-17 18:26:56 -07:00
redmatrix
6ab20eb1b5 lots of work on merging photo and file albums/folders 2015-06-17 17:44:31 -07:00
redmatrix
c6c17182e5 attach_mkdirp - implement force option to return success if dir exists 2015-06-17 01:18:55 -07:00
redmatrix
4ecee713d5 recursive mkdir (ala mkdir -p) for file and photo storage 2015-06-16 22:58:26 -07:00
redmatrix
39309ad45c start work on photo directories 2015-06-16 19:05:09 -07:00
redmatrix
d84b3cfc3c remove file/attachments when their associated photos are removed 2015-06-16 17:50:15 -07:00
redmatrix
bc72d3fd26 move profile photos to new methods 2015-06-15 23:37:51 -07:00
redmatrix
bdedda7c6b fix attachment permissions when they also contain an image. 2015-06-15 20:43:49 -07:00
redmatrix
2adc7a51ad photo upload: pass in the contact_allow and resource_id via include/attach.php 2015-06-15 19:52:17 -07:00
redmatrix
9642728e7d first cut at merging files and photos, not yet well integrated but they are integrated 2015-06-14 16:50:24 -07:00
redmatrix
b7be79c5e7 isolate the os_storage flag 2015-06-13 15:57:28 -07:00
redmatrix
41085ae03f start on the DAV/photos merger 2015-06-11 22:32:08 -07:00
redmatrix
7c7a5cba8f Merge branch 'master' into tres 2015-05-17 19:49:36 -07:00
redmatrix
76558df966 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/bb2diaspora.php
	include/diaspora.php
	include/enotify.php
	mod/admin.php
	mod/cloud.php
	mod/dav.php
	mod/home.php
	mod/invite.php
	mod/like.php
	mod/mitem.php
	mod/p.php
	mod/pubsites.php
	mod/setup.php
	mod/siteinfo.php
	util/messages.po
2015-05-17 19:48:57 -07:00
Klaus Weidenbach
6757e86e85 Add some more documentation to attach_store() 2015-05-17 01:24:47 +02:00
redmatrix
25b599a4bd convert ITEM_WALL from bitfield to standalone 2015-05-06 21:03:33 -07:00
friendica
6679734135 Merge branch 'master' into tres
Conflicts:
	include/Contact.php
	include/ItemObject.php
	include/api.php
	include/attach.php
	include/diaspora.php
	include/dir_fns.php
	include/enotify.php
	include/event.php
	include/expire.php
	include/items.php
	include/notifier.php
	include/notify.php
	include/photos.php
	include/taxonomy.php
	include/text.php
	include/widgets.php
	include/zot.php
	mod/admin.php
	mod/channel.php
	mod/dirsearch.php
	mod/display.php
	mod/editwebpage.php
	mod/events.php
	mod/home.php
	mod/item.php
	mod/manage.php
	mod/mood.php
	mod/network.php
	mod/page.php
	mod/photos.php
	mod/ping.php
	mod/post.php
	mod/thing.php
	mod/viewsrc.php
	view/css/mod_events.css
2015-04-23 19:49:41 -07:00
Mario Vavti
70b109702e make dropItem more universal and move delete up in the dropdown menu 2015-04-12 14:30:33 +02:00
Mario Vavti
962fdf08c0 make fs deletion of directories work 2015-04-12 13:58:04 +02:00
Mario Vavti
7c8b9397ae reverse file activity logic 2015-04-12 13:13:22 +02:00
friendica
b546f8d702 Merge https://github.com/friendica/red into pending_merge 2015-03-29 16:05:24 -07:00
friendica
505e5e90b2 fix os_mkdir 2015-03-29 16:05:08 -07:00
Klaus Weidenbach
d0361582b0 Correcting reported Doxygen syntax warnings.
Fixed wrong Doxygen syntax and add some of the available FIXME to
Doxygen documentation.
Updated Doxygen configuration to add also all capital letter tags.
Adding some more Doxygen documentation.
2015-03-29 22:23:00 +02:00
Mario Vavti
c21a21be3e we only need item mid. some documentation. 2015-03-24 11:38:54 +01:00
Mario Vavti
47c055e7f3 do not override item_private here anymore 2015-03-22 14:24:07 +01:00
Klaus Weidenbach
daed7fbead Bugfix und variable initialization.
Fixed a wrong perm_is_allowed() parameter, commented some other places
where we use variables that are not set and should not work.
2015-03-21 22:28:07 +01:00
Mario Vavti
264b43db05 some cleanup 2015-03-20 17:46:13 +01:00
Mario Vavti
6698d7b03a possible improvement regarding deletion 2015-03-20 17:37:01 +01:00
marijus
2fbb6a5ff5 do not send activity to channels with no permission to view filestorage 2015-02-18 10:41:38 +01:00
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
friendica
4b348d2489 Merge branch 'master' into tres
Conflicts:
	view/css/mod_events.css
	view/theme/redbasic/css/style.css
2015-02-05 19:38:43 -08: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
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