Commit graph

68 commits

Author SHA1 Message Date
friendica
3eeea9d8f0 force event obj_type on update 2015-04-20 17:02:45 -07:00
Klaus Weidenbach
42c820029e Fixed two wrong variable usages in event.php.
I just checked the code, not the functionality.
2015-03-29 21:16:21 +02:00
friendica
98b88d7d2f ical output wasn't using 24-hour time 2014-11-24 18:46:14 -08:00
friendica
53dc9cf2eb basic vcalendar formatting support 2014-11-23 20:29:34 -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
0ebfee8f87 wrong permalink on remote events 2014-10-23 01:36:40 -07:00
friendica
ed847a91f6 add categories to events 2014-09-07 22:14:28 -07:00
friendica
913fd1d22e numerous event fixes - mostly related to editing an event 2014-07-06 22:31:39 -07:00
friendica
c034cb5d71 make system generated birthday events un-commentable since comments won't go where you think. 2014-06-03 13:45:35 -07:00
friendica
2386bc4d00 bring back birthdays 2014-06-02 17:49:19 -07:00
friendica
3821efb99e issue #477 2014-06-01 01:30:34 -07:00
friendica
832cbbec15 testing new event code 2014-05-29 21:25:19 -07:00
friendica
6e0cc25a90 more work on new event code 2014-05-29 19:48:54 -07:00
friendica
dac7f68914 event_addtocal function for storing received events 2014-05-29 17:52:11 -07:00
friendica
a3487efd57 start to tie in the new event logic 2014-05-29 17:09:14 -07:00
friendica
118b4c88bd split event storage into two bits - separate the event storage from the associated item storage 2014-05-29 16:23:20 -07:00
friendica
a00103b7df better event management 2014-05-07 22:23:43 -07:00
friendica
55fe471ce8 version update 2014-03-11 15:29:26 -07:00
friendica
db8ebc9f37 some minor cleanup on plinks for some very subtle permissions issues 2014-01-09 15:45:17 -08:00
friendica
1a42580ad4 remove a couple of mysql reserved words from being used as table or row names. For this round we're getting 'group' and 'desc'. Warning: potentially destabilising as this touches a lot of code. 2013-12-22 18:37:39 -08:00
friendica
3e5414cf35 provide detailed error to remote site for the myriad of things that can go wrong inside item_store(), !! this changes the return of item_store !! 2013-09-10 19:06:06 -07:00
friendica
0999b88a48 Merge https://github.com/friendica/red into zpull 2013-03-21 18:29:08 -07:00
friendica
ddf5bf8968 rename 'uri' (and parent_uri) to 'mid' (and parent_mid) since these no longer remotely resemble uri's and are actually message_id's. This change is potentially destabilising because it touches a lot of code and structure. But it has to get done and there's no better time than the present. 2013-03-21 18:25:41 -07:00
Michael Johnston
fea2f9ac9b small fixes for events 2013-03-21 21:07:38 -04:00
friendica
26499981b6 cleanup 2013-03-10 20:39:27 -07:00
Michael Johnston
41cd10f903 some fixes related to events
- add backticks around column "desc" in sql query
    - fixed query for data passed to showEvent
      - showEvent was picking up on id from item instead of id from event
    - fixed references to author info in template
2013-03-07 02:07:51 -05:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
friendica
127b605f32 preserve event item[uri] if present 2013-01-20 15:36:04 -08:00
friendica
45be26dd81 more heavy lifting on API - though need to re-visit events and give them all message_ids from the origination site. 2013-01-19 22:21:00 -08:00
friendica
af066d7383 mopping up the events issues so I can move on to other stuff 2013-01-16 03:18:32 -08:00
friendica
a9f4a47a35 import events (not just event posts) from zot 2013-01-16 00:59:43 -08:00
friendica
ddd8a0e062 still some bugs but events are happening again. 2013-01-15 20:13:25 -08:00
friendica
275fa6e1d2 events backend heavy lifting - the new structure is slowly emerging. 2013-01-15 17:59:49 -08:00
friendica
ed275cd40d slow progress on events, one step forward, one step back. 2013-01-15 16:48:59 -08:00
friendica
da188214c3 events are still buggered and aren't anywhere close to working, but not buggered quite as much as before. 2013-01-07 15:12:16 -08:00
friendica
794c92a8fb wall posts now display - address book structure revamp started 2012-10-10 17:58:56 -07:00
friendica
e124c9fa5c Can't see any posts currently - after the big shakeup, but we can now post top level activities and store them. 2012-10-03 22:28:19 -07:00
friendica
f7c6a6ff90 item table rename parent-uri, target-type, object-type (more to come later) 2012-08-15 22:33:37 -07:00
friendica
fbaca4b742 event summary/title 2012-06-25 20:55:27 -07:00
Tobias Hößl
dfef0ec84d Add two hooks, event_created and event_updated. One Bugfix for the <id>...</id> tag ($uri was never defined). Commented out the parse_event() function - its never called and would lead to a program abortion due to a broken require_once at the beginning 2012-05-29 19:03:30 +00: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
Tobias Hößl
35128ef2c9 Avoid a Notice 2012-02-27 22:01:17 +00:00
Tobias Hößl
4b1de0f538 Avoid some notices 2012-02-26 20:43:51 +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
Friendika
01164c8c2f fix various html parse errors 2011-10-20 16:48:07 -07:00
Friendika
278433eac7 origin flag handling, and bug #137 - provide timezone conversion for events posted across to Diaspora 2011-10-17 14:52:03 -07:00
Friendika
b721fabc3c show lock icon on private events 2011-07-27 02:21:55 -07:00
Friendika
c17890ab62 privacy settings on event item not propagated correctly 2011-07-26 22:40:11 -07:00
Friendika
6e5532149a missing minutes in event listings 2011-06-30 23:27:16 -07:00
Friendika
8ffcd4323b never enough comments 2011-06-23 18:56:24 -07:00