merge master in prod
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
themes/grav/.sass-cache
|
||||
.DS_Store
|
||||
crowdin.yaml
|
||||
|
||||
# Node Modules
|
||||
**/node_modules/**
|
||||
|
||||
@@ -1,3 +1,53 @@
|
||||
# v1.9.16
|
||||
## 09/01/2020
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed a glitch which allows user to delete entire pages directory [#1941](https://github.com/getgrav/grav-plugin-admin/issues/1941)
|
||||
* Fixed the hidden login plugin toggle
|
||||
|
||||
# v1.9.15
|
||||
## 06/08/2020
|
||||
|
||||
1. [](#bugfix)
|
||||
* Support markdown in `fieldset.text` [#2934](https://github.com/getgrav/grav/issues/2934)
|
||||
* Fix data URLs in avatar images [#1889](https://github.com/getgrav/grav/issues/1889)
|
||||
* Fix for deleting files in plugin configurations
|
||||
|
||||
# v1.9.14
|
||||
## 04/27/2020
|
||||
|
||||
1. [](#improved)
|
||||
* Added `slug` and `type` to blueprints
|
||||
1. [](#bugfix)
|
||||
* Support markdown in `fieldset.text` [#2934](https://github.com/getgrav/grav/issues/2934)
|
||||
|
||||
# v1.9.13
|
||||
## 03/05/2020
|
||||
|
||||
1. [](#improved)
|
||||
* Updated vendor libs
|
||||
1. [](#bugfix)
|
||||
* Fixed toggleable buttons no longer holding false state [form#406](ttps://github.com/getgrav/grav-plugin-form/issues/406)
|
||||
|
||||
# v1.9.12
|
||||
## 12/04/2019
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed saving configuration in PHP 7.4
|
||||
|
||||
# v1.9.11
|
||||
## 11/06/2019
|
||||
|
||||
1. [](#improved)
|
||||
* Added new "secure delete" functionality [#1752](https://github.com/getgrav/grav-plugin-admin/issues/1752)
|
||||
* Center text logo [#1751](https://github.com/getgrav/grav-plugin-admin/issues/1751)
|
||||
* Added required span to editor field [#1748](https://github.com/getgrav/grav-plugin-admin/issues/1748)
|
||||
* Warn users if JS is disabled [#1722](https://github.com/getgrav/grav-plugin-admin/issues/1722)
|
||||
* Added target rule to quick links [#1518](https://github.com/getgrav/grav-plugin-admin/issues/1518)
|
||||
1. [](#bugfix)
|
||||
* Fixed `Badly encoded JSON data` warning when uploading files [grav#2663](https://github.com/getgrav/grav/issues/2663)
|
||||
* Fixed `accept` for SVG in `file` uploaders [#1732](https://github.com/getgrav/grav-plugin-admin/issues/1732)
|
||||
|
||||
# v1.9.10
|
||||
## 09/19/2019
|
||||
|
||||
@@ -24,13 +74,13 @@
|
||||
* Fixed issue with `array` field nested in `list` that were losing their index order when the list reordered
|
||||
* Fixed file form field failing resolution checks in certain circumstances
|
||||
* Fixed issue with deleting files in config based YAML files
|
||||
|
||||
|
||||
# v1.9.7
|
||||
## 06/21/2019
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed issue with charts in dashboard where label would cut off [#1700](https://github.com/getgrav/grav-plugin-admin/issues/1700)
|
||||
* Resetting a user's password clears the user's site access [grav#2528](https://github.com/getgrav/grav/issues/2528)
|
||||
* Resetting a user's password clears the user's site access [grav#2528](https://github.com/getgrav/grav/issues/2528)
|
||||
* Fixed issue with permissions toggle [#1702](https://github.com/getgrav/grav-plugin-admin/issues/1702)
|
||||
|
||||
# v1.9.6
|
||||
@@ -72,7 +122,7 @@
|
||||
* Added a new **YAML Linter** report to the `Tools - Reports` section
|
||||
1. [](#improved)
|
||||
* Updated package.json scripts to properly use gulp compiler
|
||||
|
||||
|
||||
# v1.9.2
|
||||
## 04/15/2019
|
||||
|
||||
@@ -85,7 +135,7 @@
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fix for Page saving issues [#1648](https://github.com/getgrav/grav-plugin-admin/issues/1648)
|
||||
* Remove status message when picking folder for move [#1650](https://github.com/getgrav/grav-plugin-admin/issues/1650)
|
||||
* Remove status message when picking folder for move [#1650](https://github.com/getgrav/grav-plugin-admin/issues/1650)
|
||||
|
||||
# v1.9.0
|
||||
## 04/11/2019
|
||||
@@ -120,10 +170,10 @@
|
||||
* Homepage link should be `https://` [#1564](https://github.com/getgrav/grav-plugin-admin/issues/1564)
|
||||
* Improve lang string to describe XSS security settings [#1566](https://github.com/getgrav/grav-plugin-admin/issues/1566)
|
||||
* Take admin setting for 2FA into account when showing user 2FA badge [#1568](https://github.com/getgrav/grav-plugin-admin/issues/1568)
|
||||
* Moved `ignore` and `key` field into form plugin
|
||||
* Moved `ignore` and `key` field into form plugin
|
||||
* Improved usability of `System` configuration blueprint with side-tabs
|
||||
* Cleaned up UI in `Scheduler` tools page
|
||||
* Updated languages
|
||||
* Cleaned up UI in `Scheduler` tools page
|
||||
* Updated languages
|
||||
1. [](#bugfix)
|
||||
* Fixed user edit links if Flex Objects plugin is installed but user isn't Flex User
|
||||
* Fixed deprecated `sameas()` Twig test
|
||||
@@ -133,15 +183,15 @@
|
||||
* Fixed issue with Safari browser and blueprint fields with `toggleable: true` [#1643](https://github.com/getgrav/grav-plugin-admin/issues/1643)
|
||||
* Incorrect 2FA lang code [#1618](https://github.com/getgrav/grav-plugin-admin/issues/1618)
|
||||
* Fixed potential undefined property in `onPageNotFound` event handling
|
||||
* Proper fix for `vUndefined` when updating plugins/themes
|
||||
* Proper fix for `vUndefined` when updating plugins/themes
|
||||
* Text in Tab Tools/Direct install disappears [#1613](https://github.com/getgrav/grav-plugin-admin/issues/1613)
|
||||
* Fallback to page `slug` in Pages list if title is empty [grav#2267](https://github.com/getgrav/grav/issues/2267)
|
||||
* Fixes backup button issues with `;` param separator [#1602](https://github.com/getgrav/grav-plugin-admin/issues/1602) [#1502](https://github.com/getgrav/grav-plugin-admin/issues/1502)
|
||||
* Set default state for `show_modular` to `true` [#1599](https://github.com/getgrav/grav-plugin-admin/issues/1599)
|
||||
* Removed `tabs`, `tab`, and `toggle` fields as they are now in Form plugin
|
||||
* Fix issue with new page always showing modular page templates [#1573](https://github.com/getgrav/grav-plugin-admin/issues/1573)
|
||||
* Fixed issue deleting files in plugins/themes/config
|
||||
* Fixed array support in admin languages, e.g. `DAYS_OF_THE_WEEK`
|
||||
* Fixed issue deleting files in plugins/themes/config
|
||||
* Fixed array support in admin languages, e.g. `DAYS_OF_THE_WEEK`
|
||||
* Fixed user login / remember me triggering before admin gets initialized
|
||||
* Fixed a bug when deleting files via AJAX
|
||||
* Fixed error page not to be the frontend version
|
||||
@@ -154,24 +204,24 @@
|
||||
* Removed duplicate language strings
|
||||
* Fixed default `job_at` so it does not fail if missing
|
||||
* Minor JS group `bottom` fix
|
||||
|
||||
|
||||
# v1.8.20
|
||||
## 03/20/2019
|
||||
|
||||
1. [](#improved)
|
||||
* Added security field to column [#1622](https://github.com/getgrav/grav-plugin-admin/pull/1622)
|
||||
|
||||
|
||||
# v1.8.19
|
||||
## 02/13/2019
|
||||
|
||||
1. [](#bugfix)
|
||||
* Moved `show_modular` to proper place - Doh! [grav#2362](https://github.com/getgrav/grav/issues/2362)
|
||||
* Moved `show_modular` to proper place - Doh! [grav#2362](https://github.com/getgrav/grav/issues/2362)
|
||||
|
||||
# v1.8.18
|
||||
## 02/12/2019
|
||||
|
||||
1. [](#bugfix)
|
||||
* Set default value for `show_modular` [grav#2362](https://github.com/getgrav/grav/issues/2362)
|
||||
* Set default value for `show_modular` [grav#2362](https://github.com/getgrav/grav/issues/2362)
|
||||
|
||||
# v1.8.17
|
||||
## 02/07/2019
|
||||
@@ -192,7 +242,7 @@
|
||||
1. [](#bugfix)
|
||||
* Fixed calendar js module not properly loading for datetime field [#1581](https://github.com/getgrav/grav-plugin-admin/issues/1581)
|
||||
* Fixed deleting file when using file field type [#1558](https://github.com/getgrav/grav-plugin-admin/issues/1558)
|
||||
* Unset state from user if not super or user admin
|
||||
* Unset state from user if not super or user admin
|
||||
|
||||
# v1.8.15
|
||||
## 12/14/2018
|
||||
|
||||
@@ -26,6 +26,7 @@ session:
|
||||
timeout: 1800
|
||||
warnings:
|
||||
delete_page: true
|
||||
secure_delete: false
|
||||
edit_mode: normal
|
||||
frontend_preview_target: inline
|
||||
show_github_msg: true
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
name: Admin Panel
|
||||
version: 1.9.10
|
||||
slug: admin
|
||||
type: plugin
|
||||
version: 1.9.16
|
||||
testing: false
|
||||
description: Adds an advanced administration panel to manage your site
|
||||
icon: empire
|
||||
@@ -14,7 +16,7 @@ docs: https://github.com/getgrav/grav-plugin-admin/blob/develop/README.md
|
||||
license: MIT
|
||||
|
||||
dependencies:
|
||||
- { name: grav, version: '>=1.6.8' }
|
||||
- { name: grav, version: '>=1.6.22' }
|
||||
- { name: form, version: '>=3.0.0' }
|
||||
- { name: login, version: '>=3.0.0' }
|
||||
- { name: email, version: '>=3.0.0' }
|
||||
@@ -243,6 +245,18 @@ form:
|
||||
type: bool
|
||||
help: Ask the user confirmation when deleting a page
|
||||
|
||||
warnings.secure_delete:
|
||||
type: toggle
|
||||
label: Secure Delete
|
||||
highlight: 1
|
||||
default: 1
|
||||
options:
|
||||
1: PLUGIN_ADMIN.ENABLED
|
||||
0: PLUGIN_ADMIN.DISABLED
|
||||
validate:
|
||||
type: bool
|
||||
help: Shows the user a field to enter the word DELETE and enable the confirm delete button.
|
||||
|
||||
hide_page_types:
|
||||
type: array
|
||||
label: Hide page types in Admin
|
||||
|
||||
@@ -1671,8 +1671,11 @@ class Admin
|
||||
{
|
||||
$reports = new ArrayCollection();
|
||||
|
||||
/** @var Pages $pages */
|
||||
$pages = $this->grav['pages'];
|
||||
|
||||
// Default to XSS Security Report
|
||||
$result = Security::detectXssFromPages($this->grav['pages'], true);
|
||||
$result = Security::detectXssFromPages($pages, true);
|
||||
|
||||
$reports['Grav Security Check'] = $this->grav['twig']->processTemplate('reports/security.html.twig', [
|
||||
'result' => $result,
|
||||
|
||||
@@ -325,7 +325,7 @@ class AdminBaseController
|
||||
}
|
||||
|
||||
$isMime = strstr($type, '/');
|
||||
$find = str_replace(['.', '*'], ['\.', '.*'], $type);
|
||||
$find = str_replace(['.', '*', '+'], ['\.', '.*', '\+'], $type);
|
||||
|
||||
if ($isMime) {
|
||||
$match = preg_match('#' . $find . '$#', $mime);
|
||||
@@ -737,8 +737,8 @@ class AdminBaseController
|
||||
// Process previously uploaded files for the current URI
|
||||
// and finally store them. Everything else will get discarded
|
||||
$queue = $this->admin->session()->getFlashObject('files-upload');
|
||||
$queue = $queue[base64_encode($this->grav['uri']->url())];
|
||||
if (is_array($queue)) {
|
||||
$queue = $queue[base64_encode($this->grav['uri']->url())];
|
||||
foreach ($queue as $key => $files) {
|
||||
foreach ($files as $destination => $file) {
|
||||
if (!rename($file['tmp_name'], $destination)) {
|
||||
@@ -943,7 +943,7 @@ class AdminBaseController
|
||||
$settings = (object)$blueprints->schema()->getProperty($field);
|
||||
} else {
|
||||
$page = null;
|
||||
if ($type === 'themes') {
|
||||
if ($type === 'themes' || $type === 'plugins') {
|
||||
$obj = $this->grav[$type]->get(Utils::substrToString($blueprint, '/')); //here
|
||||
$settings = (object) $obj->blueprints()->schema()->getProperty($field);
|
||||
} else {
|
||||
|
||||
@@ -487,6 +487,11 @@ class AdminController extends AdminBaseController
|
||||
|
||||
$data = (array)$this->data;
|
||||
|
||||
$folder = $data['folder'] ?? '';
|
||||
if ($folder === '' || mb_strpos($folder, '/') !== false) {
|
||||
throw new \RuntimeException('Creating folder failed, bad folder name', 400);
|
||||
}
|
||||
|
||||
if ($data['route'] === '/') {
|
||||
$path = $this->grav['locator']->findResource('page://');
|
||||
} else {
|
||||
@@ -494,7 +499,7 @@ class AdminController extends AdminBaseController
|
||||
}
|
||||
|
||||
$orderOfNewFolder = static::getNextOrderInFolder($path);
|
||||
$new_path = $path . '/' . $orderOfNewFolder . '.' . $data['folder'];
|
||||
$new_path = $path . '/' . $orderOfNewFolder . '.' . $folder;
|
||||
|
||||
Folder::create($new_path);
|
||||
Cache::clearCache('invalidate');
|
||||
@@ -585,6 +590,11 @@ class AdminController extends AdminBaseController
|
||||
/** @var PageInterface $obj */
|
||||
$obj = $this->admin->page(true);
|
||||
|
||||
$folder = $data['folder'] ?? null;
|
||||
if ($folder === '' || mb_strpos($folder, '/') !== false) {
|
||||
throw new \RuntimeException('Saving page failed: bad folder name', 400);
|
||||
}
|
||||
|
||||
if (!isset($data['folder']) || !$data['folder']) {
|
||||
$data['folder'] = $obj->slug();
|
||||
$this->data['folder'] = $obj->slug();
|
||||
@@ -814,6 +824,10 @@ class AdminController extends AdminBaseController
|
||||
$folder = \Grav\Plugin\Admin\Utils::slug($data[substr($folder, 9)]);
|
||||
}
|
||||
$folder = ltrim($folder, '_');
|
||||
if ($folder === '' || mb_strpos($folder, '/') !== false) {
|
||||
throw new \RuntimeException('Creating page failed: bad folder name', 400);
|
||||
}
|
||||
|
||||
if (!empty($data['modular'])) {
|
||||
$folder = '_' . $folder;
|
||||
}
|
||||
|
||||
Generated
+517
-341
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
PLUGIN_ADMIN:
|
||||
ADMIN_NOSCRIPT_MSG: "Please enable JavaScript in your browser."
|
||||
ADMIN_BETA_MSG: "This is a Beta release! Use this in production at your own risk..."
|
||||
ADMIN_REPORT_ISSUE: "Found an issue? Please report it on GitHub."
|
||||
EMAIL_FOOTER: "<a href=\"http://getgrav.org\">Powered by Grav</a> - The Modern Flat File CMS"
|
||||
@@ -43,10 +44,12 @@ PLUGIN_ADMIN:
|
||||
EXPERT: "Expert"
|
||||
EXPAND_ALL: "Expand All"
|
||||
COLLAPSE_ALL: "Collapse All"
|
||||
SECURE_DELETE_DESC: "Type DELETE and confirm"
|
||||
ERROR: "Error"
|
||||
CLOSE: "Close"
|
||||
CANCEL: "Cancel"
|
||||
CONTINUE: "Continue"
|
||||
CONFIRM: "Confirm"
|
||||
MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE: "Confirmation Required"
|
||||
MODAL_CHANGED_DETECTED_TITLE: "Changes Detected"
|
||||
MODAL_CHANGED_DETECTED_DESC: "You have unsaved changes. Are you sure you want to leave without saving?"
|
||||
@@ -825,3 +828,6 @@ PLUGIN_ADMIN:
|
||||
DEBUGGER_CLOCKWORK: "Clockwork Browser Extension"
|
||||
SHOW_SENSITIVE: "Show Sensitive Data"
|
||||
SHOW_SENSITIVE_HELP: "Clockwork Provider ONLY: Censor potentially sensitive information (POST parameters, cookies, files, configuration and most array/object data in log messages)"
|
||||
VALID_LINK_ATTRIBUTES: "Valid Link Attributes"
|
||||
VALID_LINK_ATTRIBUTES_HELP: "Attributes that will be automatically added to the media HTML element"
|
||||
|
||||
|
||||
@@ -43,10 +43,12 @@ PLUGIN_ADMIN:
|
||||
EXPERT: "Esperto"
|
||||
EXPAND_ALL: "Expandir Tudo"
|
||||
COLLAPSE_ALL: "Recolher Tudo"
|
||||
SECURE_DELETE_DESC: "Digite DELETE e confirme"
|
||||
ERROR: "Erro"
|
||||
CLOSE: "Fechar"
|
||||
CANCEL: "Cancelar"
|
||||
CONTINUE: "Continuar"
|
||||
CONFIRM: "Confirmar"
|
||||
MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE: "Confirmação Requerida"
|
||||
MODAL_CHANGED_DETECTED_TITLE: "Alterações Detectadas"
|
||||
MODAL_CHANGED_DETECTED_DESC: "Você tem alterações não salvas. Tem certeza que deseja sair sem salvar?"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -3,7 +3,7 @@ $fonts-default: 'Roboto' !default;
|
||||
$fonts-mono: 'Inconsolata' !default;
|
||||
|
||||
$font-definitions: (
|
||||
Josefin+Slab: 400,
|
||||
'Josefin Slab': '400',
|
||||
Roboto: '300,400,500',
|
||||
Inconsolata: '400,700'
|
||||
);
|
||||
|
||||
@@ -244,7 +244,7 @@ $content-padding: 1.5rem;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
a:not(.front-end) {
|
||||
display: inherit;
|
||||
}
|
||||
@@ -798,6 +798,7 @@ body.sidebar-quickopen #admin-main {
|
||||
|
||||
.button {
|
||||
margin: 0;
|
||||
height: 37px;
|
||||
|
||||
&.dropdown-toggle {
|
||||
margin-left: -4px;
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
justify-content: center;
|
||||
|
||||
&.text-logo {
|
||||
text-align: center;
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
|
||||
&:disabled {
|
||||
opacity: .6;
|
||||
cursor: no-drop;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
{% if not blueprints or (blueprints.schema.type(field.type)['input@'] ?? true) is same as(true) %}
|
||||
{% set originalValue = originalValue is defined ? originalValue : value %}
|
||||
{% set toggleableChecked = field.toggleable and (originalValue is not null and originalValue is not empty) %}
|
||||
{% set toggleableChecked = field.toggleable and originalValue is not null %}
|
||||
{% set isDisabledToggleable = field.toggleable and not toggleableChecked %}
|
||||
{% set value = (value is null ? field.default : value) %}
|
||||
{% set value = value ?? field.default %}
|
||||
|
||||
{% if (field.yaml or field.validate.type == 'yaml') and value is iterable%}
|
||||
{% set value = value|toYaml %}
|
||||
|
||||
@@ -11,7 +11,10 @@
|
||||
{% if field.help %}
|
||||
{% set hint = 'data-hint="' ~ field.help|tu|raw ~ '"' %}
|
||||
{% endif %}
|
||||
<div class="form-label form-field hint--bottom" {{ hint|raw }}>{{ field.label|tu|raw }}</div>
|
||||
<div class="form-label form-field hint--bottom" {{ hint|raw }}>
|
||||
{{ field.label|tu|raw }}
|
||||
{{ field.validate.required in ['on', 'true', 1] ? '<span class="required">*</span>' }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
<div class="form-field {{ field.classes|default('') }}">
|
||||
|
||||
@@ -48,9 +48,12 @@
|
||||
>
|
||||
|
||||
{% block group %}
|
||||
{% if field.text %}
|
||||
<p>{% if grav.twig.twig.filters['tu'] is defined %}{{ field.text|tu }}{% else %}{{ field.text|t }}{% endif %}
|
||||
<p>
|
||||
{% if field.text %}
|
||||
{% if grav.twig.twig.filters['tu'] is defined %}
|
||||
{{ field.markdown ? field.text|tu|markdown : '<p>' ~ field.text|tu ~ '</p>' }}
|
||||
{% else %}
|
||||
{{ field.markdown ? field.text|t|markdown : '<p>' ~ field.t ~ '</p>' }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if field.fields %}
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
|
||||
{% set modular = context.modular ? 'modular_' : '' %}
|
||||
{% set warn = config.plugins.admin.warnings.delete_page %}
|
||||
{% set secure_delete = config.plugins.admin.warnings.secure_delete %}
|
||||
{% set admin_lang = admin.session.admin_lang ?: 'en' %}
|
||||
{% set page_lang = context.language %}
|
||||
{% set type = 'page' %}
|
||||
@@ -405,10 +406,19 @@
|
||||
<p class="bigger">
|
||||
{{ "PLUGIN_ADMIN.MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_DESC"|tu }}
|
||||
</p>
|
||||
{% if secure_delete %}
|
||||
<p class="form-secure-delete">
|
||||
<input id="secure-delete-field" autofocus type="text" placeholder="{{ "PLUGIN_ADMIN.SECURE_DELETE_DESC"|tu }}" />
|
||||
</p>
|
||||
{% endif %}
|
||||
<br>
|
||||
<div class="button-bar">
|
||||
<button data-remodal-action="cancel" class="button secondary remodal-cancel"><i class="fa fa-fw fa-close"></i> {{ "PLUGIN_ADMIN.CANCEL"|tu }}</button>
|
||||
<a class="button disable-after-click" data-delete-action href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
|
||||
{% if secure_delete %}
|
||||
<button id="secure-delete-btn" disabled="true" class="button danger disable-after-click" data-delete-action><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONFIRM"|tu }}</button>
|
||||
{% else %}
|
||||
<a class="button danger disable-after-click" data-delete-action href="#"><i class="fa fa-fw fa-check"></i> {{ "PLUGIN_ADMIN.CONTINUE"|tu }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -421,5 +431,18 @@
|
||||
{{ parent() }}
|
||||
<script>
|
||||
$('.admin-pages .form-tabs .tabs-nav').css('margin-right', ($('#admin-topbar').width() + 20) + 'px');
|
||||
{% if secure_delete %}
|
||||
$('#secure-delete-field').keyup(function () {
|
||||
var inputValue = $(this).val();
|
||||
if (inputValue == 'DELETE') {
|
||||
$('#secure-delete-btn').attr('disabled', false);
|
||||
}else{
|
||||
$('#secure-delete-btn').attr('disabled', true);
|
||||
}
|
||||
});
|
||||
$(document).on('closing', '.remodal', function () {
|
||||
$('#secure-delete-field').val('');
|
||||
});
|
||||
{% endif %}
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
@@ -40,6 +40,10 @@
|
||||
{% include 'partials/messages.html.twig' %}
|
||||
{% else %}
|
||||
|
||||
{% block noscript %}
|
||||
{% include 'partials/noscript.html.twig' %}
|
||||
{% endblock noscript %}
|
||||
|
||||
{% block page %}
|
||||
<div class="remodal-bg">
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{% endif %}
|
||||
<li class="{{ item.class }} hint--bottom" data-hint="{{ item.hint }}" {{ data_tags|raw }}>
|
||||
{% if item.route %}
|
||||
<a href="{{ url(item.route) }}">
|
||||
<a href="{{ url(item.route) }}" {% if item.target %}target="{{ item.target }}"{% endif %}>
|
||||
<i class="fa fa-fw {{ item.icon }}"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
{% set user_avatar = admin.user.getAvatarUrl() %}
|
||||
<img src="{{ '?' not in user_avatar ? user_avatar ~ '?s=80' : user_avatar }}" />
|
||||
<img src="{{ ('?' not in user_avatar) and (not user_avatar starts with 'data:') ? user_avatar ~ '?s=80' : user_avatar }}" />
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
<style>
|
||||
.error-message {
|
||||
background-color: #fce4e4;
|
||||
border: 1px solid #fcc2c3;
|
||||
width: 100%;
|
||||
padding: 20px 30px;
|
||||
}
|
||||
.error-text {
|
||||
color: #cc0033;
|
||||
font-family: Helvetica, Arial, sans-serif;
|
||||
width: 100%;
|
||||
font-weight: bold;
|
||||
line-height: 20px;
|
||||
text-shadow: 1px 1px rgba(250,250,250,.3);
|
||||
}
|
||||
.full-height {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div id="noscript" class="full-height">
|
||||
<main id="admin-main" class="full-height">
|
||||
<div id="titlebar" class="titlebar">
|
||||
<h1><i class="fa fa-fw fa-exclamation-triangle"></i>{{ "PLUGIN_ADMIN.ERROR"|tu }}</h1>
|
||||
</div>
|
||||
<div class="full-height">
|
||||
<div class="error-message {% if config.plugins.admin.content_padding %}content-padding{% endif %}">
|
||||
<span class="error-text">{{ "PLUGIN_ADMIN.ADMIN_NOSCRIPT_MSG"|tu }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function checkjs() {
|
||||
var element = document.getElementById("noscript");
|
||||
element.style.display = 'none';
|
||||
}
|
||||
checkjs();
|
||||
</script>
|
||||
@@ -42,7 +42,7 @@
|
||||
{% if isTestingRelease %}<span class="gpm-testing">test release</span>{% endif %}
|
||||
</td>
|
||||
<td class="gpm-actions">
|
||||
{% if (not installing and (plugin.form.fields.enabled.type != 'hidden' and plugin.form.fields.tabs.fields.login.fields.enabled.type != 'hidden')) %}
|
||||
{% if (not installing and (plugin.form.fields.enabled.type != 'hidden' and plugin.form.fields.tabs.fields.options.fields.enabled.type != 'hidden')) %}
|
||||
<a class="{{ data.get('enabled') ? 'enabled' : 'disabled' }}" href="{{ uri.addNonce(base_url_relative ~ '/plugins/' ~ slug ~ '/task' ~ config.system.param_sep ~ (data.get('enabled') ? 'disable' : 'enable'), 'admin-form', 'admin-nonce') }}">
|
||||
<i class="fa fa-fw fa-toggle-{{ data.get('enabled') ? 'on' : 'off' }}"></i>
|
||||
</a>
|
||||
|
||||
+2
-2
@@ -279,7 +279,7 @@ class ClassLoader
|
||||
*/
|
||||
public function setApcuPrefix($apcuPrefix)
|
||||
{
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && ini_get('apc.enabled') ? $apcuPrefix : null;
|
||||
$this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -377,7 +377,7 @@ class ClassLoader
|
||||
$subPath = $class;
|
||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||
$subPath = substr($subPath, 0, $lastPos);
|
||||
$search = $subPath.'\\';
|
||||
$search = $subPath . '\\';
|
||||
if (isset($this->prefixDirsPsr4[$search])) {
|
||||
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||
|
||||
+9
-9
@@ -1,27 +1,26 @@
|
||||
[
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "1.4.2",
|
||||
"version_normalized": "1.4.2.0",
|
||||
"version": "1.5.1",
|
||||
"version_normalized": "1.5.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "c7cb9a2095a074d131b65a8a0cd294479d785573"
|
||||
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/c7cb9a2095a074d131b65a8a0cd294479d785573",
|
||||
"reference": "c7cb9a2095a074d131b65a8a0cd294479d785573",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
|
||||
"reference": "c6bea70230ef4dd483e6bbcab6005f682ed3a8de",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5 || ^5.0.5",
|
||||
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
|
||||
"phpunit/phpunit": "^4.5 || ^5.0.5"
|
||||
},
|
||||
"time": "2016-08-30T16:08:34+00:00",
|
||||
"time": "2020-01-13T12:06:48+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@@ -164,6 +163,7 @@
|
||||
"security",
|
||||
"xml",
|
||||
"zf"
|
||||
]
|
||||
],
|
||||
"abandoned": "laminas/laminas-xml"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -3,6 +3,15 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### [1.5.1] 2020-01-13
|
||||
|
||||
* Fixed: Parsing of aliased version was not validating the alias to be a valid version
|
||||
|
||||
### [1.5.0] 2019-03-19
|
||||
|
||||
* Added: some support for date versions (e.g. 201903) in `~` operator
|
||||
* Fixed: support for stabilities in `~` operator was inconsistent
|
||||
|
||||
### [1.4.2] 2016-08-30
|
||||
|
||||
* Fixed: collapsing of complex constraints lead to buggy constraints
|
||||
@@ -57,6 +66,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Namespace: `Composer\Test\Package\LinkConstraint` -> `Composer\Test\Semver\Constraint`
|
||||
* Changed: code style using php-cs-fixer.
|
||||
|
||||
[1.5.1]: https://github.com/composer/semver/compare/1.5.0...1.5.1
|
||||
[1.5.0]: https://github.com/composer/semver/compare/1.4.2...1.5.0
|
||||
[1.4.2]: https://github.com/composer/semver/compare/1.4.1...1.4.2
|
||||
[1.4.1]: https://github.com/composer/semver/compare/1.4.0...1.4.1
|
||||
[1.4.0]: https://github.com/composer/semver/compare/1.3.0...1.4.0
|
||||
[1.3.0]: https://github.com/composer/semver/compare/1.2.0...1.3.0
|
||||
|
||||
+1
-2
@@ -34,8 +34,7 @@
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5 || ^5.0.5",
|
||||
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
|
||||
"phpunit/phpunit": "^4.5 || ^5.0.5"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
|
||||
namespace Composer\Semver\Constraint;
|
||||
|
||||
trigger_error('The ' . __CLASS__ . ' abstract class is deprecated, there is no replacement for it, it will be removed in the next major version.', E_USER_DEPRECATED);
|
||||
trigger_error('The ' . __NAMESPACE__ . '\AbstractConstraint abstract class is deprecated, there is no replacement for it, it will be removed in the next major version.', E_USER_DEPRECATED);
|
||||
|
||||
/**
|
||||
* Base constraint class.
|
||||
|
||||
@@ -184,7 +184,7 @@ class Constraint implements ConstraintInterface
|
||||
// '!=' operator is match when other operator is not '==' operator or version is not match
|
||||
// these kinds of comparisons always have a solution
|
||||
if ($isNonEqualOp || $isProviderNonEqualOp) {
|
||||
return !$isEqualOp && !$isProviderEqualOp
|
||||
return (!$isEqualOp && !$isProviderEqualOp)
|
||||
|| $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
|
||||
}
|
||||
|
||||
@@ -197,13 +197,9 @@ class Constraint implements ConstraintInterface
|
||||
if ($this->versionCompare($provider->version, $this->version, self::$transOpInt[$this->operator], $compareBranches)) {
|
||||
// special case, e.g. require >= 1.0 and provide < 1.0
|
||||
// 1.0 >= 1.0 but 1.0 is outside of the provided interval
|
||||
if ($provider->version === $this->version
|
||||
return !($provider->version === $this->version
|
||||
&& self::$transOpInt[$provider->operator] === $providerNoEqualOp
|
||||
&& self::$transOpInt[$this->operator] !== $noEqualOp) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
&& self::$transOpInt[$this->operator] !== $noEqualOp);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class EmptyConstraint implements ConstraintInterface
|
||||
return $this->prettyString;
|
||||
}
|
||||
|
||||
return $this->__toString();
|
||||
return (string) $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ class MultiConstraint implements ConstraintInterface
|
||||
return $this->prettyString;
|
||||
}
|
||||
|
||||
return $this->__toString();
|
||||
return (string) $this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,9 +37,9 @@ class Semver
|
||||
|
||||
$versionParser = self::$versionParser;
|
||||
$provider = new Constraint('==', $versionParser->normalize($version));
|
||||
$constraints = $versionParser->parseConstraints($constraints);
|
||||
$parsedConstraints = $versionParser->parseConstraints($constraints);
|
||||
|
||||
return $constraints->matches($provider);
|
||||
return $parsedConstraints->matches($provider);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+22
-25
@@ -52,11 +52,12 @@ class VersionParser
|
||||
{
|
||||
$version = preg_replace('{#.+$}i', '', $version);
|
||||
|
||||
if ('dev-' === substr($version, 0, 4) || '-dev' === substr($version, -4)) {
|
||||
if (strpos($version, 'dev-') === 0 || '-dev' === substr($version, -4)) {
|
||||
return 'dev';
|
||||
}
|
||||
|
||||
preg_match('{' . self::$modifierRegex . '(?:\+.*)?$}i', strtolower($version), $match);
|
||||
|
||||
if (!empty($match[3])) {
|
||||
return 'dev';
|
||||
}
|
||||
@@ -107,6 +108,9 @@ class VersionParser
|
||||
|
||||
// strip off aliasing
|
||||
if (preg_match('{^([^,\s]++) ++as ++([^,\s]++)$}', $version, $match)) {
|
||||
// verify that the alias is a version without constraint
|
||||
$this->normalize($match[2]);
|
||||
|
||||
$version = $match[1];
|
||||
}
|
||||
|
||||
@@ -116,7 +120,7 @@ class VersionParser
|
||||
}
|
||||
|
||||
// if requirement is branch-like, use full name
|
||||
if ('dev-' === strtolower(substr($version, 0, 4))) {
|
||||
if (stripos($version, 'dev-') === 0) {
|
||||
return 'dev-' . substr($version, 4);
|
||||
}
|
||||
|
||||
@@ -236,6 +240,7 @@ class VersionParser
|
||||
|
||||
$orConstraints = preg_split('{\s*\|\|?\s*}', trim($constraints));
|
||||
$orGroups = array();
|
||||
|
||||
foreach ($orConstraints as $constraints) {
|
||||
$andConstraints = preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $constraints);
|
||||
if (count($andConstraints) > 1) {
|
||||
@@ -268,9 +273,9 @@ class VersionParser
|
||||
&& 2 === count($orGroups[0]->getConstraints())
|
||||
&& 2 === count($orGroups[1]->getConstraints())
|
||||
&& ($a = (string) $orGroups[0])
|
||||
&& substr($a, 0, 3) === '[>=' && (false !== ($posA = strpos($a, '<', 4)))
|
||||
&& strpos($a, '[>=') === 0 && (false !== ($posA = strpos($a, '<', 4)))
|
||||
&& ($b = (string) $orGroups[1])
|
||||
&& substr($b, 0, 3) === '[>=' && (false !== ($posB = strpos($b, '<', 4)))
|
||||
&& strpos($b, '[>=') === 0 && (false !== ($posB = strpos($b, '<', 4)))
|
||||
&& substr($a, $posA + 2, -1) === substr($b, 4, $posB - 5)
|
||||
) {
|
||||
$constraint = new MultiConstraint(array(
|
||||
@@ -314,7 +319,7 @@ class VersionParser
|
||||
// version, to ensure that unstable instances of the current version are allowed. However, if a stability
|
||||
// suffix is added to the constraint, then a >= match on the current version is used instead.
|
||||
if (preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
|
||||
if (substr($constraint, 0, 2) === '~>') {
|
||||
if (strpos($constraint, '~>') === 0) {
|
||||
throw new \UnexpectedValueException(
|
||||
'Could not parse version constraint ' . $constraint . ': ' .
|
||||
'Invalid operator "~>", you probably meant to use the "~" operator'
|
||||
@@ -322,11 +327,11 @@ class VersionParser
|
||||
}
|
||||
|
||||
// Work out which position in the version we are operating at
|
||||
if (isset($matches[4]) && '' !== $matches[4]) {
|
||||
if (isset($matches[4]) && '' !== $matches[4] && null !== $matches[4]) {
|
||||
$position = 4;
|
||||
} elseif (isset($matches[3]) && '' !== $matches[3]) {
|
||||
} elseif (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
|
||||
$position = 3;
|
||||
} elseif (isset($matches[2]) && '' !== $matches[2]) {
|
||||
} elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
|
||||
$position = 2;
|
||||
} else {
|
||||
$position = 1;
|
||||
@@ -334,19 +339,11 @@ class VersionParser
|
||||
|
||||
// Calculate the stability suffix
|
||||
$stabilitySuffix = '';
|
||||
if (!empty($matches[5])) {
|
||||
$stabilitySuffix .= '-' . $this->expandStability($matches[5]) . (!empty($matches[6]) ? $matches[6] : '');
|
||||
}
|
||||
|
||||
if (!empty($matches[7])) {
|
||||
if (empty($matches[5]) && empty($matches[7])) {
|
||||
$stabilitySuffix .= '-dev';
|
||||
}
|
||||
|
||||
if (!$stabilitySuffix) {
|
||||
$stabilitySuffix = '-dev';
|
||||
}
|
||||
|
||||
$lowVersion = $this->manipulateVersionString($matches, $position, 0) . $stabilitySuffix;
|
||||
$lowVersion = $this->normalize(substr($constraint . $stabilitySuffix, 1));
|
||||
$lowerBound = new Constraint('>=', $lowVersion);
|
||||
|
||||
// For upper bound, we increment the position of one more significance,
|
||||
@@ -368,9 +365,9 @@ class VersionParser
|
||||
// versions 0.X >=0.1.0, and no updates for versions 0.0.X
|
||||
if (preg_match('{^\^' . $versionRegex . '($)}i', $constraint, $matches)) {
|
||||
// Work out which position in the version we are operating at
|
||||
if ('0' !== $matches[1] || '' === $matches[2]) {
|
||||
if ('0' !== $matches[1] || '' === $matches[2] || null === $matches[2]) {
|
||||
$position = 1;
|
||||
} elseif ('0' !== $matches[2] || '' === $matches[3]) {
|
||||
} elseif ('0' !== $matches[2] || '' === $matches[3] || null === $matches[3]) {
|
||||
$position = 2;
|
||||
} else {
|
||||
$position = 3;
|
||||
@@ -401,9 +398,9 @@ class VersionParser
|
||||
// Any of X, x, or * may be used to "stand in" for one of the numeric values in the [major, minor, patch] tuple.
|
||||
// A partial version range is treated as an X-Range, so the special character is in fact optional.
|
||||
if (preg_match('{^v?(\d++)(?:\.(\d++))?(?:\.(\d++))?(?:\.[xX*])++$}', $constraint, $matches)) {
|
||||
if (isset($matches[3]) && '' !== $matches[3]) {
|
||||
if (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
|
||||
$position = 3;
|
||||
} elseif (isset($matches[2]) && '' !== $matches[2]) {
|
||||
} elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
|
||||
$position = 2;
|
||||
} else {
|
||||
$position = 1;
|
||||
@@ -462,11 +459,11 @@ class VersionParser
|
||||
try {
|
||||
$version = $this->normalize($matches[2]);
|
||||
|
||||
if (!empty($stabilityModifier) && $this->parseStability($version) === 'stable') {
|
||||
if (!empty($stabilityModifier) && self::parseStability($version) === 'stable') {
|
||||
$version .= '-' . $stabilityModifier;
|
||||
} elseif ('<' === $matches[1] || '>=' === $matches[1]) {
|
||||
if (!preg_match('/-' . self::$modifierRegex . '$/', strtolower($matches[2]))) {
|
||||
if (substr($matches[2], 0, 4) !== 'dev-') {
|
||||
if (strpos($matches[2], 'dev-') !== 0) {
|
||||
$version .= '-dev';
|
||||
}
|
||||
}
|
||||
@@ -511,7 +508,7 @@ class VersionParser
|
||||
|
||||
// Return null on a carry overflow
|
||||
if ($i === 1) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user