Commit graph

19 commits

Author SHA1 Message Date
redmatrix
25b599a4bd convert ITEM_WALL from bitfield to standalone 2015-05-06 21:03:33 -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
friendica
a496036066 local_user => local_channel 2015-01-28 20:56:04 -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
16b94f1dc0 issues with diaspora comment signatures on relayed comments that are relayed through a redmatrix site (parent post is redmatrix) and involve a private post. 2014-10-02 02:43:07 -07:00
friendica
24db2e4468 remember activity setting 2014-08-10 18:18:41 -07:00
friendica
b2feb26492 clean up the awful descriptive text on thing input 2014-06-23 17:05:03 -07:00
friendica
2c1b366fdf make activities optional for profile things, clean up the forms 2014-02-12 14:44:27 -08:00
friendica
7f3f981d96 fix a mysql error which popped up in the dbfail log 2014-02-11 20:45:17 -08:00
friendica
b5728fa42e fixes to thing profile assignments 2014-02-11 16:56:39 -08:00
friendica
4c541bb680 expose profile things in the UI 2013-12-30 15:41:42 -08:00
friendica
0dd7d93674 basic edit and delete for things 2013-12-30 04:25:55 -08:00
friendica
f36be066af display_thing: it ain't much, but it's implemented. 2013-12-29 00:51:27 -08:00
friendica
1d0fddd39c things can now have (consistent sized) photos - plus I found a couple of issues with duplicate notifications and contact photos not getting an album name (it was crossed with filename). The last one doesn't matter as neither is used, but it was wrong so it has been corrected. Oh and thing photos weren't working at all because the form element name was different than what the module was looking for. But that had never been tested as I was waiting to get the import/resize finished. Next up for that module is display and deletion of things; but the priority is pretty low. 2013-12-28 13:28:49 -08:00
friendica
8b9f2f8ef7 input form for profile stuff 2013-07-04 20:35:42 -07:00
friendica
6f390330ff nearly ready for the output template 2013-07-03 22:51:49 -07:00
friendica
fbdee83dca some object/thing tweaks 2013-07-03 20:37:39 -07:00
friendica
8ec5f8b07a $yoursite/thing?f=&verb=has&term=big+balls
These will eventually be listed by category in your profile and you will be able to have different lists in different profiles (which is why the multi-profile feature needed to get finished before I could get any further along on this...)
 have fun
2013-07-03 19:30:52 -07:00
friendica
cdc66da52f Basic ability to create "things" 2013-06-27 19:35:59 -07:00