friendica/include
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
..
acl_selectors.php
api.php
attach.php
auth.php
auth_ejabberd.php
bb2diaspora.php Fix code blocks to Diaspora 2017-04-06 23:49:56 -04:00
bbcode.php Fix code blocks to Diaspora 2017-04-06 23:49:56 -04:00
cache.php
cli_startup.php
config.php
Contact.php Fix for MySQL 5.7+ 2017-04-11 23:00:45 +02:00
contact_selectors.php Issue 2957: The avatar problem with mastodon should now finally be solved 2017-04-02 12:37:22 +00:00
contact_widgets.php
conversation.php
create_shadowentry.php
cron.php
cronhooks.php
cronjobs.php
crypto.php
datetime.php Fix for MySQL 5.7+ 2017-04-11 23:00:45 +02:00
dba.php
dba_pdo.php
dbclean.php
dbm.php
dbstructure.php Fix for MySQL 5.7+ 2017-04-11 23:00:45 +02:00
dbupdate.php
delivery.php
dfrn.php Fix for MySQL 5.7+ 2017-04-11 23:00:45 +02:00
diaspora.php Fix for MySQL 5.7+ 2017-04-11 23:00:45 +02:00
directory.php
DirSearch.php
discover_poco.php
email.php
Emailer.php
enotify.php
event.php
expire.php
fcontact.php
features.php
feed.php Avoid duplicates with feeds and "remote self" 2017-04-08 08:12:14 +00:00
files.php
follow.php
ForumManager.php
friendica_smarty.php
gprobe.php
group.php
html2bbcode.php
html2plain.php
HTTPExceptions.php
identity.php Fix for MySQL 5.7+ 2017-04-11 23:00:45 +02:00
items.php Avoid duplicates with feeds and "remote self" 2017-04-08 08:12:14 +00:00
like.php
lock.php
map.php
message.php
msgclean.php
nav.php
network.php
NotificationsManager.php
notifier.php
oauth.php
oembed.php
onepoll.php
ostatus.php Merge pull request #3315 from Hypolite/issue/#3285 2017-04-11 18:28:43 +02:00
pgettext.php
Photo.php
photos.php
pidfile.php
plaintext.php
plugin.php
poller.php
post_update.php
Probe.php Avoid possible problems with numeric nicknames and GNU Social 2017-04-09 04:29:02 +00:00
profile_selectors.php
profile_update.php
pubsubpublish.php
queue.php
queue_fn.php
quoteconvert.php
redir.php
remove_contact.php
salmon.php
Scrape.php
security.php
session.php
shadowupdate.php
Smilies.php
socgraph.php
spool_post.php
system_unavailable.php
tags.php
tagupdate.php
template_processor.php
text.php Add Text_Highlighter to Composer 2017-04-05 00:31:49 -04:00
threads.php
threadupdate.php
uimport.php
update_gcontact.php small fix for #3254 2017-04-07 11:26:11 +02:00
user.php
xml.php