Commit graph

124 commits

Author SHA1 Message Date
friendica
756abd6678 add event export (this month) to event UI 2014-11-24 02:50:14 -08:00
Stefan Parviainen
c1b8608940 Switch to a better datetime picker widget 2014-11-16 13:56:45 +01: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
Stefan Parviainen
c8666b9076 If entered event info is not valid, let user try again with the old info still there. Closes friendica/red#648 2014-10-21 18:28:47 +02:00
Stefan Parviainen
a6c4ae186e Don't display date format, it's already in the placeholder text 2014-10-19 11:09:51 +02:00
Stefan Parviainen
519ef48500 Changes in the datetimesel api, prevent user from picking event end date earlier than start date 2014-10-19 10:47:42 +02:00
Stefan Parviainen
d9817779fb Give an error if event is supposed to end before it starts. Closes friendica/red#534 2014-10-19 08:33:18 +02:00
Stefan Parviainen
7e091c05a1 Initial stab at better general datetime picker 2014-10-18 15:04:47 +02:00
friendica
ae9e1fa688 missing event permissions 2014-10-15 18:35:56 -07:00
friendica
c6d07feff5 This is long overdue - use a symblic constant NULL_DATE instead of the easily mis-typed sequence '0000-00-00 00:00:00' 2014-09-08 20:35:15 -07:00
friendica
ed847a91f6 add categories to events 2014-09-07 22:14:28 -07:00
friendica
dd7d0c4156 more work on the event edit form 2014-09-05 01:58:27 -07:00
friendica
92e4448993 put a date and time picker on events 2014-09-04 22:30:12 -07:00
friendica
913fd1d22e numerous event fixes - mostly related to editing an event 2014-07-06 22:31:39 -07:00
friendica
0074ef0bf3 rule of snakes #1, kill the snake.
tinymce is gone. if you want a visual editor, figure out what you want and make it happen.
If you don't want a visual editor, do nothing.
This is in the community's hands. I don't need a visual editor.
2014-06-28 05:05:34 -07:00
friendica
0f6c321e3f only show jotnets when posting conversation items 2014-06-14 20:16:40 -07:00
friendica
33cf83175d use consistent capitalisation in the item actions menu 2014-05-29 21:34:08 -07:00
friendica
22ed5b1d03 newevent: front end functions 2014-05-29 20:09:21 -07:00
friendica
a3487efd57 start to tie in the new event logic 2014-05-29 17:09:14 -07:00
friendica
22b79207f9 event form hard-wired tinymce=on, made selectable 2014-05-08 19:59:26 -07:00
friendica
64dfe3ab64 issue #395, item 2 2014-04-06 03:47:53 -07:00
friendica
47b8071ca7 dav: throw exception if channel for requested DAV directory is deleted 2014-01-15 03:12:47 -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
e70b0d4e20 need include/conversation for events now 2013-12-06 20:01:32 -08:00
friendica
3fdc3515b5 some work on events permissions 2013-12-01 23:49:52 -08:00
marijus
47de80ead4 make "selected" class work on all navigation menu items 2013-08-01 13:26:57 +02: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
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
ba3cff6d9a progress on tag delivery 2013-02-11 00:20:14 -08:00
friendica
e073649810 documenting event-finish-date-crosses-month-boundary issue to come back to later 2013-01-16 03:28:33 -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
ddd8a0e062 still some bugs but events are happening again. 2013-01-15 20:13:25 -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
Zach Prezkuta
b4a95460e6 fix show-stopping bugs 2013-01-06 19:34:54 -07:00
friendica
794c92a8fb wall posts now display - address book structure revamp started 2012-10-10 17:58:56 -07:00
friendica
6c92b5ab86 separate the public feed from everything else 2012-09-20 17:04:22 -07:00
friendica
78e03abed8 convert ent_quotes for jquery calendar title/summary 2012-06-29 20:11:36 -07:00
friendica
a3edbf7e5d create third privacy state - public post but not searchable or publicly visible 2012-06-28 17:43:29 -07:00
friendica
359a98cd22 change event behaviour so that title is required but description is not 2012-06-25 21:20:08 -07:00
friendica
fbaca4b742 event summary/title 2012-06-25 20:55:27 -07:00
fabrixxm
757037c3bf events: fix select events query
select events that starts before display start date and/or ends
after display end date.
2012-06-07 08:28:10 -04:00
friendica
e7580b71e1 use cid rather than uid in perms 2012-05-02 21:00:39 -07:00
Zach Prezkuta
5d957c3803 Modify events_post() in mod/events.php to set the private field to true when an event is shared with specific people. This is necessary to have event posts show correctly in Diaspora if an event is created visible only to self, but modified later to be visible to others. 2012-05-02 21:12:57 -06: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
2352e6c1cb make the "new calendar" (javascript interactive) the default 2012-04-02 01:46:35 -07:00
Fabio Comuni
73bee08ac2 enable ajax calendar with $a->config['experimentals']['new_calendar']=1 2012-02-15 12:47:50 +01:00
Fabio Comuni
7140e56d1f events js: pass only first line of desc as title; item.desc and item.location as html 2012-02-14 16:48:34 +01:00
Fabio Comuni
22cfb77173 events: first test for full-javascript events calendar 2012-02-14 16:19:48 +01:00
friendica
d2a9341128 new event current date off by one, submit button misplaced 2012-01-25 13:42:06 -08: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
0f4a42f550 start on bug #227 - more to do 2011-11-25 22:41:50 -08:00
Fabio Comuni
f64e2d63b9 New common tab template. Update css 2011-10-10 15:28:34 +02:00
Friendika
46b220518c don't allow events to finish before they begin 2011-09-14 23:09:09 -07:00
Friendika
454ff3c7f0 configurable format for date input selectors 2011-07-25 20:59:25 -07:00
Friendika
086dc25dd1 logic reversed 2011-06-30 23:23:50 -07:00
Friendika
762fb878f8 don't allow editing of somebody else's event 2011-06-30 23:21:58 -07:00
Fabio Comuni
5de7d0f12f add profile tabs to "photos", "events" and "notes". in dispy, show active tab. 2011-06-23 11:30:17 +02:00
Friendika
4ca730e5d7 remove debug statements 2011-06-16 23:17:25 -07:00
Friendika
cee63c7a0d preserve original timezone adjust selection when editing events 2011-06-14 21:44:27 -07:00
Friendika
5105b3febc event calendar links, editing 2011-06-14 19:48:37 -07:00
Friendika
fb92dbf5d6 link events + personal notes to profile tabs 2011-06-13 20:32:30 -07:00
Friendika
d5fdd4287d event sharing, cont. 2011-06-13 19:06:49 -07:00
Friendika
7c60701efc fixed a few feed problems affecting activity objects/targets 2011-06-10 01:51:14 -07:00
Friendika
b857a49bfe event publish 2011-06-09 21:23:45 -07:00
Friendika
8aaf55c1e6 event item 2011-06-09 20:02:48 -07:00
Friendika
9203b48527 default event publish permissions = personal 2011-06-09 01:01:29 -07:00
Friendika
d371241e66 events 2011-06-09 00:58:45 -07:00
Friendika
33fe26ecb0 more progress on events 2011-06-07 20:10:43 -07:00
Friendika
c1b2e90e37 basic saving of events 2011-06-06 22:27:38 -07:00
Friendika
fcb4316c29 tinymce for event fields 2011-06-06 21:49:07 -07:00
Friendika
bbc65f9832 prev/next links in calendar 2011-06-06 21:28:11 -07:00
Friendika
9f51233451 event listings 2011-06-06 20:17:36 -07:00
Friendika
452245d988 more events framework 2011-06-06 19:59:20 -07:00
Friendika
4c629e274b begin event module 2011-06-05 23:10:07 -07:00