change metadata and compatibility with php8
This commit is contained in:
parent
5cad642a68
commit
29b7d74ead
3 changed files with 10 additions and 10 deletions
|
@ -1,10 +1,10 @@
|
|||
<?php defined('BLUDIT') or die('Bludit CMS.');
|
||||
|
||||
// Bludit version
|
||||
define('BLUDIT_VERSION', '3.13.1');
|
||||
define('BLUDIT_CODENAME', 'Edi');
|
||||
define('BLUDIT_RELEASE_DATE', '2020-07-28');
|
||||
define('BLUDIT_BUILD', '20200728');
|
||||
define('BLUDIT_VERSION', '3.14.0');
|
||||
define('BLUDIT_CODENAME', 'Out Of Time');
|
||||
define('BLUDIT_RELEASE_DATE', '2022-08-05');
|
||||
define('BLUDIT_BUILD', '20220805');
|
||||
|
||||
// Debug mode
|
||||
// Change to FALSE, for prevent warning or errors on browser
|
||||
|
@ -13,11 +13,11 @@ define('DEBUG_TYPE', 'INFO'); // INFO, TRACE
|
|||
error_reporting(0); // Turn off all error reporting
|
||||
if (DEBUG_MODE) {
|
||||
// Turn on all error reporting
|
||||
ini_set("display_errors", 0);
|
||||
ini_set('display_startup_errors',0);
|
||||
ini_set("display_errors", 1);
|
||||
ini_set('display_startup_errors',1);
|
||||
ini_set("html_errors", 1);
|
||||
ini_set('log_errors', 1);
|
||||
error_reporting(E_ALL | E_STRICT | E_NOTICE);
|
||||
error_reporting(E_ALL);
|
||||
}
|
||||
|
||||
// PHP paths
|
||||
|
|
|
@ -879,7 +879,7 @@ function transformImage($file, $imageDir, $thumbnailDir=false) {
|
|||
|
||||
// Generate a filename to not overwrite current image if exists
|
||||
$filename = Filesystem::filename($file);
|
||||
$nextFilename = Filesystem::nextFilename($imageDir, $filename);
|
||||
$nextFilename = Filesystem::nextFilename($filename, $imageDir);
|
||||
|
||||
// Move the image to a proper place and rename
|
||||
$image = $imageDir.$nextFilename;
|
||||
|
@ -888,7 +888,7 @@ function transformImage($file, $imageDir, $thumbnailDir=false) {
|
|||
|
||||
// Generate Thumbnail
|
||||
if (!empty($thumbnailDir)) {
|
||||
if ($fileExtension == 'svg') {
|
||||
if (($fileExtension == 'svg') || ($fileExtension == 'webp')) {
|
||||
symlink($image, $thumbnailDir.$nextFilename);
|
||||
} else {
|
||||
$Image = new Image();
|
||||
|
|
|
@ -217,7 +217,7 @@ class Filesystem {
|
|||
|
|
||||
| @return string
|
||||
*/
|
||||
public static function nextFilename($path=PATH_UPLOADS, $filename) {
|
||||
public static function nextFilename($filename, $path=PATH_UPLOADS) {
|
||||
// Clean filename and get extension
|
||||
$fileExtension = pathinfo($filename, PATHINFO_EXTENSION);
|
||||
$fileExtension = Text::lowercase($fileExtension);
|
||||
|
|
Loading…
Reference in a new issue