Merge pull request #1117 from anaggh/master

update libs
This commit is contained in:
Diego Najar 2020-01-02 10:08:48 +01:00 committed by GitHub
commit c85f357eb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 43 additions and 19 deletions

View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2019 Diego Najar
Copyright (c) 2015-2020 Diego Najar
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -51,13 +51,7 @@ $numberOfPages = count($listOfFilesByPage);
</table>
<!-- Paginator -->
<nav>
<ul class="pagination justify-content-center flex-wrap">
<?php for ($i=1; $i<=$numberOfPages; $i++): ?>
<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles(<?php echo $i ?>)"><?php echo $i ?></button></li>
<?php endfor; ?>
</ul>
</nav>
<nav id="jsbluditMediaTablePagination"></nav>
</div>
</div>
@ -94,7 +88,7 @@ function hideMediaAlert() {
}
// Show the files in the table
function displayFiles(files) {
function displayFiles(files, numberOfPages = <?= $numberOfPages ?>) {
if (!Array.isArray(files)) {
return false;
}
@ -121,10 +115,19 @@ function displayFiles(files) {
'<\/tr>';
$('#jsbluditMediaTable').append(tableRow);
});
mediaPagination = '<ul class="pagination justify-content-center flex-wrap">';
for (var i = 1; i <= numberOfPages; i++) {
mediaPagination += '<li class="page-item"><button type="button" class="btn btn-link page-link" onClick="getFiles('+i+')">'+i+'</button></li>';
}
mediaPagination += '</ul>';
$('#jsbluditMediaTablePagination').html(mediaPagination);
}
if (files.length == 0) {
$('#jsbluditMediaTable').html("<p><?php (IMAGE_RESTRICT ? $L->p('There are no images for the page') : $L->p('There are no images')) ?></p>");
$('#jsbluditMediaTablePagination').html('');
}
}
@ -138,7 +141,7 @@ function getFiles(pageNumber) {
},
function(data) { // success function
if (data.status==0) {
displayFiles(data.files);
displayFiles(data.files, data.numberOfPages);
} else {
console.log(data.message);
}

File diff suppressed because one or more lines are too long

View File

@ -509,6 +509,8 @@ function createUser($args) {
global $L;
global $syslog;
$args['new_username'] = Text::removeSpecialCharacters($args['new_username']);
// Check empty username
if (Text::isEmpty($args['new_username'])) {
Alert::set($L->g('username-field-is-empty'), ALERT_STATUS_FAIL);
@ -535,7 +537,7 @@ function createUser($args) {
// Filter form fields
$tmp = array();
$tmp['username'] = Text::removeSpecialCharacters($args['new_username']);
$tmp['username'] = $args['new_username'];
$tmp['password'] = $args['new_password'];
$tmp['role'] = $args['role'];
$tmp['email'] = $args['email'];

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@ class Parsedown
{
# ~
const version = '1.7.3';
const version = '1.7.4';
# ~
@ -1489,22 +1489,41 @@ class Parsedown
}
}
$permitRawHtml = false;
if (isset($Element['text']))
{
$text = $Element['text'];
}
// very strongly consider an alternative if you're writing an
// extension
elseif (isset($Element['rawHtml']))
{
$text = $Element['rawHtml'];
$allowRawHtmlInSafeMode = isset($Element['allowRawHtmlInSafeMode']) && $Element['allowRawHtmlInSafeMode'];
$permitRawHtml = !$this->safeMode || $allowRawHtmlInSafeMode;
}
if (isset($text))
{
$markup .= '>';
if (!isset($Element['nonNestables']))
if (!isset($Element['nonNestables']))
{
$Element['nonNestables'] = array();
}
if (isset($Element['handler']))
{
$markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']);
$markup .= $this->{$Element['handler']}($text, $Element['nonNestables']);
}
elseif (!$permitRawHtml)
{
$markup .= self::escape($text, true);
}
else
{
$markup .= self::escape($Element['text'], true);
$markup .= $text;
}
$markup .= '</'.$Element['name'].'>';