forked from GithubBackups/vichan
commit
03e86f5bb2
@ -209,7 +209,7 @@ class Api {
|
||||
return $apiCatalog;
|
||||
}
|
||||
|
||||
public function translateBoard(Board $board) {
|
||||
public function translateBoard($board) {
|
||||
$apiBoard = [];
|
||||
|
||||
foreach ($boards as $board) {
|
||||
|
||||
@ -250,7 +250,7 @@ class ImageConvert extends ImageBase {
|
||||
if ($size = @getimagesize($src))
|
||||
return $size;
|
||||
}
|
||||
$size = shell_exec_error(($this->gm ? 'gm ' : '') . 'identify -format "%w %h" ' . escapeshellarg($src . '[0]'));
|
||||
$size = shell_exec_error(($this->gm ? 'gm ' : 'magick ') . 'identify -format "%w %h" ' . escapeshellarg($src . '[0]'));
|
||||
if (preg_match('/^(\d+) (\d+)$/', $size, $m))
|
||||
return array($m[1], $m[2]);
|
||||
return false;
|
||||
@ -276,13 +276,13 @@ class ImageConvert extends ImageBase {
|
||||
|
||||
if (!$this->temp) {
|
||||
if ($config['strip_exif']) {
|
||||
if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .
|
||||
if($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') .
|
||||
escapeshellarg($this->src) . ' -auto-orient -strip ' . escapeshellarg($src))) {
|
||||
$this->destroy();
|
||||
error(_('Failed to redraw image!'), null, $error);
|
||||
}
|
||||
} else {
|
||||
if($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .
|
||||
if($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') .
|
||||
escapeshellarg($this->src) . ' -auto-orient ' . escapeshellarg($src))) {
|
||||
$this->destroy();
|
||||
error(_('Failed to redraw image!'), null, $error);
|
||||
@ -329,7 +329,7 @@ class ImageConvert extends ImageBase {
|
||||
} else {
|
||||
$convert_args = &$config['convert_args'];
|
||||
|
||||
if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .
|
||||
if (($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') .
|
||||
sprintf($convert_args,
|
||||
$this->width,
|
||||
$this->height,
|
||||
@ -348,7 +348,7 @@ class ImageConvert extends ImageBase {
|
||||
} else {
|
||||
$convert_args = &$config['convert_args'];
|
||||
|
||||
if (($error = shell_exec_error(($this->gm ? 'gm ' : '') . 'convert ' .
|
||||
if (($error = shell_exec_error(($this->gm ? 'gm convert ' : 'magick ') .
|
||||
sprintf($convert_args,
|
||||
$this->width,
|
||||
$this->height,
|
||||
|
||||
@ -57,6 +57,9 @@ function mod_login(Context $ctx, $redirect = false) {
|
||||
// Check if inputs are set and not empty
|
||||
if (!isset($_POST['username'], $_POST['password']) || $_POST['username'] == '' || $_POST['password'] == '') {
|
||||
$args['error'] = $config['error']['invalid'];
|
||||
}
|
||||
elseif (strlen($_POST['password']) > 128 || strlen($_POST['username']) > 128) {
|
||||
$args['error'] = $config['error']['infotoolong'];
|
||||
} elseif (!login($_POST['username'], $_POST['password'])) {
|
||||
if ($config['syslog'])
|
||||
_syslog(LOG_WARNING, 'Unauthorized login attempt!');
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
// Installation/upgrade file
|
||||
define('VERSION', '5.2.1');
|
||||
define('VERSION', '5.2.2');
|
||||
require 'inc/bootstrap.php';
|
||||
loadConfig();
|
||||
|
||||
@ -1101,4 +1101,4 @@ if ($step == 0) {
|
||||
}
|
||||
|
||||
echo Element('page.html', $page);
|
||||
}
|
||||
}
|
||||
|
||||
1
static/banners/.gitkeep
Normal file
1
static/banners/.gitkeep
Normal file
@ -0,0 +1 @@
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 4.6 KiB |
Loading…
x
Reference in New Issue
Block a user