Commit graph

103 commits

Author SHA1 Message Date
Christian Vogeley
ba10833bc5 Check allowed emails, also add blacklisting for
not allowed emails:
config:'system','not_allowed_email'
2015-01-25 04:16:28 +01:00
friendica
4b9ed48a54 don't let dns_get_record() "write to screen" if it errors. 2015-01-06 14:50:29 -08:00
friendica
17e27d0d87 add Thomas's Diaspora repair script as include/fixd.php - altered so it can be re-run if necessary with a count of remaining hublocs to be fixed. Some sites are down so it probably can't ever get to zero. The check for a null join is quite an expensive query. It could block your DB for a couple minutes while it runs.
Also some preliminary work on a means to take the channel module out of list/forum mode if a specific mid is requested.
2014-12-16 00:25:41 -08:00
Thomas Willingham
204a2c94cd Undo accidental reversion included in last checkin 2014-12-15 15:59:47 +00:00
Thomas Willingham
372b7b1405 Doco: How to write foreign doco in how to write doco doco. 2014-12-15 15:56:00 +00:00
Thomas Willingham
3867081503 Let Diaspora hublocs come back by allowing discover_by_webbie() to carry on if
and look for a hubloc even if an xchan is found.

You'll probably need to loop through the missing ones manually.
2014-12-13 20:20:55 +00: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
3d56bb5cd7 this bug has been there for a *long* time. First time I've ever seen it triggered. 2014-10-13 16:21:02 -07:00
friendica
53d0e855df z_post_url_json() added to easily deal with JSON post APIs; without getting content-type unknown warnings/errors. Also added a debug option to z_get|post_url so you could track and log some of these nasty little buggers. 2014-09-16 20:46:44 -07:00
friendica
c4608d4c82 just mark dead hubloc deleted - don't remove them. This could cause problems. Also clean up fetch_url/post_url header option 2014-09-16 19:07:19 -07:00
friendica
409c89d629 doco correction 2014-09-09 04:10:01 -07:00
friendica
386156138f syntax error in dba driver, document z_post_url 2014-09-09 02:42:07 -07:00
friendica
ca2bf76b06 allow stuff with Diaspora authors to federate in zot conversations even if the local site has diaspora disabled. This way it won't look like folks are talking to themselves. 2014-09-04 01:13:01 -07:00
friendica
c7decf70a2 feed removal issue 2014-09-02 17:43:42 -07:00
friendica
2c94d59cba use feed title for channel name before checking author, make feed items shareable (they're private to the channel so they won't be shown in searches), try and handle Diaspora mentions a bit more elegantly. (Bug: we don't convert mentions to Diaspora's format on outbound at all!) 2014-09-02 17:21:12 -07:00
friendica
a2146021f3 use feed icon as default avatar for rss connections 2014-09-01 16:32:35 -07:00
friendica
f8e6395ef3 rss feed discovery 2014-08-31 18:50:30 -07:00
friendica
eb8f194419 sort out some anomalies 2014-08-25 21:42:46 -07:00
friendica
e0ee66d0b4 Add d* folks to address book. WARNING - DO NOT ATTEMPT THIS. LEAVE IT THE FRUCK ALONE until the feature is stable. I won't help you if you try this and end up with a borked site. You are completely on your own. 2014-08-24 17:52:26 -07:00
friendica
5cba209604 diaspora discovery 2014-08-24 04:27:10 -07:00
friendica
a6829f7dcb move Friendica photo migrator to addons, bring back a few XML scraping functions that we're going to require (unfortunately) 2014-08-20 17:15:13 -07:00
friendica
c7fe071a1f some work on network discovery 2014-08-19 19:38:42 -07:00
friendica
c037a5083c optionally allow zrl usage from specific markdown sources 2014-07-01 18:38:44 -07:00
friendica
f6de9c09fb logging: include target url when reporting z_fetch_url and z_post_url errors. 2014-05-27 21:21:38 -07:00
friendica
7375e30506 This should be a slight improvement in setting ciphers - we'll punt on RedHat but open up the list just for openssl distros which seem to have all the problems at the moment. 2014-03-25 15:19:18 -07:00
friendica
235b033560 that should fix it. 2014-03-24 19:01:20 -07:00
friendica
10f1867521 that didn't work out well 2014-03-24 18:42:54 -07:00
friendica
e6ea4a7574 ssl ciphers - be liberal in what we accept, conservative in what we generate 2014-03-24 17:16:01 -07:00
friendica
b6b4ffa68d add curl error text to mod/probe so we can remotely diagnose communication issues from other sites. 2014-03-23 15:24:38 -07:00
friendica
7666aaea6a improve curl error logging 2014-03-23 14:45:08 -07:00
Michael Meer
c5ac5544cb clean up logger commands. Placed apostrophs at the end from some comments to keep the syntax highlighting in vi working 2014-01-30 11:04:20 +01:00
Michael Meer
0a2b2a1390 attempt with fix URL for testing works 2014-01-30 10:39:09 +01:00
friendica
7c81889b33 make default profile photo configurable - should be functional but needs admin ui 2013-12-19 16:33:36 -08:00
zottel
3a11980e49 htmspecialchars_decode only takes one argument. 2013-12-12 13:32:11 +01:00
friendica
303324cdff more htmlspecialchars sanitisation 2013-12-12 02:15:02 -08:00
friendica
75ebf06131 some work on modularising the default profile photo so we can make them site selectable. Also red != friendica so we don't need all these friendica logos taking up space 2013-12-09 14:05:52 -08:00
friendica
55d8ed17a7 trimmed style.css by a few hundred lines. Needs many more such efforts 2013-12-01 21:11:47 -08:00
friendica
92f60ef51f get rid of deprecated post_url() function 2013-12-01 19:52:18 -08:00
friendica
d43118fdcf get rid of fetch_url - post_url will be a bit harder as several plugins need to be updated 2013-12-01 00:35:35 -08:00
friendica
bd33e0486d deprecate a->get_curl_code() and $a->get_curl_headers() 2013-12-01 00:16:02 -08:00
friendica
14f6bf06e7 set default charset of email_header_encode, add ud_flags to indicate which (directory sync) updates have been processed in some way. 2013-09-18 21:22:08 -07:00
friendica
72f562c190 z_fetch_url - include curl debug info in return array and log it (at logger_data level) on failure
This should probably be at a lower log level, but unsuccessful connections could happen a lot on a busy production site so we'll try to keep the log noise down unless somebody really needs to track this info.
2013-09-10 17:09:10 -07:00
friendica
5e235fba78 make manual image scaling work - even if auto scaling kicks in. 2013-06-23 23:13:07 -07:00
friendica
72e83f69bc photo driver abstraction 2013-04-25 20:01:24 -07:00
friendica
d3b5e67890 odds and ends in prepearation for photo abstraction, plus red-to-friendica addon 2013-04-25 01:55:35 -07:00
friendica
7e6890832b turn all Red links into zrls (not the old zrls, the new bbcode zrl which means we can zidify them) 2013-04-15 03:00:08 -07:00
friendica
ab5151c470 more Friendica removals 2013-04-14 22:44:11 -07:00
friendica
8148b7c32f update manage table and some documentation 2013-03-27 19:02:01 -07:00
friendica
b69fca14e7 initial doco 2013-02-26 15:49:37 -08:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00