Commit Graph

67 Commits

Author SHA1 Message Date
Hypolite Petovan 659d637b5a Remove unused param in datetimesel() 2018-01-04 12:19:06 -05:00
Adam Magness 4ca68c7af0 Class file relocations
Issue #3878
2017-11-08 08:37:03 -05:00
Michael ab73dbf346 Here as well 2017-11-07 21:48:41 +00:00
Adam Magness 0dfa57948f Issue-#3873
Replace deprecated functions with new syntax.
2017-11-07 06:24:39 -05:00
Hypolite Petovan ce866ad39b Remove unrecommended leading backslash for fully qualified namespaces 2017-05-02 23:37:06 -04:00
Roland Haeder cdff732044
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-04-21 20:08:57 +02:00
Roland Haeder ec57babf89
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-04-20 22:59:08 +02:00
Alexandre Alapetite d2901dcb00 Fix for MySQL 5.7+
https://github.com/friendica/friendica/issues/2786

Only tested on Ubuntu 16.10 with MySQL 5.7.17.

https://dev.mysql.com/doc/refman/8.0/en/timestamp-initialization.html

https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_zero_date
As of MySQL 5.7.4, NO_ZERO_DATE is deprecated.

Patch based on the following search & replace (and then reverting some
changes in libraries):

```sh
grep -l '= "0000-00-00"' -r . | xargs sed -i -e "s/= \"0000-00-00\"/=
'0000-00-00'/g"

grep -l "0000-00-00" -r . | xargs sed -i -e "s/0000-00-00/0001-01-01/g"

grep -l "!= '0001-01-01'" -r . | xargs sed -i -e "s/!= '0001-01-01'/>
'0001-01-01'/g"

grep -l " === '0001-01-01'" -r . | xargs sed -i -e "s/ === '0001-01-01'/
<= '0001-01-01'/g"

grep -l " == '0001-01-01'" -r . | xargs sed -i -e "s/ == '0001-01-01'/
<= '0001-01-01'/g"

grep -l "strpos(\$dob, '0000-') === 0" -r . | xargs sed -i -e
"s/strpos(\$dob, '0000-') === 0/strpos(\$dob, '0000-') === 0 ||
strpos(\$dob, '0001-') === 0/g"

grep -l 'array("", "0001-01-01")' -r . | xargs sed -i -e 's/array("",
"0001-01-01")/array("", "0000-00-00", "0001-01-01")/g'

grep -l "\$dob = '0000-'" -r . | xargs sed -i -e "s/\$dob =
'0000-'/\$dob = '0001-'/g"
```
2017-04-11 23:00:45 +02:00
Hypolite Petovan 7b352f3f74 Revert "Coding convention applied - part 1" 2017-03-21 12:02:59 -04:00
Roland Haeder 09851331a9
Merge remote-tracking branch 'upstream/develop' into rewrites/coding-convention
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-20 20:51:32 +01:00
Roland Häder 951006dd10
more spaces + some curly spaces added
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:51:54 +01:00
Roland Häder 41a36606c6
added spaces + some curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:50:19 +01:00
Michael 1a436264cd Some standards 2017-03-18 12:13:43 +00:00
Michael a2a171af06 "dob" is not a date field, so the changes are reverted 2017-03-18 08:50:27 +00:00
Michael 0afb0c2ea4 NULL_DATE is now a constant 2017-02-27 23:37:15 +00:00
Michael cb0600976d Bugfix: Avoid duplicated birthday events 2017-01-27 17:04:52 +00:00
Michael 53393233c3 Replace the direct access of config variables 2017-01-17 19:21:46 +00:00
Roland Haeder 6c0c9d542a
Continued with coding convention:
- added curly braces around conditional code blocks
- added space between if/foreach/... and brace
- rewrote a code block so if dbm::is_result() fails it will abort, else the id
  is fetched from INSERT statement
- made some SQL keywords upper-cased and added back-ticks to columns/table names

Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-12-20 21:16:49 +01:00
Roland Häder a905522eb5 Cleanup for #3010 - added spaces, thanks to @annando .
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 09:42:36 +01:00
Roland Häder 6a8a36f12d More usage of dbm::is_result($r) instead of count($r):
- count() returns very different results and never a boolean (not even false on
  error condition).
- therefore you should NOT use it in boolean expressions. This still *can* be
  done in PHP because of its lazyness. But it is discouraged if it comes to
  more clean code.

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-13 10:44:13 +01:00
Hypolite Petovan 5e188a9250 ping.php improvement: datetime.php formatting 2016-11-01 02:04:59 -04:00
Hypolite Petovan 63e5342ced ping.php performance: removing datetime_convert 2016-10-28 05:54:26 -04:00
rabuzarus 7dc5fc8b9f Merge develop into 1206-events-template
Conflicts:
	view/theme/frio/css/style.css
2016-06-17 14:33:08 +02:00
rabuzarus 4313982e02 frio - event - code clean up + docu 2016-06-17 14:27:33 +02:00
rabuzarus 8b4c416713 frio: events - split event form in different sections 2016-06-16 20:16:16 +02:00
rabuzarus 5e98f27fcd frio: events - work on event_form.tpl + datetime.php 2016-06-13 10:19:38 +02:00
rabuzarus 3a9a9e6a1c frio + core: some restructure in profiles.php + frio template for profiles settings 2016-06-10 11:24:38 +02:00
rabuzarus e267630c54 datetime.php: cleanup - delete some dots which shouldn't be there 2016-02-08 01:59:05 +01:00
rabuzarus 4896517385 datetime.php: little more docu 2016-02-06 01:08:10 +01:00
rabuzarus 811ed4e1c0 datetime.php cleanup 2016-02-03 19:48:09 +01:00
rabuzarus 3df5c17124 reformat todo according to doxygen style 2015-12-25 23:17:34 +01:00
Michael Vogel 8a79e1afb3 The datepicker is now localised 2015-10-17 10:48:13 +02:00
Fabrixxm 6fc864c947 rework mod/ping and desktop notification logic
`mod/ping.php` returns all notifications ordered by date
mixing system notifications, private messages, intros, registrations
remove 'notify_full' mode
remove `&arr;` from unseen notes, 'seen' attrib now is "1" or "0"
new note attribute 'timestamp'
desktop notification logic use timestamp to check which notification show to the user
notification html template use timestamp to show full date to user in tooltip
`relative_date()` don't append full date on dates older than 24 hours
2015-06-25 10:02:26 +02:00
rabuzarus 2ad8fdc40b port of red matrix datepicker implementation 2015-05-22 18:53:18 +02:00
effex7 eb5bf2a733 Added exact time to items after 24 hours 2014-10-25 16:44:24 +02:00
Michael Vogel 6e7bd68ebb More "LIMIT 1" removed - and some other SQL improvements. 2014-03-11 23:52:32 +01:00
friendica f440d76200 recover from datetime parse issues, inspired by https://github.com/friendica/friendica/pull/396 2012-07-15 21:00:11 -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
Fabio Comuni f35109827b datetime: new field_timezone() function, new template field_select_raw.tpl
returns a timezone select like select_timezone() but using template field_select_raw.tpl.
field_select_raw get options html as forth argument, instead of array value=>label like field_select
2012-01-02 20:09:25 +01:00
Friendika af6ab38100 diaspora birthday notifications 2011-10-14 00:20:37 -07:00
Friendika 454ff3c7f0 configurable format for date input selectors 2011-07-25 20:59:25 -07:00