Commit Graph

60 Commits

Author SHA1 Message Date
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 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
rabuzarus 3474b40732 fix - pending contacts shouldn't be shown in contacts widgit and viewcontacts 2017-02-10 03:51:01 +01:00
Michael 3af099298c Some more caching 2017-01-13 17:31:10 +00:00
Hypolite Petovan 87eb3d5ef2 Normalize App parameter declaration (doc-include folders, boot) 2017-01-09 23:09:01 +11:00
Roland Häder f8a213e23b
*much* more usage of App::get_baseurl() instead of $a->get_baseurl() (coding convention applied)
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-23 19:49:36 +01:00
Roland Haeder af2909bf8f
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:13:50 +01:00
Roland Häder fb0ed18a43 changed to this:
---------------------
function bla (App &$a) {
	$a->bla = 'stuff';
}
---------------------

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:58:03 +01:00
Roland Häder a5e4882e25 Coding convention:
- added curly braces
- added space between "if" and brace

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:35:28 +01:00
Roland Häder 884f44ce94 *much* more usage of App::get_baseurl() instead of $a->get_baseurl() (coding convention applied)
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-19 14:27:16 +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
rabuzarus 3d4e1176ec Bugfix: cached data doesn't need to get unserialized anymore 2016-12-04 15:15:23 +01:00
Michael 3de862712d Issue 2772: Posts from pending contacts should be displayed as well. 2016-11-20 16:52:57 +00:00
Michael Vogel ee5ada6991 We now use memcache if configured and installed. 2016-10-23 21:59:40 +00:00
Michael Vogel 60a0235af0 The account type is now read and displayed 2016-10-01 20:03:27 +00:00
Michael Vogel 196eb6009f The XMPP address is now in the profile and will be transmitted 2016-09-25 15:28:00 +00:00
rabuzarus aedd2cfa60 Update identity.php 2016-08-31 13:49:24 +02:00
Michael Vogel 668da905e2 "proc_run" is now called with priority. 2016-08-01 07:48:43 +02:00
rabuzarus 073f520cee add missing strings for frio 2016-06-25 12:21:13 +02:00
rabuzarus 7495a34b32 implement a public calendar for vistors of someones profile page 2016-06-19 22:04:34 +02:00
Michael Vogel 4b640dbd97 Fetching of profile data improved 2016-06-05 21:17:55 +02:00
Michael Vogel d22d36be7d Now with correct url 2016-05-29 22:13:08 +02:00
Michael Vogel e4ec867df3 Better detection for remote user 2016-05-29 22:02:31 +02:00
Michael Vogel 0a617da044 Wall message can now redirect to your own page if you are connected. 2016-05-29 21:29:26 +02:00
Roland Haeder 04eacb6470
Prevent some E_NOTICE in identity.php
Signed-off-by: Roland Haeder <roland@mxchange.org>
2016-03-01 14:36:23 +01:00
Michael Vogel c5b724828a Just some more removed baseurls ... 2016-02-17 08:08:28 +01:00
rabuzarus 52dbb0b4a2 Forum class - rename Class CamelCase and rename some methods 2016-02-04 14:51:54 +01:00
rabuzarus 9a54afa629 Forum class - rename Class CamelCase and rename some methods 2016-02-04 14:47:20 +01:00
rabuzarus c1070e4655 forums.php is now forum.php and providing class forum 2016-02-03 18:05:26 +01:00
Michael Vogel 885dc1df81 gcontact update script, rebuilt follow page, query speedup for community and network groups 2016-01-10 09:19:00 +01:00
rabuzarus 64989781ff add custom tag @hooks to boot.php & identity.php 2015-12-25 18:36:13 +01:00
rabuzarus 839895e434 identity.php - code cleanup + doxygen 2015-12-25 17:26:04 +01:00
Michael Vogel d077dbbcde Bugfix: The bbcode conversion of the profile was inconsistent 2015-12-14 23:53:35 +01:00
rabuzarus e61d6e030e fix account_type 2015-12-14 14:12:56 +01:00
rabuzarus d963cdfe48 photos-albms widget: add some classes 2015-12-02 20:01:22 +01:00
rabuzarus cd7ec72b20 unify hcard and vcard: make $pdesc available in hcard&vcard 2015-12-01 19:47:23 +01:00
rabuzarus 39b37281a7 Merge develop into 3011_hcard_vcard 2015-12-01 18:34:13 +01:00
rabuzarus 89c5989cfb unify hcard and vcard 2015-12-01 18:31:08 +01:00
rabuzarus 2ce64c2496 change shortcut for viewcontacts + shortcut docu 2015-11-30 16:23:03 +01:00
rabuzarus 45c2a4868e make viewcontacts part of the profile tab 2015-11-30 03:25:23 +01:00
Michael Vogel 1cd06df5fa Bugfix: Only show the feed link for local profiles 2015-11-29 12:02:14 +01:00
Michael Vogel 388847e1f3 Issue 1779: There is now an atom feed link under the connect link on the profile page 2015-11-28 18:11:34 +01:00
rabuzarus 620299dc25 include friendica address in hcard 2015-11-26 17:46:38 +01:00
rabuzarus 862ccb95d2 forumlist: doxygen corrections 2015-11-11 22:41:44 +01:00