Commit graph

38 commits

Author SHA1 Message Date
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
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -08:00
friendica
ddc8557b69 hide online presence maps to DNT 2014-11-24 15:36:11 -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
Thomas Willingham
90378e8ef8 Silence insanely noisy log - should probably stick this in a dlogger
if we need it - we're getting literally hundreds of thousands of these.
2014-09-29 19:06:43 +01:00
Klaus Weidenbach
2681071970 Some documentation of include/config.php.
I hope my guesses are not completely wrong, anyway please take look
not that I tell complete bullshit.
2014-09-26 22:28:35 +02:00
friendica
3f337dad2c file had wrong extension 2014-03-11 21:45:20 -07:00
friendica
2c75210fdb config: don't try to unserialise an array 2014-02-01 20:07:47 -08:00
friendica
e369e5ddc5 The check for f*cked database (which otherwise sends out zillions of update failed emails) interferes with install. So what else can we do about f*cked databases which open successfully but don't actually read/write data? It would of course be nice if we didn't have to deal with them, but apparently we do. For now we're not doing anything until I can figure out how to take the site offline when it happens without affecting install. 2013-10-04 14:42:18 -07:00
friendica
6519433301 suppress creating the directory update record for profile updates which are part of the normal import_xchan sequence - otherwise we get two for every change. Create it normally if we are called with a profile_update message and don't go through the whole import_xchan thing. 2013-09-25 21:22:36 -07:00
friendica
ca5abc0247 load_pconfig had some issues when given a family 2013-07-29 05:37:05 -07:00
friendica
57c7f725f6 begin code to sync channel changes across all channel clones. 2013-06-25 18:15:17 -07:00
friendica
f835737cb7 fix some anomolies in config functions 2013-06-21 21:36:48 -07:00
friendica
c0cc494bf3 fix mod-display when not logged in. 2013-06-18 02:06:16 -07:00
friendica
5f84e3940d much more efficient config functions. This will save potentially hundreds of DB lookups - still need to update the xconfig but want to give the others a good workout as it has been one of those days. 2013-06-17 20:16:50 -07:00
friendica
b7854c89b1 silence a pointless warning 2013-06-15 02:15:45 -07:00
friendica
765d6e0a97 push refresh messages, performance work on conversations and configs, doc updates 2013-06-14 16:54:58 -07:00
friendica
cb0a90d628 small updates 2013-05-08 21:30:54 -07:00
friendica
5a29f511c1 add xconfig table and functions, update strings and doco 2013-03-15 15:36:58 -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
friendica
38344798f2 rev update 2012-09-02 01:59:11 -07:00
friendica
7c2d27e275 rev update 2012-06-16 17:29:42 -07:00
Hauke Zuehl
1231dd72f0 Check if $rr exists 2012-06-16 15:07:23 +02:00
Michael Vogel
7f19d39b14 Doing negative caching for config values, special logfile for database optmisations 2012-05-26 15:41:23 +02:00
Michael Vogel
a71e3134bf Merge remote branch 'upstream/master' 2012-05-25 16:19:10 +02:00
Tobias Diekershoff
5dad99888d fix setting array values to config items 2012-05-22 11:56:49 +02:00
Michael Vogel
8c80fe0bf5 Performance tests 2012-05-20 00:11:32 +02:00
Vasudev Kamath
41d74c0868 Another bunch of executable permission removal 2012-04-14 20:16:06 +05:30
friendica
665b2c8107 revert config changes, we're getting duplicate keys 2012-04-06 03:10:46 -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
Alexander Kampmann
cbf4544887 added index to config and pconfig table
changed config.php to use REPLACE instead of INSERT, 
this removes one db hit.
2012-04-05 13:27:09 +02:00
friendica
71671e5b9a fix config storage of booleans 2012-04-04 17:51:59 -07:00
root
aa92901b11 Wrong variable name 2012-02-26 14:29:17 +00: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
Fabio Comuni
a6f3b58293 config: set/get arrays with pconfig 2011-12-19 18:01:38 +01:00
Friendika
ee6806d82b never enough comments 2011-08-10 01:19:27 -07:00
Friendika
8b31ff15f5 breaking up boot file (part of zot refactor) 2011-08-01 16:51:01 -07:00