Commit Graph

42236 Commits

Author SHA1 Message Date
Morris Jobke 5f8c773b27
Merge pull request #8680 from nextcloud/8391_13
[stable13] Don't use double quotes in MySQL queries
2018-03-06 13:18:59 +01:00
Roeland Jago Douma 242f0c0b5a
Merge pull request #8676 from nextcloud/8297_13
[stable13] Fix example regex for user agent matching
2018-03-06 11:54:27 +01:00
Morris Jobke 0667a32c83
Merge pull request #8673 from nextcloud/stable13-8634
[stable13] do not create empty userid when attribute does not have allowed chars
2018-03-06 11:30:48 +01:00
Robin Müller 619ee56835
Don't use double quotes in MySQL queries
MySQL databases with the ANSI_QUOTES mode enabled treat " as an identifier
quote (see https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes).
So for such databases the 'occ upgrade' fails with an error message like this:
... unknown column 'oc_*' in where clause.

This fix replaces the doulbe quotes with single quotes that should be always
used in MySQL queries to quote literal strings.

Signed-off-by: Robin Müller <robin.mueller@1und1.de>
2018-03-06 11:25:07 +01:00
Joas Schilling 02af9b2f6f
Fix example regex for user agent matching
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-06 11:16:41 +01:00
Roeland Jago Douma ff7237a098
Merge pull request #8668 from nextcloud/8217_13
[stable13] Use proper lanugage in langauge code
2018-03-06 09:47:20 +01:00
Roeland Jago Douma f4aae102f7
Merge pull request #8675 from nextcloud/stable13-8601
[13] Remove too restrict check for background image/color
2018-03-06 09:46:52 +01:00
Julius Härtl 80842e1611
Remove to restrict check for background image/color
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-06 09:08:49 +01:00
Nextcloud bot d3d0d9e11d
[tx-robot] updated from transifex 2018-03-06 01:12:41 +00:00
blizzz 0045e823fe
Merge pull request #8669 from nextcloud/8218_13
[stable13] Display the proper language strings in setttings
2018-03-05 23:46:26 +01:00
Arthur Schiwon 6e3c05f513
do not create empty userid when attribute does not have allowed chars
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-03-05 23:14:36 +01:00
Roeland Jago Douma 19ded76b77
Display the proper language strings in setttings
Since this was moved to lib, we have to the lib language files.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-05 19:48:16 +01:00
Roeland Jago Douma 34671d6ad4
Use proper lanugage in langauge code
Fixes #8180

The _ is not valid in language codes use - instead.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-05 19:44:54 +01:00
Roeland Jago Douma 655e39ffcd
Merge pull request #8610 from nextcloud/stable13-8588-fix-breadcrumbs-width-calculation
[stable13] Fix breadcrumbs width calculation
2018-03-05 19:37:53 +01:00
Roeland Jago Douma 07aba8cdac
Merge pull request #8663 from nextcloud/fix-ie11-datepicker-display-backport
[stable13] Fixed date/time picker on IE11
2018-03-05 19:35:25 +01:00
John Molakvoæ (skjnldsv) 1b0416b1a1
Fixed date/time picker on IE11
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-05 16:40:44 +01:00
Roeland Jago Douma 9432c59db4
Merge pull request #8654 from nextcloud/stable13-8630
[stable13] use hash algo that's robust against collisions
2018-03-05 14:48:49 +01:00
Arthur Schiwon 962b046ab5
use hash algo that's robust against collisions
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-03-05 13:20:22 +01:00
Joas Schilling 6104a7043e
Merge pull request #8636 from nextcloud/8289_13
[stable13] AppData hardening
2018-03-05 12:38:43 +01:00
Joas Schilling 479b9465c0
Merge pull request #8631 from nextcloud/stable13-8372
[13] Properly encapsulate require_once for app.php
2018-03-05 12:35:50 +01:00
Nextcloud bot d74bad2dc1
[tx-robot] updated from transifex 2018-03-05 01:12:36 +00:00
Nextcloud bot 7717dbbe30
[tx-robot] updated from transifex 2018-03-04 01:13:07 +00:00
Nextcloud bot e23f06561a
[tx-robot] updated from transifex 2018-03-03 01:12:39 +00:00
Roeland Jago Douma 46bb3fee81
Merge pull request #8609 from nextcloud/ie11-nav-flex-fix
[stable13] Fixed app navigation for IE11
2018-03-02 21:27:20 +01:00
Roeland Jago Douma 9413f97b92
Hardening of SimpleFile getContent
if file_get_contents fails remove the file. And traverse up the tree
checking if the other folders are there.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-02 21:23:41 +01:00
Julius Härtl 9f7e05e737
Add throws annotation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-02 17:16:36 +01:00
Julius Härtl a61608e8c7
Properly encapsulate require_once for app.php
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-03-02 17:16:36 +01:00
Joas Schilling 364e7fe1be
Merge pull request #8621 from nextcloud/13-8612
[stable13] Update commentstabview.js
2018-03-02 11:24:22 +01:00
rakekniven cbba3e2432
Update commentstabview.js
Changed typo reported at GitHub.
See https://www.transifex.com/nextcloud/nextcloud/translate/#de_DE/$/91002505?issue=yes

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-02 10:41:26 +01:00
Morris Jobke 59d6f45c41
Merge pull request #8615 from nextcloud/stable13-8355
[stable13] Fix comments (and systemtags) when involving users with numerical ids
2018-03-02 10:35:40 +01:00
Nextcloud bot 369b3b28c7
[tx-robot] updated from transifex 2018-03-02 01:12:43 +00:00
Arthur Schiwon 7bd1aac209
backport of #8355 to stable13
test creating comments with numeric user ids

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

fix creating comments when file is accessible to users with numeric ids

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

tests for systemtags related to numeric user ids

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>

fix systemtags event with numeric user ids

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-03-02 00:28:20 +01:00
Daniel Calviño Sánchez 22f9d0519a Update comments in tests
Menu and home are not always visible; home is always visible, but menu
is shown only when needed.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 21551d7884 Improve documentation of "getTotalWidth"
"getTotalWidth" is not more accurate; it is simply not clamped.
Moreover, "width/outerWidth" could be used in tests too, and also even
if "getTotalWidth" could be used in tests while others not that would
not be something to be stated in the API documentation, but in a
comment.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 23559b2eda Do not show the crumbs again after hiding them
After the changes in the previous commit "_showCrumb" no longer shows
the menu, only the same crumb that was hidden by the last call to
"_hideCrumb". Therefore, if the crumb was hidden because it did not fit
there is no need to try to show it again, as it will still not fit.

Moreover, the calculated width for a hidden element is not always
accurate; in some cases the calculated width is lower than the actual
width (it happens, for example, when using a background image like the
"Share" icon), which causea the crumb to be shown even if there is not
enough room, which in the end causes the siblings to overflow the
contents.

No unit tests for this one, though; you will have to trust me on this,
sorry ;-)

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez a1af18fa35 Fix menu visibility
The crumb for the menu was shown like any other crumb when calling
"_showCrumb", but it was also shown when other crumbs were hidden
without taking into account the available width. This caused several
related problems, like the breadcrumbs taking too much space when the
menu was sometimes shown after the rest of the crumbs were adjusted to
the available width, or the menu being shown instead of the last crumb
even if there was room for it when the available width was increased.

Now the menu is always hidden before starting the resizing of the crumbs
to ensure that whether it was previously shown or not does not affect
the result. In a similar way, the menu will no longer be shown by
"_showCrumb", as it is not a regular crumb that has to be shown simply
if there is enough room. The menu is now shown as soon as any other
crumb is hidden; this ensures that the menu width will be taken into
account in further width checks. As when _updateMenu" is called it no
longer needs to take care of showing the menu this fixes the issue
revealed when fixing the test setup in the previous commit.

Finally, this implicitly fixes the failure in the breadcrumbs tests when
run on Firefox, as it was caused by the menu interfering in the
calculations of the other crumbs when increasing the width.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez e33a9693f7 Fix setup to test the breadcrumbs menu
The "Shows only items not in the breadcrumb" test was failing when run
on Firefox, but not on PhantomJS. This was caused by the differences in
the starting width between both browsers and an incorrect setup of the
test (the width set for the crumbs was overriden when the breadcrumbs
were rendered again, and the breadcrumb was resized to 300 from an
indeterminate initial width).

Now the crumbs are rendered and then its width, padding and margin are
set to a known value. Then it is resized to 1000px, which ensures that
there will be enough room for all the crumbs and thus the menu will be
hidden, and finally it is resized to 300, which causes the middle crumb
to be hidden and the menu to be shown.

Note, however, that the test now always fails, no matter if it is run on
PhantomJS or on Firefox; if the menu crumb is hidden when "_updateMenu"
is called it will show it, but it will also wrongly try to add the menu
itself to the menu. As the "crumb-id" of the menu crumb is "-1" this
causes the last regular crumb to be added to the menu. This will be
fixed with other related issues in the next commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 83b50690a8 Take padding and margins of crumbs into account
When calculating the total width of the crumbs only its padding was
taken into account; now the margin is too. In a similar way, before
showing a crumb only its width was taken into account; now its padding
and margin are taken into account too.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 89c0a0733f Use hard-coded values for paddings and margins
This ensures that the resize tests do not depend on the values set in
the CSS files.

Note that this change causes a test to fail with Firefox, but not with
PhantomJS. This is due to a difference in the starting width used by
Firefox and by PhantomJS, and it will be fixed in a following commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez d9405a2b02 Compress siblings before calculating the available width for crumbs
When the parent element of the breadcrumbs was resized to a larger width
and the siblings of the breadcrumbs expanded to fill all the available
width some crumbs could be hidden even if there was enough room for
them. The reason was that the width of the siblings being used to
calculate the available width for the breadcrumbs was the expanded width
of the siblings. Now as many crumbs as possible (that is, fitting in the
parent, no matter the siblings) are first shown so the expanding
siblings are compressed before calculating the available width.

Due to the lack of support for flexboxes in PhantomJS the related unit
test is skipped; it has to be run in other browser, like Firefox.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez a93dac6a9c Take all visible siblings into account
Other apps could add elements to the controls outside the creatable
actions div (for example, the button to switch to the gallery), so the
widths of all the visible siblings of the breadcrumbs have to be taken
into account in the size calculations.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez bb85084c3d Take padding and margin of the creatable actions div into account
There are some differences in width handling between the browsers used
to run the tests, most likely due to their support (or lack of) of
certain CSS features: PhantomJS requires "width" to be set (probably
because it does not handle flex displays and treats it like a block, so
"min-width" does not matter in this case), while Firefox requires
"min-width" to be set (otherwise the children of "#controls" could be
compressed due to its use of flex display and the elements would end
with a different width than the one needed for the tests). Due to all
that the width of the breadcrumb siblings must be specified in the tests
using both "width" and "min-width".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 1da92fd5da Do not render the breadcrumbs again in resize tests
There is no need to call "setDirectory" again in resize tests; it is
enough to simply resize them (and isolates them better to just test the
resizing behaviour).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 2fd3fa20df Replace attribute with local variable
The "usedWidth" attribute was not used elsewhere outside the "_resize"
method, so it was replaced with a local variable. Moreover, it was also
renamed to a more suitable name ("availableWidth").

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
Daniel Calviño Sánchez 61bd3631d9 Set the width of the parent element in breadcrumb tests
Setting the width of the parent element of the breadcrumbs and then
explicitly calling "_resize" is enough to test the resizing behaviour.
This makes possible to remove the "setMaxWidth" method and its related
code, which was used only for testing purposes.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-03-01 20:33:14 +01:00
John Molakvoæ (skjnldsv) bc2032bed7
fixup! Fixed app navigation for IE11
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-01 20:22:49 +01:00
John Molakvoæ (skjnldsv) b768040fca
Fixed app navigation for IE11
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2018-03-01 20:22:42 +01:00
Roeland Jago Douma a2672a2ad8
Merge pull request #8561 from nextcloud/ext-strg-warning-fix
[stable13] Ext storage error warning
2018-03-01 19:36:55 +01:00
Morris Jobke 5a20f64300
Merge pull request #8595 from nextcloud/stable13-8589-fix-upload-button-visible-on-read-only-folders
[stable13] Fix upload button visible on read-only folders
2018-03-01 11:56:59 +01:00
Nextcloud bot 03f127f162
[tx-robot] updated from transifex 2018-03-01 01:12:37 +00:00