Commit Graph

78 Commits

Author SHA1 Message Date
Max Kostikov faaffdd618 Update message.php 2018-09-17 13:15:43 +02:00
Max Kostikov 1819704620 Use common msg_drop function 2018-09-15 22:32:07 +02:00
Max Kostikov 284e5dd2e8 unification with zot.php code for future reuse 2018-09-15 01:45:54 +02:00
Max Kostikov 85d8225cc0 less data in select 2018-09-15 01:01:48 +02:00
Max Kostikov 6360dee125 formatting 2018-09-14 17:45:42 +02:00
Max Kostikov e931616011 Save combined view while deleting first message in thread 2018-09-14 17:38:14 +02:00
Mario Vavti 7181cf9012 silence PHP7.2 warning 2017-12-16 20:33:07 +01:00
Mario Vavti c8dbcf8a2a sort combined private mail conversations by latest updated conversation instead of created parent 2017-11-13 22:01:37 +01:00
Mario Vavti cdaf5f3fc0 fix issues with diaspora xchans 2017-11-02 08:44:46 +01:00
zotlabs 3b4f70ae83 Several things about mail storage weren't quite right. 2017-06-22 17:31:08 -07:00
zotlabs fc98bd1563 minor export issue with mail 2017-05-31 20:59:36 -07:00
zotlabs 8c38841a4d Merge branch 'dev' of https://github.com/redmatrix/hubzilla into xdev_merge 2017-05-07 14:43:38 -07:00
Andrew Manning 1d20b2603a Mail subject bug fix 2017-05-07 08:52:26 -04:00
zotlabs cbc906c438 more work on client side e2ee 2017-05-01 15:12:43 +02:00
zotlabs fdf639e1fb more work client mail crypto 2017-05-01 15:10:42 +02:00
zotlabs 230617208b more work on client side e2ee 2017-04-29 16:30:11 -07:00
zotlabs 70e17f9194 more work client mail crypto 2017-04-27 20:22:28 -07:00
zotlabs e8ea8d203d more client-side mail privacy work 2017-04-26 23:05:30 -07:00
zotlabs 7d5ee81628 database support for client side e2ee for private mail 2017-04-25 21:52:24 -07:00
zotlabs c20aa6062c get rid of get_app() 2017-03-31 10:30:17 +02:00
zotlabs 0394a3e939 tag and mention handling in private mail (which required refactoring the bbcode cleanup stuff in mod_item) 2016-12-13 20:01:38 -08:00
zotlabs c4a9b61da6 restructuring include/message for mail preview 2016-12-13 16:34:08 -08:00
zotlabs f1fc201862 not null violation in mail 2016-10-24 17:14:06 -07:00
zotlabs c5dcac4dbb issue #564 2016-10-21 21:44:15 -07:00
zotlabs e7233c0c94 more backquotes - this should take care of most except for the array import queries 2016-10-09 16:31:04 -07:00
redmatrix 3727bea29a issue #538 continued 2016-09-29 16:20:26 -07:00
Mario Vavti 8333d41dbd fix issue #528 2016-09-24 19:02:37 +02:00
redmatrix b5d093e5ca finish the channel_reddress() conversion 2016-09-21 15:28:37 -07:00
redmatrix a2cec8899a daemon conversion continued... 2016-05-19 22:26:37 -07:00
redmatrix 9abd95fad3 static App 2016-03-31 16:06:03 -07:00
redmatrix 1cd3b41825 deprecate $a->get_baseurl() 2016-03-30 22:13:24 -07:00
redmatrix d79d6c7055 the mail_isreply flag wasn't being set in the right cases 2016-01-10 17:39:18 -08:00
redmatrix 4ccd9ae6da start of v4 2015-12-06 19:16:38 -08:00
Mario Vavti bb995f1bb6 fix mail attachment and photo permissions. issue #202 2015-12-02 11:34:40 +01:00
Mario Vavti 593423434c fix attachment rendering for mail 2015-12-02 09:44:25 +01:00
redmatrix 3f7ee613fc mail sync debugging 2015-10-15 20:40:24 -07:00
redmatrix 93f061f78a mail sync/migrate continued; also abstract delivery loop to make it re-usable, change refresh_all to use delivery loop. 2015-10-15 18:52:04 -07:00
redmatrix 7517c76ae4 Merge https://github.com/redmatrix/redmatrix into pending_merge
Conflicts:
	install/update.php
2015-10-15 16:02:37 -07:00
Mario Vavti b9723aa85b some heavy private mail restructuring - work in progress 2015-09-24 14:07:44 +02:00
redmatrix 4af339da63 slight hack to improve public forum detection in the forum widget 2015-09-09 18:18:27 -07:00
redmatrix 9328edfdcd obscure mail subject in conversation structure 2015-09-01 22:59:06 -07:00
redmatrix 58c9f516b3 private mail isues 2015-08-09 01:18:36 -07:00
redmatrix 1a0655f34e more work on mail flags 2015-06-23 21:01:59 -07:00
redmatrix 507dfb9f85 add rot47 to the mix. This shouldn't affect the speed to any measurable degree. 2015-05-19 21:51:48 -07:00
redmatrix 77e2ef45f0 mail_obscure - AES-256 is way too slow, simplify. Ideally a substitution cipher would be adequate for our requirements. 2015-05-19 02:16:12 -07:00
Habeas Codice 5d2ab4a4fc prevent silly fake null date from causing problems OTW from older builds 2015-01-30 16:15:05 -08:00
friendica a496036066 local_user => local_channel 2015-01-28 20:56:04 -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 03585b8f88 SQL error - private message conversation lookup 2014-10-06 19:37:51 -07:00
friendica ad86cc24c8 d* PM cont. 2014-09-23 04:34:35 -07:00