439 Commits

Author SHA1 Message Date
Dan Untenzu
0f38bca0ce [FEATURE] Style: Wrap divider in footer
Wrap footer divider to allow better styling.
2017-03-17 15:57:29 +01:00
Dan Untenzu
4a0435033a [FEATURE] Enable custom favicons
Enable integrators to add custom favicons by
including it from the media folder (themes).
2017-03-17 15:54:22 +01:00
Jerome Jutteau
71e621e81a [BUGFIX] fix broken password auth and deny access
ref #107
closes #111
2017-03-09 18:04:59 +00:00
Jerome Jutteau
767576759a [DOC] Fix feature list of 3.0.0
Integrating missed bits of Dan Untenzu

Signed-off-by: Jerome Jutteau <jerome.jutteau@outscale.com>
3.0.0
2017-02-23 18:46:11 +01:00
Jerome Jutteau
421de927c7 Jirafeau version 3.0.0
Signed-off-by: Jerome Jutteau <jerome.jutteau@outscale.com>
2017-02-23 18:34:21 +01:00
Dan Untenzu
16f840d39d [FEATURE] Docs: Note steps to prepare new releases
Write down all required steps for new releases.

Refs #104 #109
2017-02-23 18:34:20 +01:00
Dan Untenzu
3fe3552344 [FEATURE] Add walktrough to create merge requests
Explain a bit how merge requests are made on Gitlab
to easen the hurdle for new contributors.

Refs #104
2017-02-23 18:34:20 +01:00
Dan Untenzu
f2ec213d8b [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.

Refs #71
2017-02-23 18:34:20 +01:00
Dan Untenzu
1a6ad62b5b [BUGFIX] Fix UI glitch in admin table
Enlarge file table in admin view, to prevent that the
surrounding border is smaler than the automatically resized table.

Refs #71
2017-02-23 18:34:20 +01:00
Dan Untenzu
ad3b6e4639 [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).

Refs #59 #106
2017-02-23 18:34:20 +01:00
Dan Untenzu
ce571122a5 [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«

Refs #59 #106 #73
2017-02-23 18:34:20 +01:00
Dan Untenzu
ea78557b0c [FEATURE] Upload Script: Refactor datefield setter
Reduce method calls in upload script to prepare
upcoming date format changes.
2017-02-23 18:34:20 +01:00
Dan Untenzu
88441753d7 [FEATURE] Set default timezone
Set UTC as default timezone for all date/time functions.

Dont rely on the servers timezone, since this timezone may
change on cloud hosts or may nit be set at all.

Using UTC is a best practice to avoid timezone issues etc.

Refs #73
2017-02-23 18:34:20 +01:00
Dan Untenzu
cd09b476cb [BUGFIX] Admin page: Prefix path to download links
The download links in the admin page have no
path prefix and therefore all installations with within
a subdirectory create no-working links.

Prefix the JIRAFEAU_ABSPREFIX to create working URLs.

Refs #108
2017-02-23 18:34:20 +01:00
Dan Untenzu
89d002baaa [FEATURE] Follow up: Remove further form targets
Follow up for commit a12b04d2670d2916008e53b4f5a2cc5f158cb998.

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.
2017-02-23 18:34:20 +01:00
Marc Hauswirth
f65244fc26 ip or password (see issue 107) 2017-02-23 18:34:20 +01:00
Dan Untenzu
169cbfa6f1 [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".

Refs #96
2017-02-23 18:34:20 +01:00
Dan Untenzu
5d175ba7dd [FEATURE] Readme: Add CI badges
Add status badge of latest CI run to the readme file.
2017-02-23 18:34:20 +01:00
Dan Untenzu
c9d656d489 [FEATURE] Docs: Add system requirements
Note that PHP >= 5.6 is a system requirement.

refs #72
2017-02-23 18:34:20 +01:00
Dan Untenzu
16ecb03f1e [FEATURE] Contribution Guide: Declare PSR-2 Coding Style
All PHP code should now follow PSR-2.
2017-02-23 18:34:20 +01:00
Dan Untenzu
96707e02b8 [FEATURE] Switch to PSR-2
Convert all PHP files to PSR-2, which defined
a basic Coding Style Guide for PHP projects.

Using the awesome friendsofphp/php-cs-fixer tool,
running with the @PSR2 ruleset.

1) script.php (no_spaces_after_function_name, braces)
2) f.php (indentation_type, no_spaces_after_function_name, braces)
3) install.php (indentation_type, function_declaration, elseif, no_spaces_after_function_name, braces)
4) lib/functions.php (no_spaces_inside_parenthesis, method_argument_space, function_declaration, elseif, no_spaces_after_function_name, lowercase_constants, lowercase_keywords, braces, single_blank_line_at_eof)
5) lib/functions.js.php (no_spaces_after_function_name)
6) lib/lang.php (function_declaration, no_spaces_after_function_name, lowercase_constants, no_closing_tag, braces, single_blank_line_at_eof)
7) lib/template/footer.php (braces)
8) lib/config.local.bak.php (method_argument_space, no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
9) lib/config.original.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)
0) lib/settings.php (indentation_type, no_spaces_after_function_name, braces)
1) lib/config.local.php (no_spaces_after_function_name, single_blank_line_at_eof)
2) index.php (indentation_type, no_spaces_after_function_name, braces)
3) admin.php (no_spaces_after_function_name, braces)
4) tos.php (no_spaces_after_function_name, no_closing_tag, single_blank_line_at_eof)

Refs #103
2017-02-23 18:34:20 +01:00
Dan Untenzu
719b7e58a9 [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)
2017-02-23 18:34:20 +01:00
Dan Untenzu
913fb0f876 [FEATURE] Docs: Explain branches
Explain master and next-release branch.

Master should always be a live version only,
unless the version is changed to something like "2.0.0-dev".

Refs #
2017-02-23 18:34:20 +01:00
Dan Untenzu
0316db1a4d [TASK] CGL: Remove trailing whitespaces
Remove all trailing whitespaces
2017-02-23 18:34:20 +01:00
Dan Untenzu
9c31e57d7c [TASK] CGL: Fix line endings
All line endings are LF (Unix) now.

(bash command to convert all files: http://stackoverflow.com/a/37846265/3894752)
2017-02-23 18:34:20 +01:00
Dan Untenzu
4d41ec577b [FEATURE] Contribution guide: Revise structure
* Add description of new files
* Explain file system a bit further
* Fix some typos
2017-02-23 18:34:20 +01:00
Dan Untenzu
6a04487fc7 [FEATURE] Readme: Add points to changelog 2017-02-23 18:34:19 +01:00
Dan Untenzu
bf0a496a10 [FEATURE] Replace all domain depended links
Replace all occurences of "web_root" (domain depended links)
with "JIRAFEAU_ABSPREFIX" (absolute links to the root level).

Links like "https://example.com/foo/functions.js" are replaced
with "/foo/functions.js".

Refs #79
2017-02-23 18:34:19 +01:00
Dan Untenzu
1f063df812 [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]")

Refs #79
2017-02-23 18:34:19 +01:00
Dan Untenzu
50f88df47f [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.

Refs #79
2017-02-23 18:34:19 +01:00
Dan Untenzu
c147db2590 [FEATURE] Remove redundant constants
Remove some redundant settings
2017-02-23 18:34:19 +01:00
Dan Untenzu
c4535e1708 [BUGFIX] Remove redundant header variable
By removing the XHTML doctype it is not neccessary
anymore to tell proxys that the content type may change.

So this header is redunant now.
2017-02-23 18:34:19 +01:00
Dan Untenzu
018ba3679f [BUGFIX] Remove redundant style fallback
Remove condition for an existing theme,
since a default configuration is always set.

Even if this would not be the case, would
the current fallback try to load a non-existing
theme called "default".

So remove this whole block.
2017-02-23 18:34:19 +01:00
pixelbrackets
75f4119aba [!!][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.

Refs #97
2017-02-23 18:34:19 +01:00
Dan Untenzu
caa57721c5 [FEATURE] Docs: Revice upgrade instructions
* Rewrite general upgrade instructions
* Better explaination for breaking changes in
  each version and how to fix them
2017-02-23 18:34:19 +01:00
Dan Untenzu
9d9faa6095 [FEATURE] Add Gitlab CI
Make use of the fantastic Gitlab CI to run some
tests automatically after each push.

First test: test for PHP errors in different versions.
2017-01-27 09:18:50 +01:00
Jerome Jutteau
39a36cda14 Simpler docker dev env
Note: ._* files are created due to docker file system sync, ignore them

Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2017-01-22 14:00:40 +01:00
Jerome Jutteau
2f04c1bf32 Jirafeau version 2.0.0
Signed-off-by: Jerome Jutteau <j.jutteau@gmail.com>
2.0.0
2017-01-19 19:35:53 +00:00
Dan Untenzu
a8d9576836 [FEATURE] Styles: Add padding 2017-01-19 19:03:03 +00:00
Dan Untenzu
279ccffd5d [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.

Closes #95
2017-01-19 19:03:03 +00:00
Dan Untenzu
04145f58ba [BUGFIX] Translations: Rename ToS
Rename ToS label to plural
2017-01-19 19:03:03 +00:00
Dan Untenzu
7adb69c9ae [FEATURE] Footer: Nicer project title 2017-01-19 19:03:03 +00:00
Dan Untenzu
1ed002b703 [FEATURE] Enable a custom website title
Enable the administrator to set a custom title
for his installation of Jirafeau, eg. "John Doe Filecenter".
2017-01-19 19:03:03 +00:00
Dan Untenzu
2b10abd17f [FEATURE] Template Markers: Replace configuration values
Replace markers with configured values.
2017-01-19 19:03:03 +00:00
Dan Untenzu
4a53554259 [!!][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.

Refs #95
2017-01-19 19:03:03 +00:00
Dan Untenzu
381f2d6ec2 [FEATURE] Replace markers in templates
Add a function to allow a simple marker replacement,
eg. for the Terms of Service page.

Markers have the scheme "###MARKERNAME###".
2017-01-19 19:03:03 +00:00
Dan Untenzu
e1c30044b1 [FEATURE] Install script: Simplify config generation
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.
2017-01-19 19:03:03 +00:00
Dan Untenzu
af7e43a4a3 [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).
2017-01-19 19:03:03 +00:00
Dan Untenzu
18b6e57c00 [FEATURE] Install script: Reduce test code
Add some comments to enhance the readabillity in the
installation script.

Reduce footer includes and send all fatal errors
to one function instead.

Remove includes of installation depenend variables
in the footer, if the installation script is not
done yet.

Move settings include to the top (this may help
for future configuration tests).
2017-01-19 19:03:03 +00:00
Dan Untenzu
e2db43bbc9 [FEATURE] Docs: Enhance readabilty of config params
Add some linebreaks and streamline comment style.
2017-01-19 19:03:03 +00:00