Commit graph

135 commits

Author SHA1 Message Date
redmatrix
f7f0d2b265 provide plugin hooks for blacklist checking functions. 2015-12-06 20:45:21 -08:00
redmatrix
ca55bbdaed use the std_version where applicable instead of matching to the git. 2015-12-03 17:09:05 -08:00
redmatrix
650f882265 generalise the site black|white allow lists, also add a channel black|white list for future use 2015-11-29 20:26:00 -08:00
redmatrix
a2747403f2 report correct directory mode for standalone directories in siteinfo 2015-11-29 19:45:29 -08:00
redmatrix
3f9412add2 create get_site_info() function so we can have a siteinfo.json module instead of or actually in addition to siteinfo/json 2015-11-29 19:37:03 -08:00
ken restivo
fabf7081d3 Use http_status() instead of homegrowing it. Adapt http_status to handle replies with data. 2015-11-20 18:56:41 -08:00
redmatrix
c4a3487f0c remove the obsolete avatar_img function (gravatar/libravatar lookup) 2015-11-09 20:29:36 -08: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
bf5a1f662a generate all (non-square) photo scales - even if the original photo is smaller than the scale target sizes. 2015-10-15 14:18:40 -07:00
redmatrix
cc95c3e9c8 start hooking in the new webfinger/zot merged discovery 2015-09-17 18:36:19 -07:00
redmatrix
f0a7a6a1e2 consolidate zotfinger and webfinger 2015-09-17 17:51:31 -07:00
redmatrix
2d94a038a5 ensure connections have a name 2015-09-10 01:21:18 -07:00
redmatrix
6cc60ba477 initial work on obj import, rename import_profile_photo to import_xchan_photo to more accurately state its purpose. 2015-09-01 22:03:10 -07:00
redmatrix
b737e224b1 more work separating Diaspora from core 2015-08-03 16:52:51 -07:00
redmatrix
c0e67db070 refresh diaspora xchan every month or so since receiving profile update messages from that network reliably are just as unlikely as receiving any other kind of message from that network reliably. The problem is that if somebody changes their profile name or photo once every few years and you miss it because of their shitty unreliable communications, your data could be stale for a long time. 2015-07-22 19:02:45 -07:00
redmatrix
c90f14c066 Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	doc/to_do_code.bb
2015-07-21 17:13:48 -07:00
Mario Vavti
4d45bc9da1 Fixes regarding the new default profile photo size. The default profile photos are just renamed. People which provided the originals are invited to reproduce them in the new 300 by 300 px format. 2015-07-20 21:01:11 +02:00
redmatrix
6e8ad5089e Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts:
	view/nl/messages.po
	view/nl/strings.php
2015-06-29 18:01:51 -07:00
redmatrix
0b012e2995 some prep work 2015-06-29 16:56:18 -07:00
redmatrix
a6cb90c81c Merge branch 'master' into tres
Conflicts:
	include/Import/refimport.php
	include/activities.php
	include/attach.php
	include/event.php
	include/externals.php
	include/identity.php
	include/items.php
	include/notifier.php
	include/photos.php
	include/taxonomy.php
	include/zot.php
	mod/channel.php
	mod/connedit.php
	mod/events.php
	mod/item.php
	mod/like.php
	mod/manage.php
	mod/mood.php
	mod/ping.php
	mod/poke.php
	mod/subthread.php
	mod/tagger.php
	mod/thing.php
2015-05-14 18:02:29 -07:00
redmatrix
f2a0dac653 fix a couple of miscellaneous errors which showed up in the logs 2015-05-11 22:57:12 -07:00
friendica
6679734135 Merge branch 'master' into tres
Conflicts:
	include/Contact.php
	include/ItemObject.php
	include/api.php
	include/attach.php
	include/diaspora.php
	include/dir_fns.php
	include/enotify.php
	include/event.php
	include/expire.php
	include/items.php
	include/notifier.php
	include/notify.php
	include/photos.php
	include/taxonomy.php
	include/text.php
	include/widgets.php
	include/zot.php
	mod/admin.php
	mod/channel.php
	mod/dirsearch.php
	mod/display.php
	mod/editwebpage.php
	mod/events.php
	mod/home.php
	mod/item.php
	mod/manage.php
	mod/mood.php
	mod/network.php
	mod/page.php
	mod/photos.php
	mod/ping.php
	mod/post.php
	mod/thing.php
	mod/viewsrc.php
	view/css/mod_events.css
2015-04-23 19:49:41 -07:00
Klaus Weidenbach
d0361582b0 Correcting reported Doxygen syntax warnings.
Fixed wrong Doxygen syntax and add some of the available FIXME to
Doxygen documentation.
Updated Doxygen configuration to add also all capital letter tags.
Adding some more Doxygen documentation.
2015-03-29 22:23:00 +02:00
Klaus Weidenbach
daed7fbead Bugfix und variable initialization.
Fixed a wrong perm_is_allowed() parameter, commented some other places
where we use variables that are not set and should not work.
2015-03-21 22:28:07 +01:00
friendica
410f3335a9 parse_url: if url returns an image/audio/video file instead of a webpage, return the bbcode for the appropriate content type. This results in two web fetches of the url in question, but the first one is just a HEAD. This way we won't try and download and parse an entire video. TODO: img's are checked to see if they should be zid-ified, but audio/video currently are not. 2015-03-04 15:17:39 -08:00
friendica
fbbcc10025 apply fix from 8d03774 to z_post_url also 2015-02-23 11:33:16 -08:00
zottel
8d03774666 make redirections restriction in z_fetch_url() work 2015-02-23 14:53:10 +01:00
friendica
d473c3c500 fix for service_plink() after observing it in the wild 2015-02-09 00:43:38 -08:00
friendica
08b757a22c Merge branch 'master' into tres
Conflicts:
	mod/events.php
	view/css/mod_events.css
2015-02-08 20:57:37 -08:00
friendica
64191de5e7 generate the correct service permalink 2015-02-08 18:31:51 -08:00
friendica
ac594183c6 Merge branch 'master' into tres and add some work on the item_deleted flag refactor
Conflicts:
	include/attach.php
	include/onedirsync.php
	include/zot.php
	mod/locs.php
2015-01-26 18:27:03 -08:00
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
ee3eee425c that should take care of the bitfields in hubloc 2015-01-20 16:13:18 -08: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