Commit graph

50 commits

Author SHA1 Message Date
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
friendica
509a85cb12 more work on d* private messages 2014-09-23 03:03:14 -07:00
friendica
c6d07feff5 This is long overdue - use a symblic constant NULL_DATE instead of the easily mis-typed sequence '0000-00-00 00:00:00' 2014-09-08 20:35:15 -07:00
friendica
402d44e2f4 fix photos in private mail 2014-02-27 16:01:44 -08:00
friendica
d7ee552c57 Protocol: now set data['alg'] on all encapsulated encrypted packets, so that we can more easily retire 'aes256cbc' once it is no longer viable. 2013-11-20 15:20:12 -08:00
friendica
ee629534d5 E2EE on private mail (also fixed autocomplete results dropdown for recipient which was positioned below the navbar instead of next to the recipient input box) 2013-11-13 23:10:29 -08:00
friendica
6162de142c allow private mail sender to set an expiration on their messages. Once expired the message is destroyed at both ends (subject to the granularity of the polling interval) and is gone. Officially it takes some form of language independent string like 2013/11/22, but English speakers can use anything that strtotime() understands, like "+30 minutes" or "next Tuesday". 2013-11-06 18:28:36 -08:00
friendica
cd5fdbcb48 email attachments (and fix email photos) 2013-08-19 21:19:39 -07:00
friendica
24b9799dca convert all stored json calls to json_decode_plus() 2013-08-06 03:54:49 -07:00
friendica
c00c550c58 better mail obscuring 2013-07-31 02:32:41 -07:00
friendica
b4f4b8cb13 private mail is just a little more private now. Not encrypted and the obfuscation is easily reversible, but not casually readable by browsing logfiles or mysql dumps.
This isn't backward compatible - folks will have to upgrade if they can't read their mail.
2013-07-19 02:45:44 -07:00
friendica
ddf5bf8968 rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present. 2013-03-21 18:25:41 -07:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
friendica
ff0a73bf40 null notice when sending private mail 2013-02-04 15:06:23 -08:00
friendica
a8575199af upstream fixes, template regeneration 2013-01-25 13:55:42 -08:00
friendica
c657cabc9a Putting the final wraps on the backend private message API. This is more or less what needs to happen for every data type and get all the SQL code out of the front-end controllers. 2013-01-25 12:28:32 -08:00
friendica
851e436d04 make all private message functionality api-able 2013-01-24 23:45:15 -08:00
friendica
33b22338dc turn private_messages_list into backend functionality and separate it from the controller 2013-01-24 18:51:02 -08:00
friendica
e17ba14696 DB: do the mail table again. Mail almost working onsite, still needs to zot though 2012-12-04 18:24:46 -08:00
friendica
846a9813b2 here's where the heavy lifting begins - everything is likely to be broken for quite some time as we add location and db independence to items and conversations and work through the rest of the permissions and how to federate the buggers. 2012-10-01 18:02:11 -07:00
friendica
f7c6a6ff90 item table rename parent-uri, target-type, object-type (more to come later) 2012-08-15 22:33:37 -07: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
5c2fdc795f send unverified private mail using zrl 2012-04-01 00:59:35 -07: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
friendica
7eba8adbf7 pm replies 2011-12-06 19:15:42 -08:00
friendica
be8e9d3616 d* pm 2011-12-06 00:16:13 -08:00
friendica
adbc84c48e maintain backward compatibility with old PMs 2011-12-05 14:06:41 -08:00
friendica
116e20c89d add conv structure 2011-12-05 00:35:44 -08:00
fabrixxm
43040faf22 move send private message code out of view code 2011-08-19 16:54:41 +02:00