Commit graph

35 commits

Author SHA1 Message Date
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
friendica
76fedfe1f8 openid stuff 2015-03-11 21:49:29 -07:00
friendica
51848c6190 working through the xchan table to remove bitfields, mostly complete except for updating the updater 2015-01-20 19:33:19 -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
4d049741ef try and guess mimetype for openid profile photo 2014-10-05 17:17:25 -07:00
friendica
39f18d0f16 fix third-party zid's 2014-03-04 15:25:04 -08:00
friendica
5b4e3f46bc minor stuff, some doco, auth cleanup, and make "unknown" more translateable by context. 2014-02-22 14:58:12 -08:00
friendica
24d119b8c4 introduce a new privacy level "PERMS_AUTHED" to indicate somebody that is able to successfully authenticate (but is not necessarily in this network). 2014-02-18 20:59:25 -08:00
friendica
5747e20e50 some more snakebite and fix up include/account - forgot about that inline array stuff 2014-02-18 16:59:31 -08:00
friendica
9a51f8ce65 edit bookmarks 2014-02-18 14:26:23 -08:00
friendica
d5c55250f9 remove the exit clause 2014-02-17 20:24:34 -08:00
friendica
ea709361f6 snakebite, cont. magic-auth via openid is now possible, with the caveat that one needs a hand-crafted xchan at the moment to make use of it and if you wish to do so, there will be no assistance or help provided. The risk of system instability and mangled DBs now and going forward is significant if you try this. 2014-02-17 20:10:43 -08:00
friendica
d6ab975b18 operation snakebite continued. openid now works for local accounts using the rmagic module and after storing your openid in pconfig. This is just an interesting but trivial (in the bigger scheme of things) side effect of snakebite. The snake hasn't even waken up yet. 2014-02-17 19:48:05 -08:00
friendica
f6d198ce5d trim a bit of fat 2012-08-29 23:03:03 -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
b8f6312408 cleanup after openid refactoring 2012-03-19 15:10:14 -07:00
friendica
9e133d6412 refactor openid logins/registrations 2012-03-19 15:03:09 -07:00
friendica
139a86dbd3 some openid fixes, use identity url from openid server and normalise it. 2012-03-19 06:48:11 -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
4b6990e1ff modularise successful authentication 2012-01-12 15:46:39 -08:00
Friendika
5b3f645939 account expiration structures 2011-09-18 19:53:45 -07:00
Friendika
8f6ae2b660 missing salmon key? report it. 2011-08-24 20:40:08 -07:00
Friendika
2637831d90 some more zot changes migrating back to f9a mainline 2011-08-01 21:02:25 -07:00
Friendika
78b2db3a98 Merge branch 'fabrixxm-master'
Conflicts:
	boot.php
2011-05-23 18:17:02 -07:00
Friendika
3e6180183b improved browser language detect, set user language on login 2011-05-23 17:18:36 -07:00
Fabio Comuni
e1107b55c6 add info() function. Works like notice() but show messages in a div with class info-message.
update code to use info() instead of notice() when appropriate (non-error message)
add info-message class style in themes
2011-05-23 11:39:57 +02:00
Friendika
a0e7d8fa00 redirect to profile photo upload on very first login 2011-04-23 17:31:23 -07:00
fabrixxm
9f7878057f update source strings 2011-03-11 00:22:21 +01:00
Friendika
377f991ac5 switch identities to manage pages 2011-03-01 20:18:47 -08:00
Friendika
5bfb0ba4c2 birthday notifications working 2011-01-13 20:28:33 -08:00
Friendika
f60f82727f register/login timestamps 2010-12-16 16:35:45 -08:00
Friendika
62bb471ba0 localise login template, allow openid to be disabled 2010-11-28 20:58:23 -08:00
Friendika
dd52aec243 use optional openid photo for registration - if supplied 2010-11-23 20:56:20 -08:00
Friendika
90b601c3dd openid registration 2010-11-17 20:35:50 -08:00
Friendika
875b31fb8e openid logins working 2010-11-17 17:03:27 -08:00