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