aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'upstream/master'Habeas Codice2014-11-131-3/+14
|\ | | | | | | | | | | | | | | | | | | | | | | 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
| * tgroup_check - decrypt if obscured before checking body text for resharesfriendica2014-11-071-1/+9
| |
| * various UI issues related to having an enormous number of entries in the ↵friendica2014-11-031-2/+5
| | | | | | | | posted_date selector including years/months that had no posts
* | PostgreSQL support initial commitHabeas Codice2014-11-131-47/+47
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* What this checkin does is catch the case where a comment arrived and there's ↵friendica2014-10-301-3/+18
| | | | a missing top-level post to match it with. So we'll send a request back to the sender that you've never seen this thread and please send a fresh copy of the entire conversation to date. We could soon have posts in the matrix from different platforms from days gone by, which have been migrated into the modern world. We'll be polite and not deliver these to everybody. However, if someone comments on one of these antique threads we wouldn't be able to see it in our own matrix because we won't have a copy of the parent post. So this rectifies that situation. Be aware that item deletion may need to change to keep "hard deleted" items indefinitely so that they don't keep coming back. We'll have to null out the important data of the former item to accomplish the deletion aspect.
* doh - this needs to be markdown, not bbcodefriendica2014-10-241-2/+2
|
* diaspora walltowall comment signature, force update.friendica2014-10-231-1/+1
|
* Provide comment box for PERMS_AUTHED items. Presently only commentable from ↵Thomas Willingham2014-10-231-0/+1
| | | | owners wall.
* improved wall-to-wall detection for comments so we can handle Diaspora ↵friendica2014-10-221-2/+11
| | | | | | | 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.
* you've gotta' be on your toes to catch this bug... though it's been here for ↵friendica2014-10-221-2/+2
| | | | about 2 1/2 years and even survived a rewrite. Symptoms are that the archive widget only lists one month (the month when you first posted), and only if your first post was written between the 28th and 31st of whatever month that was.
* private forum issuesfriendica2014-10-211-0/+1
|
* content deletion issuefriendica2014-10-121-1/+6
|
* missing source route after editfriendica2014-10-101-1/+1
|
* allow (our own) ajax urls to pass through bbcode intact.friendica2014-10-091-0/+1
|
* return of the missing diaspora wall-to-wall attributionfriendica2014-10-091-12/+0
|
* Merge pull request #626 from habeascodice/masterRedMatrix2014-10-081-1/+1
|\ | | | | regex missing terminator char
| * regex missing terminator charhabeascodice2014-09-291-1/+1
| |
* | issues with diaspora comment signatures on relayed comments that are relayed ↵friendica2014-10-021-4/+6
|/ | | | through a redmatrix site (parent post is redmatrix) and involve a private post.
* optionally include wall items (posts) in import/exportfriendica2014-09-251-1/+23
|
* TypoThomas Willingham2014-09-251-1/+1
|
* if no rss/atom element author, use feed level contactfriendica2014-09-241-7/+11
|
* make it the defaultfriendica2014-09-241-21/+20
|
* one step closerfriendica2014-09-241-1/+3
|
* more testingfriendica2014-09-241-3/+18
|
* just an experiment - don't do anything with this until I'm finished with it.friendica2014-09-241-0/+9
|
* fix url mismatches of a single trailing slash for feed author/owner ↵friendica2014-09-231-0/+3
| | | | comparisons; update diaspora_compat
* diaspora private mail seems to work now - but there's an obfuscation leak ↵friendica2014-09-231-1/+2
| | | | via the conversation structure that needs to be dealt with.
* feeds with '@' in the URL were being handled as webfinger addresses and ↵friendica2014-09-211-0/+1
| | | | didn't fall through to RSS discovery. Issue #599
* try to sort out walltowall translation for diaspora recipientsfriendica2014-09-191-10/+2
|
* use the more portable encoded_item format for exported items - but with ↵friendica2014-09-161-3/+25
| | | | added attributes so we can use it as a reasonably complete item backup. The encoded_item format gives us extended author and owner information in case we need to probe them to bring the entry back. It also contains taxonomy entries. Importing and/or recovering will best be accomplished in chunks. It could take some time and some memory to chew through this.
* privacy issue - restrictive stream permission setting with a non-targetted ↵friendica2014-09-141-2/+20
| | | | post cannot be enforced on remote networks. Restrict these posts to zot network.
* doc updates and a couple of issues spotted in the logs (diaspora likes, feed ↵friendica2014-09-121-1/+1
| | | | author import)
* correct item author for feeds with multiple or different authorsfriendica2014-09-111-8/+90
|
* encrypt diaspora_meta since it may contain private message contentsfriendica2014-09-101-1/+4
|
* encode rss message-id's - warning this will double store all existing rss ↵friendica2014-09-091-9/+8
| | | | feed items and probably make a mess of things
* This is long overdue - use a symblic constant NULL_DATE instead of the ↵friendica2014-09-081-14/+14
| | | | easily mis-typed sequence '0000-00-00 00:00:00'
* import_profile_photo array warningsfriendica2014-09-081-2/+2
|
* import_author_rss not succeeding, missing urlfriendica2014-09-041-4/+5
|
* unset item_nocomment when starting a new delivery chainfriendica2014-09-041-1/+8
|
* oops forgot about the privacy exclusionfriendica2014-09-041-4/+5
|
* allow stuff with Diaspora authors to federate in zot conversations even if ↵friendica2014-09-041-0/+17
| | | | the local site has diaspora disabled. This way it won't look like folks are talking to themselves.
* store diaspora meta info in the item table. It has to go there or it will ↵friendica2014-09-031-1/+12
| | | | kill us with complex joins. We can phase out the sign table once this all checks out.
* outbound feed issuefriendica2014-09-031-2/+2
|
* fix phantom attachments in feedsfriendica2014-09-011-1/+1
|
* issue #578 - this won't fix old items but should work going forward. The ↵friendica2014-09-011-1/+1
| | | | extra time slop shouldn't be needed and will in fact result in possibly undesired redundancy.
* get out the sunniesfriendica2014-08-311-1/+1
|
* various rss fixesfriendica2014-08-311-11/+20
|
* doc change - read it.friendica2014-08-301-0/+3
|
* insecure network filterfriendica2014-08-301-1/+40
|
* various diaspora issuesfriendica2014-08-291-2/+48
|