Commit graph

70 commits

Author SHA1 Message Date
redmatrix
cacdac16aa next wave of nulldate fixes 2016-09-26 18:16:43 -07:00
redmatrix
fb9544badd null_date conversion; phase 1 2016-09-25 17:06:13 -07:00
redmatrix
4e85bc66b8 function to check for different values of NULL_DATE for backward compatibility 2016-09-21 17:16:54 -07:00
redmatrix
2c1b432613 fix birthday addtocal 2016-07-21 21:35:26 -07:00
redmatrix
fb61c4fb34 Merge branch '1.8RC' 2016-06-19 19:12:33 -07:00
Oda
5b92922516 When picktime is false, close date selector on date select 2016-06-18 23:03:06 -03:00
redmatrix
80f2ba640e code cleanup 2016-05-24 20:49:23 -07:00
redmatrix
9abd95fad3 static App 2016-03-31 16:06:03 -07:00
Mario Vavti
2d8deb6082 some janitor work on profiles 2016-03-12 22:13:46 +01:00
redmatrix
32e903e956 a bit of page cleanup for edit profiles 2016-03-07 18:49:17 -08:00
redmatrix
459166116d turn timezone aware birthdays into a feature for those who want an uncluttered calendar - at the expense of possibly sending somebody's birthday greeting on the wrong day if they are in a different timezone. 2016-02-26 12:45:44 -08:00
redmatrix
ba2ede0a8f this reverts ea54987ca4 2016-02-25 15:41:52 -08:00
Mario Vavti
ea54987ca4 in update_birthdays() we should probably set adjust to 0 instead of 1 since a birthday is more a kind of a global holiday 2016-02-25 23:03:38 +01:00
redmatrix
d004017b01 issue #288 allow relative_date() to be translated into languages with more than two plural forms, such as pl. 2016-02-19 19:07:07 -08:00
Mario Vavti
5cb71fa5da default timepicker to 15 min steps. abbr -> span 2015-11-26 21:00:04 +01:00
redmatrix
bae7b034e6 add (blank?) label param to other instances of datetimesel 2015-11-24 14:54:13 -08:00
Mario Vavti
5a12944b39 oups :) 2015-11-24 14:18:29 +01:00
Mario Vavti
987619130b some event heavy lifting - please test and report issues 2015-11-24 14:15:28 +01:00
Mario Vavti
18e0e4b597 do not hide scrollbars 2015-11-21 23:51:50 +01:00
Mario Vavti
74b574d0b1 datetimepicker should also respect first day of week setting 2015-11-21 23:49:29 +01: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
47292c612c provide ways to over-ride the datetime pickers 2015-03-26 18:03:39 -07:00
friendica
abcc70722c event form cleanup backported from trinidad - still need to style the checkboxes 2015-02-05 19:37:55 -08:00
Stefan Parviainen
686b6ee118 Use grouped select field for timezone selection 2015-01-01 14:44:50 +01:00
Stefan Parviainen
c1b8608940 Switch to a better datetime picker widget 2014-11-16 13:56:45 +01:00
Habeas Codice
ac27db22c1 Merge remote-tracking branch 'upstream/master'
Conflicts:
	boot.php
	include/dba/dba_driver.php
	include/diaspora.php
	include/follow.php
	include/session.php
	include/zot.php
	mod/photos.php
	mod/ping.php
2014-11-13 13:06:31 -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
325b269b22 the code is a bit crufty, but this should fix issue #687 2014-11-11 01:05:29 -08:00
Stefan Parviainen
d9f2944565 Fix problem with default birth date 2014-10-31 16:09:48 +01: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
7c4f55af9f Oops, forgot one file 2014-10-18 22:17:49 +02: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
737d3f5836 don't add a birthday event if the birthday channel doesn't have permission to send you posts. 2014-06-03 19:25:59 -07:00
friendica
2386bc4d00 bring back birthdays 2014-06-02 17:49:19 -07:00
friendica
6c321be03c reorganise a few included functions - notably identity related functions 2013-12-03 15:35:13 -08:00
friendica
ea3940c4b0 start formatting for Doxygen 2013-02-25 17:09:40 -08:00
Mike Macgirvin
672da80282 progress however tedious 2012-10-23 20:59:20 +11:00
friendica
f83a504da1 more work on json notifications, now working except for notify popup 2012-07-15 21:06:07 -07:00
friendica
71afdf3d9c gracefully recover from datetime constructor issues 2012-07-11 16:20:17 -07:00
friendica
d32d0e2154 typos 2012-06-25 21:39:07 -07:00
friendica
78ede4744f add event titles to discovered birthday events 2012-06-25 21:37:38 -07:00
Erkan Yilmaz
e8e1de3603 add missing bracket 2012-06-13 20:41:53 +02:00
friendica
b6ff71acaa survive bad/un-parseable input to datetime_convert 2012-06-12 02:06:29 -07:00
friendica
608d424b0b "howlong" added to marital status. 2012-06-02 02:30:26 -07:00
friendica
c1e2596807 more sane defaults datetime_convert 2012-04-08 18:09:21 -07:00
friendica
129130b0f7 fix empty string timezone 2012-04-08 18:01:49 -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
3e85c1d330 make 'x minutes ago' fully translateable with argument ordering. string update. 2012-02-12 17:15:09 -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