Commit Graph

211 Commits

Author SHA1 Message Date
Hypolite Petovan 20043914e6 Move App to src
- Add `use Friendica\App;` wherever needed
2017-05-02 22:59:36 -04:00
Alexandre Alapetite c35eef625a More general date test for dob 2017-04-16 15:36:01 +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
rebeka-catalina 554704e6b9 Added a whitespace between comma and t() 2017-04-08 16:57:24 +02:00
Roland Haeder 177a0c8320
Continued:
- used dbm::is_result() to avoid E_WARNING when false is returned
- added curly braces + some spaces

Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-25 13:23:15 +01:00
Roland Haeder e503141b0c
added spaces and curly braces
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-25 13:18:39 +01:00
Roland Haeder 2f5c796886
removed TODO, one day this all needs refacturizing ...
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-25 13:02:09 +01:00
Roland Haeder 239dfea4e6
it is space-time! ;-)
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-24 22:40:33 +01:00
Roland Haeder caad9f5214
added more spaces (CR request)
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-24 22:36:52 +01:00
Roland Haeder be717649a4
added more curly braces/spaces
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-24 22:34:13 +01:00
Roland Haeder c4b82133e9
added more curly braces + spaces for #3254
Signed-off-by: Roland Haeder <roland@mxchange.org>
2017-03-23 23:06:28 +01:00
Roland Häder 830af774d3
added more curly braces + a bit more usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-21 21:50:45 +01: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
Michael 132688d663 Standards, what else? 2017-03-19 08:04:04 +00:00
Roland Häder d529125c8e
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:52:24 +01:00
Roland Häder 0cd241bcbe
added spaces + some curly braces + some usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:44:40 +01:00
Roland Häder 3849e7c9ff
added more curly braces + a bit more usage of dbm::is_result()
Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:40:47 +01:00
Roland Häder 63e4750b4a
more coding convention applied:
- added curly braces
- added spaces where needed
- $r only needs to be tested with dbm::is_result()
- made SQL keywords all uper-case

Signed-off-by: Roland Häder <roland@mxchange.org>
2017-03-19 00:40:21 +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
Michael ea22828d37 Alternate solution for pull request 3124 2017-01-28 12:19:04 +00:00
Hypolite Petovan 66482c1d9c - Remove $theme_richtext_editor boot var
- Remove "richtext" feature
- Remove fix_mce_lf() function
- Remove nomce parameter
2017-01-26 22:57:53 -05:00
Hypolite Petovan 9d5384f107 - Remove tinyMCE mentions or convert to addeditortext()
- Remove $editselect template value
2017-01-26 22:50:27 -05:00
Hypolite Petovan a7ce601580 Normalize App parameter declaration (mod folder, 3 out of 3) 2017-01-09 23:14:55 +11:00
Roland Haeder 6e44acfed6
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:15:53 +01:00
Roland Häder e24c3a5b82 added much more curly braces + space between "if" and brace
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 11:56:34 +01:00
Roland Häder c86f09a894 added spaces + curly braces
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 11:36:03 +01:00
Roland Häder 4dce3d8224 changed to this:
---------------------
function bla (App &$a) {
	$a->bla = 'stuff';
}
---------------------

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:58:55 +01:00
Roland Häder fb676335db Coding convention applied:
- space between "if" and brace
- curly braces on conditional blocks

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-20 10:10:33 +01:00
Roland Häder dac1dbd3e9 Merge branch 'rewrites/dbm_is_result' into develop 2016-12-19 14:47:05 +01:00
Roland Häder a96eb3428d Used more dbm::is_result() instead of (!$r) or (!count($r)), still there are
more pending ...

Also put SQL table columns into back-ticks.

Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-19 14:46:33 +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 46d383369c Cleanup for #3010 - added spaces, thanks to @annando .
Signed-off-by: Roland Häder <roland@mxchange.org>
2016-12-14 09:41:33 +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
Michael Vogel 196eb6009f The XMPP address is now in the profile and will be transmitted 2016-09-25 15:28:00 +00:00
Michael Vogel 668da905e2 "proc_run" is now called with priority. 2016-08-01 07:48:43 +02:00
Michael Vogel f27bc00464 Remove obsolote functions 2016-07-09 20:09:09 +02:00
rabuzarus e773da9ea2 frio + core: forgot to delete a comment 2016-06-10 11:29:23 +02:00
rabuzarus 3a9a9e6a1c frio + core: some restructure in profiles.php + frio template for profiles settings 2016-06-10 11:24:38 +02:00
Michael Vogel de431e185e New function to update the global contact for the user id. 2016-05-05 15:08:05 +02:00
Michael Vogel 3df235e5bd The global contact for server users is now stored directly 2016-05-05 12:02:51 +02:00
Michael Vogel 8f00836ffb Add the guid to items that we create locally 2016-03-20 15:01:50 +01:00
Michael Vogel c5b724828a Just some more removed baseurls ... 2016-02-17 08:08:28 +01:00
fabrixxm b202e02fbf Revert "Updated modules to allow for partial overrides without errors"
This reverts commit db949bb802.
2016-02-07 15:11:34 +01:00
Andrej Stieben db949bb802 Updated modules to allow for partial overrides without errors
Only define functions if they have not been defined before, e.g. in themes. This makes it possible to override parts of a module and still use the other functions.
2016-02-05 21:52:39 +01:00
Michael Vogel 937196d6ee Poco fields now moved to the header, function to create formatted location string 2016-01-24 14:30:57 +01:00
Michael Vogel 4631c13d08 Profile data are now reduced to only the most important fields 2015-10-25 09:15:36 +01:00
Michael Vogel 5ac38b7f99 There is now only one central parameter for the global directory. 2015-09-15 22:29:02 +02:00
Michael Vogel 6800b07fc5 Update the name in the "self" contact when it is changed. 2015-07-14 22:24:43 +02:00
rabuzarus 2ad8fdc40b port of red matrix datepicker implementation 2015-05-22 18:53:18 +02:00
Michael Vogel 29f732e811 More details in the location field for poco. 2015-02-04 10:43:30 +01:00
Michael Vogel e8bfa32b37 Scrape now doesn't fetch page data when its twitter and Co./Update script that updates the contacts from the profile 2015-01-26 01:07:15 +01:00
Michael Vogel 105d6a22a4 gender will be updated in the profiles as well. 2015-01-25 13:22:25 +01:00
Michael Vogel 2f400627c7 Support for keywords and gender in (global) contacts. 2015-01-25 13:19:37 +01:00
Michael Vogel 94fb0305f7 Poco now shows "about" and the location as well. 2015-01-10 00:34:08 +01:00
Beanow 992684c362 Merge branch 'feature/edit-profile-improvements' into develop 2014-09-04 23:58:22 +02:00
Michael Vogel 94d2557077 Vier: Some more design changes to "plus" style. 2014-08-21 01:00:56 +02:00
Michael Vogel ed1dce93d6 Usage of /display/(guid) as path instead of /display/(user)/(id)
Bugfix for adding tags to photos
2014-07-22 00:36:20 +02:00
Beanow e9dc6e4faa Some changes to the labels and an edit profile button. 2014-07-03 18:39:22 +02:00
Beanow 6089bc94b3 Extend profile editor information.
* Labels for splitting fields into sections.
* Security token for profile_photo action.
2014-06-28 01:31:11 +02:00
Beanow e6364f6680 Redirect profiles list to default profile, when multi_profiles is disabled. 2014-06-28 01:30:10 +02:00
Beanow a3895c8dee Exposes new profile data for templating.
* Boolean value of whether multi_profiles is enabled.
* Array needed for yesno_field for the hide-friends option.
2014-06-27 18:12:15 +02:00
Tobias Diekershoff b6e546d1e3 don't add http:// if homepage is not set 2014-06-22 09:44:59 +02:00
fabrixxm 29092ace44 Merge pull request #927 from annando/master
Massive SQL stuff
2014-04-04 07:28:06 +00:00
Michael Vogel 6e7bd68ebb More "LIMIT 1" removed - and some other SQL improvements. 2014-03-11 23:52:32 +01:00
Michael Vogel 6b8585d48d Database stuff. New table "thread". Changing "left join" to "inner join", removing "limit 1" at update and delete. 2014-03-09 09:19:14 +01:00
Tobias Diekershoff fda7bdca2e better logic 2014-01-13 14:25:50 +01:00
Tobias Diekershoff 0d7c91fc10 added a check for http in homepage url, this should fix issue #768 2014-01-12 09:16:46 +01:00
friendica 9660117c70 sync username when changed in either the default profile or the settings page 2013-04-04 15:10:14 -07:00
Zach Prezkuta 609c45e791 fixes and tweaks to Smarty processing 2013-01-12 05:58:54 -07:00
Zach Prezkuta fdd142c42e never use profile_load outside of a module's _init() function 2013-01-03 10:47:45 -07:00
friendica 4793ebb141 change profile photo link on profile edit page 2012-12-07 16:02:40 -08:00
friendica 79fb5509ed bug #511 - if birth year supplied but not a month or day, force a sane default. PHP datetime functions don't handle zero very well. 2012-12-02 13:47:41 -08:00
Zach Prezkuta 94204d9160 implement features 2012-11-22 09:14:22 -07:00
Zach Prezkuta ce73cd560f allow tagging of people by name or nickname 2012-09-29 17:55:40 -06:00
friendica bcec1bddc0 put the real post time into the post 2012-08-19 14:39:43 -07:00
Zach Prezkuta 1f09e7ad23 Modify Javascript to improve page loading times
1. Add template category 'end' that places content right before final </body> tag
	2. Move most Javascript from tpl files into one cacheable file, theme.js
	3. Load scripts at end of the HTML document instead of in the header
	4. Minify several Javascript files

Note that the second and third things were only done for Frost and Frost Mobile. Doing it for every theme means going through every .tpl for every theme and rearranging the Javascript, which is tedious.
2012-07-28 09:57:16 -06:00
friendica 7f7e2c5de0 add plink to profile notifications 2012-07-12 16:12:37 -07:00
friendica c464bc494c add like/dislike to profiles 2012-06-24 21:16:55 -07:00
Zvi ben Yaakov (a.k.a rdc) d4f4ed730c Now using App::get_cached_avatar_image for /profile/{nickname} page 2012-06-19 16:05:39 -07:00
friendica 83b9a8eb44 too many profiles 2012-06-17 19:40:16 -07:00
Zvi ben Yaakov (a.k.a rdc) 1ee22a749e Enabled Profile photo revisions to be displayed on /profiles page 2012-06-17 23:24:47 +03:00
friendica d27c6de84e add hometown to profiles 2012-06-02 20:58:20 -07:00
friendica 608d424b0b "howlong" added to marital status. 2012-06-02 02:30:26 -07:00
friendica 27c903a8d0 improve location change notifications 2012-05-25 15:56:18 -07:00
friendica abb9fecf09 rev update 2012-05-25 00:42:38 -07:00
friendica 4133df6223 profile change activity link bug 2012-05-18 17:55:11 -07:00
friendica 2818cb28e9 use html symbols for double quotes 2012-05-03 17:19:53 -07:00
friendica f3e18df55d string update 2012-05-03 16:55:03 -07:00
friendica 06d6ab4812 delineate the new profile changes from the rest of the text 2012-05-02 01:07:23 -07:00
friendica def6f0b408 the heart should really be red. 2012-04-29 02:11:33 -07:00
friendica 735f518fd8 fix location change notification 2012-04-29 01:49:54 -07:00
friendica a9dba2720b enhanced profile reporting for single values 2012-04-29 01:42:48 -07:00
friendica af68d033e3 extended the "interesting" profile attributes 2012-04-12 21:58:15 -07:00
friendica 446e962bb8 send link directly to profile tab 2012-04-12 21:38:40 -07:00
friendica 2b339d5a6b stray log statements 2012-04-12 21:21:35 -07:00
friendica 972c01edb3 profile change activities 2012-04-12 21:10:32 -07:00
friendica ed608694ce make editplain work everywhere 2012-04-10 18:08:06 -07:00
friendica 9b1bb53234 fix_mce_lf on profiles 2012-04-10 16:31:49 -07:00