To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Fixes#18255
A new user setting allows a user to always accept (internal) shares. For
example if they don't like accepting shares manually ;)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
When the "hide download" property of a share is set the public share
page will not show the download button nor the menu with the download,
direct link and "Add to your Nextcloud" actions; the "downloadURL"
hidden field will not be included either in the generated HTML.
Despite that, note that the "downloadURL" parameter is still set and
passed to the template, as this could be needed anyway to generate
previews (for example, of audio files).
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Now this is in core so the basics (that 99% of the app will want to
use) looks always the same.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
The share menu toggle and some share menu items included an 'href="#"'
attribute, so they were handled as internal links by the browser, which
changed the current anchor when they were clicked. However, there was no
real need to change the anchor in those cases, and it could interfere
with other apps (for example, the PDF viewer sets the current anchor to
"#pdfviewer" when it is shown and it hides itself when that anchor is
modified). According to the HTML 5 spec the "href" attribute is not
mandatory for "a" elements, so they were removed.
Other options would have been to change the elements from "a" to "div"
or something like that, but that would have required changes to the CSS
rules too, or to prevent the default event handling for those elements
through JavaScript, which would have been a workaround instead of the
proper solution.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Fixes#6821
This makes sure that (supported) browsers will not prefill the password
field if a user has a password saved for that nextcloud.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* shows the filename and sharer on the public page
* allows the user to identify, that this is a user page and not an official page of the Nextcloud hosting
* remove link on logo that redirects to login (fixes#5720)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>