Commit graph

429 commits

Author SHA1 Message Date
redmatrix
25bd332aab Merge branch 'master' of https://github.com/redmatrix/redmatrix 2015-05-21 20:39:10 -07:00
redmatrix
81d94dae2c preserve lock on edited comments 2015-05-21 02:03:44 -07:00
redmatrix
3763f74a10 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	include/items.php
	include/text.php
	mod/item.php
	view/nl/messages.po
2015-05-20 20:49:06 -07:00
redmatrix
6466774b6e PRIVACY: possible privacy leakage under a defined set of circumstances 2015-05-20 18:46:23 -07:00
redmatrix
a6cb90c81c Merge branch 'master' into tres
Conflicts:
	include/Import/refimport.php
	include/activities.php
	include/attach.php
	include/event.php
	include/externals.php
	include/identity.php
	include/items.php
	include/notifier.php
	include/photos.php
	include/taxonomy.php
	include/zot.php
	mod/channel.php
	mod/connedit.php
	mod/events.php
	mod/item.php
	mod/like.php
	mod/manage.php
	mod/mood.php
	mod/ping.php
	mod/poke.php
	mod/subthread.php
	mod/tagger.php
	mod/thing.php
2015-05-14 18:02:29 -07:00
redmatrix
25b599a4bd convert ITEM_WALL from bitfield to standalone 2015-05-06 21:03:33 -07:00
redmatrix
c9ec4f46b6 for hubzilla we won't be obscuring items, only private mail, this will allow us to search and cache private posts 2015-05-05 18:36:05 -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
friendica
53339d19a3 issue #176, sender copy of item not obscured if using private mention 2015-04-20 20:14:07 -07:00
Mario Vavti
9addc4581e provide a separate input field for rpost attachments 2015-04-16 23:26:11 +02:00
friendica
d3bc721138 item_check_service_class wasn't returning correct results 2015-04-13 16:03:09 -07:00
friendica
37afc81847 update features, allow sys account page deletion 2015-04-08 17:54:52 -07:00
friendica
0bb89778d3 add channel_lastpost timestamp to help optimise some outrageously expensive queries. 2015-03-26 19:55:52 -07:00
friendica
f1a1660709 item_check_service_class - the join is totally unnecessary 2015-03-25 19:13:53 -07:00
friendica
62b2fa6ac7 operation snakebite, cont. 2015-03-22 20:30:23 -07:00
friendica
7af012b1f9 The random bad signatures are because something somewhere is trimming the body text. It could be any one of hundreds of functions that touch the message body. We really want to trim the body text, so I'm putting back all the trim statements - in mod/item and item_store and item_store_update. The last fix for random bad sigs noted that one of the trims wasn't there, so the others were removed. The correct fix is for all the trims to be there. We will probably have a few (quite a few) bad sigs during the transition back to trimmed text but this should nail it for anybody on recent code and with new content. 2015-03-17 00:13:47 -07:00
friendica
53e908d7b7 when fixing "naked links" make sure not to double link double urls as seen in archive.org - which has the complete unescaped target url, scheme and all, as part of its own. 2015-03-06 20:45:26 -08:00
friendica
7ad425bbda failure to auto update comments if it's your own. 2015-02-14 21:57:47 -08:00
friendica
4b513d3322 issue #896 2015-02-12 19:22:07 -08:00
friendica
084ca3f4a1 typo 2015-02-12 18:49:42 -08: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
79223b6b3d item voting tools 2015-02-10 19:10:18 -08:00
friendica
08b757a22c Merge branch 'master' into tres
Conflicts:
	mod/events.php
	view/css/mod_events.css
2015-02-08 20:57:37 -08:00
friendica
b8add899a2 undo extra logging 2015-02-08 19:28:18 -08: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
ff68ea6087 more message restrict conversions 2015-01-29 14:51:41 -08:00
friendica
e157371c39 remote_user => remote_channel 2015-01-28 20:58:59 -08:00
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
4c2a1e572a start on item_restrict conversion 2015-01-22 21:04:54 -08:00
friendica
6e0e3b2433 more expanding item flags 2015-01-22 18:41:10 -08:00
friendica
e46eba1258 heavy lifting converting item flag bits 2015-01-22 17:41:16 -08:00
friendica
29436081a8 slow progress removing bitfields on item table 2015-01-21 16:06:25 -08:00
friendica
168b67fa41 correct some activity object types (for comments), also fix a foreach warning resulting from recent tag work 2015-01-14 18:36:23 -08:00
friendica
7a24943c34 some back-end code to support location activity objects. Work in progress. 2015-01-14 14:46:01 -08:00
friendica
dfdef0af0d provide a setting to control ALLOWCODE permissions at the channel level - it isn't always appropriate to apply this to all channels in an account. 2015-01-13 18:30:30 -08:00
Stefan Parviainen
93735df2c7 Allow tags in mail, many profile fields, and admin info 2015-01-13 17:54:40 +01:00
Stefan Parviainen
adc9564b5c Refactor mention code to make it more reusable 2015-01-12 20:01:07 +01:00
friendica
68c612c597 fix shares that are processed with markdown (regression, this was pulled from diaspora2bb a couple weeks back as it was affecting diaspora input, but here we're dealing with red input only) 2015-01-01 22:30:54 -08:00
friendica
50943f439c issue #777, make photo cache time configurable, read the comments. 2014-12-27 18:19:51 -08:00
Stefan Parviainen
62dabecf97 Show tags in other channels profile field to make it easier to navigate to the channels 2014-12-07 16:19:22 +01:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06:31 -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
friendica
37742be6af some more work on sys publishing 2014-11-11 18:57:59 -08:00
friendica
570577a990 a couple of places where we need to look for a sys channel euid. 2014-11-11 18:05:50 -08:00
friendica
a80e696b77 wall posted comment to a top-level wall post which arrived via a route (e.g. was posted to a forum) had no route, hence downstream recipients report route mismatch 2014-11-03 17:35:42 -08:00
friendica
7d9f785758 if any privacy tags are created on a top level post, restrict the post; since it could have been quite sensitive. If there were errors processing the actual tag restrict the post to the profile owner. Also make the "privacy tag over-rides ACL" behaviour configurable. Default is that privacy tags over-ride the ACL. 2014-10-28 20:01:44 -07:00
friendica
9cc76cb33d several unrelated things - auto_follow wasn't working for new accounts, error returned in private mention to a collection, and added auto-completion to photo tags; though it only matches people so the hover text is now wrong. Also made the photo edit form XHTML (XML) compliant. 2014-10-27 19:23:40 -07:00
Thomas Willingham
38801f802f Issue #661 2014-10-24 17:46:31 +01:00
friendica
58c692e389 improved wall-to-wall detection for comments so we can handle Diaspora signing and wall-to-wall attribution correctly.
Do it at the point of submission. This also fixes a potential bug in yesterday's wall-to-wall permission setting,
if it was a local comment to a remote post.
2014-10-22 20:39:49 -07:00
friendica
ed7712cfbf private forum issues 2014-10-21 16:33:35 -07:00