Commit graph

407 commits

Author SHA1 Message Date
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
b8add899a2 undo extra logging 2015-02-08 19:28:18 -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
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
friendica
3d0d36b2bc fix diaspora reshare tags 2014-10-10 19:14:37 -07:00
friendica
191ef124cf add 'nopush' option to the post API so somebody could bulk load a bunch of existing content via the API without invoking the notifier and sending each out as a fresh post. 2014-10-05 01:09:57 -07:00
friendica
87a6f25769 try to sort out walltowall translation for diaspora recipients 2014-09-19 02:22:24 -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
7001f41d3d provide a config option to prevent wall uploads (photos and files) from being set to the same ACL as the containing post, and instead are uploaded with public visibility (no ACL). This is to prevent folks on other networks from seeing prohibited signs for things uploaded into a private conversation. It is primarily useful when posting to collections that have mixed folks from red and other networks and an otherwise public (typical) profile. Consequently, these uploads will match your chosen default visibility for photos and storage and not that of the containing conversation item (and is only useful if the default visibility is public). This choice must be explained adequately because it represents a complex series of tradeoffs and side effects. It will reduce complaints from other networks about blocked content, but essentially forces you to use another method (dav or the photos page) if you wish to upload protected files/media. 2014-09-02 21:11:09 -07:00
friendica
88f8900ac5 various diaspora issues 2014-08-29 17:31:40 -07:00
friendica
5d2dc4e8fd switch everything over to crypto_encapsulate() 2014-08-23 02:45:21 -07:00
friendica
831714f0f0 profile edit - missing visibility and drop link on non-default profiles, re-arrange order of replacing red#matrix smilie so it works correctly, accept a post with body content of '0' which was interpreted by x() as nothing (was treated as integer). 2014-08-21 16:46:24 -07:00
friendica
b9dffa9107 escape tags when using markdown. Strange things happen if you put HTML entities in the text. 2014-08-14 18:00:48 -07:00
friendica
5dab65d783 make mention tagging by webbie do the right thing. 2014-08-10 20:38:14 -07:00
friendica
e9caf9db6a a couple of "not quite public" fixes 2014-08-08 15:27:17 -07:00
friendica
2cff122d6f public scope delivery issues 2014-08-06 21:16:24 -07:00
friendica
86bccf35a2 basic 'notpublic' bits working 2014-08-06 19:24:46 -07:00
friendica
10641b5598 issues #542 #543 - mentions not linked on editing a post if they contained a forum indicator. 2014-07-24 16:48:58 -07:00
friendica
7b1901c2c2 turn that into a feature 2014-07-02 16:53:40 -07:00
friendica
c037a5083c optionally allow zrl usage from specific markdown sources 2014-07-01 18:38:44 -07:00
friendica
fc69220b94 easter egg 2014-07-01 18:21:22 -07:00
friendica
0074ef0bf3 rule of snakes #1, kill the snake.
tinymce is gone. if you want a visual editor, figure out what you want and make it happen.
If you don't want a visual editor, do nothing.
This is in the community's hands. I don't need a visual editor.
2014-06-28 05:05:34 -07:00
friendica
8b545d91db notification being sent for comments from blocked connections on same site. 2014-06-26 16:24:53 -07:00
friendica
525daa7475 fix space around brackets changing. 2014-06-19 20:38:38 -07:00
friendica
72f00d6e04 issues with editing webpage permissions 2014-06-15 18:58:02 -07:00
friendica
2d6a1795b7 ensure item_private tracks acl fields on edit 2014-06-15 02:32:12 -07:00