[BUGFIX] Empty admin password should not generate hash
During installation, a empty admin password should put an empty
password in configuration so admin interface is disabled.
Before this fix, a empty password would be a valid password
without disabling the admin interface.
Dan Untenzu [Fri, 17 Mar 2017 15:08:30 +0000 (16:08 +0100)]
[FEATURE] Ignore "custom" theme folder
Support the creation of custom themes: let Git ignore
the theme if it is named "custom". This way the admin may keep
the jirafau git repo and force an update without conflicts.
Dan Untenzu [Thu, 23 Feb 2017 14:46:07 +0000 (15:46 +0100)]
[BUGFIX] Prevent bouncing fileupload field
After a file is selected in the first step of an upload,
the options are shown and the fileupload field is resized
to a much smaller field. In Chrome and other browsers
this field bounces to an area above the form.
Use relative positioning and fixed heights to prevent this
UI glitch.
Dan Untenzu [Thu, 23 Feb 2017 11:42:11 +0000 (12:42 +0100)]
[FEATURE] Convert UTC dates to clients timezone
Convert all dates & times in UTC to the clients timezone.
This requires several custom JavaScripts, as this conversion
is not possible with the Date object in all recent browsers
(latest Firefox, Chrome, Opera, Edge accept UTC date & time,
all Internet Explorer accept UTC date only).
Dan Untenzu [Thu, 23 Feb 2017 11:05:23 +0000 (12:05 +0100)]
[FEATURE] Show readable date format
Whenever date objects in PHP or JavaScript are converted
to strings, it depends on the servers/clients settings and
timezone which locale and format is used.
This may lead to situation where the date is in english,
but all other texts of Jirafeau service are in another language.
Depending on unser language it may be not possible to localise
the date, since we would need to have a list of all existing
date formats. In both PHP and JavaScript.
To avoid these translation obstacles we may use the following
fallback:
* Always use UTC timezone in PHP and render dates with UTC only
* Use the rather international format »YYYY-MM-DD hh:mm«
Remove further form action targets, if these forms should be send
to the same page anyway. In this case we may safely omnit the
action attribute and safe some path constructions.
Dan Untenzu [Fri, 27 Jan 2017 09:23:50 +0000 (10:23 +0100)]
[BUGFIX] Catch errors in upload form
The upload forms failed to catch errors due to a
never matching condition. Failing uploads (eg. because of
filesize limit etc.) still tried to render non-existing
download links instead of showing the error.
Fix the condition by testing if the return string
starts with "Error" instead of equals "Error".
Dan Untenzu [Tue, 24 Jan 2017 15:57:32 +0000 (16:57 +0100)]
[TASK] Rename license short identifier
The official short identifier for
"GNU Affero General Public License v3.0" is "AGPL-3.0"
(see https://spdx.org/licenses/ → https://spdx.org/licenses/AGPL-3.0.html)
Dan Untenzu [Wed, 18 Jan 2017 18:32:37 +0000 (19:32 +0100)]
[FEATURE] Autogenerate prefix for absolute links
Add a helping variable to build absolute links to
the root of the domain without handling the URL scheme.
This way all links could get rid of the host & domain part,
and just build absolute links to the root instead.
(Replace "[https://example.com/foo/] + [functions.js]" with
"[/foo/] + [functions.js]")
Dan Untenzu [Wed, 18 Jan 2017 18:00:44 +0000 (19:00 +0100)]
[FEATURE] Installer: Remove (unknown) form target URL
The domain on which Jirafeau is running, is not yet
defined while installing the project. In order to build valid
action links for the form, the script generated a possible URL
using the request header. This method may fail for proxies
or while using HTTPS or due to spoofing or…
In HTML5 we can safely omnit the action attribute (see
http://stackoverflow.com/a/9678030), which will cause the browser
to send the request to the exact same URL again.
This way we can avoid the URL guessing during the installation.
pixelbrackets [Tue, 17 Jan 2017 21:21:47 +0000 (22:21 +0100)]
[!!][FEATURE] Remove XHTML doctype
The project uses a HTML5 doctype, but switches
to XHTML if a condition says that the clients browser
can handle XHTML. As this is the case for nearly any
browser which also supports HTML5, the condition causes
the script to *always* render the XHTML doctype.
We remove the whole condition and the XHTML doctype
in favour of a HTML5 doctype only.
Note: This may be considered as breaking change,
since HTML5 may not be working in ancient versions of IE.
Dan Untenzu [Tue, 17 Jan 2017 15:36:54 +0000 (16:36 +0100)]
[FEATURE] Docs: Explain how to obey the AGPLv3 license
This project uses the AGPLv3 license. If an admin decides
to make some adaptions to the source code, and run a service with
these changes incorporated, the admin is required to offer
the servers users a download of the source code of his version.
Describe in the README how to do that conveniently with the ToS page.
Dan Untenzu [Tue, 17 Jan 2017 11:42:04 +0000 (12:42 +0100)]
[!!][FEATURE] Let admin overwrite the ToS page
Let the admin overwrite the content of the
"Terms of Service" page by copying the original ToS
template and creating a local file (same procedure as
for the configuration). This file is not versionized.
Note: This is a breaking change, since the existing
tos textfile is moved. This should be mentioned
in the update comments.
* ToS text file changed → move file from "/tos_text.php"
to "/lib/tos.local.txt" and remove all HTML und PHP Tags,
leaving a regular text file.
Simplify the generation of the local configuration file
by replacing various loops with shorter PHP standard methods.
This will cause the local configuration to have a slightly
different style, but it is still an array therefore is
readable and changeable by PHP developers.
Dan Untenzu [Mon, 16 Jan 2017 16:54:01 +0000 (17:54 +0100)]
[FEATURE] Move config include into settings file
Move the include of the original and the local
configuration file into the settings file to reduce one
includes in each file, have all settings in one place
and remove unneccessary code from the config file
(which makes it easier to copy and change it).