commit de725efa0e81dec1a2f712b3a4b914a53c31e81b
parent 4d86d39f1f014ebcb0d793d641e8bf7164df4d58
Author: markseu <mark2011@mayberg.se>
Date: Mon, 14 Jan 2019 15:04:08 +0100
improved time stamp modification
Diffstat:
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/system/plugins/bundle.php b/system/plugins/bundle.php
@@ -1,10 +1,10 @@
<?php
// Bundle plugin, https://github.com/datenstrom/yellow-plugins/tree/master/bundle
-// Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se
+// Copyright (c) 2013-2019 Datenstrom, https://datenstrom.se
// This file may be used and distributed under the terms of the public license.
class YellowBundle {
- const VERSION = "0.7.5";
+ const VERSION = "0.7.6";
public $yellow; //access to API
// Handle initialisation
@@ -117,6 +117,7 @@ class YellowBundle {
if (!empty($fileDataNew)) $fileDataNew .= "\n\n";
$fileDataNew .= "/* YellowBundle::processBundle file:$fileNameBundle <- ".$this->yellow->page->fileName." */";
}
+ if (is_file($fileNameBundle)) $this->yellow->toolbox->deleteFile($fileNameBundle);
if (!$this->yellow->toolbox->createFile($fileNameBundle, $fileDataNew) ||
!$this->yellow->toolbox->modifyFile($fileNameBundle, $modified)) {
$this->yellow->page->error(500, "Can't write file '$fileNameBundle'!");
diff --git a/system/plugins/command.php b/system/plugins/command.php
@@ -4,7 +4,7 @@
// This file may be used and distributed under the terms of the public license.
class YellowCommand {
- const VERSION = "0.7.12";
+ const VERSION = "0.7.13";
public $yellow; //access to API
public $files; //number of files
public $links; //number of links
@@ -170,6 +170,7 @@ class YellowCommand {
$modified = time();
}
$fileName = $this->getStaticFile($path, $location, $statusCode);
+ if (is_file($fileName)) $this->yellow->toolbox->deleteFile($fileName);
if (!$this->yellow->toolbox->createFile($fileName, $fileData, true) ||
!$this->yellow->toolbox->modifyFile($fileName, $modified)) {
$statusCode = 500;
@@ -184,6 +185,7 @@ class YellowCommand {
$statusCode = 200;
$modified = $this->yellow->toolbox->getFileModified($this->yellow->page->fileName);
$fileName = $this->getStaticFile($path, $location, $statusCode);
+ if (is_file($fileName)) $this->yellow->toolbox->deleteFile($fileName);
if (!$this->yellow->toolbox->copyFile($this->yellow->page->fileName, $fileName, true) ||
!$this->yellow->toolbox->modifyFile($fileName, $modified)) {
$statusCode = 500;
diff --git a/system/plugins/image.php b/system/plugins/image.php
@@ -1,10 +1,10 @@
<?php
// Image plugin, https://github.com/datenstrom/yellow-plugins/tree/master/image
-// Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se
+// Copyright (c) 2013-2019 Datenstrom, https://datenstrom.se
// This file may be used and distributed under the terms of the public license.
class YellowImage {
- const VERSION = "0.7.8";
+ const VERSION = "0.7.9";
public $yellow; //access to API
public $graphicsLibrary; //graphics library support? (boolean)
@@ -116,6 +116,7 @@ class YellowImage {
if ($this->isFileNotUpdated($fileName, $fileNameOutput)) {
$image = $this->loadImage($fileName, $type);
$image = $this->resizeImage($image, $widthInput, $heightInput, $widthOutput, $heightOutput);
+ if (is_file($fileNameOutput)) $this->yellow->toolbox->deleteFile($fileNameOutput);
if (!$this->saveImage($image, $fileNameOutput, $type, $this->yellow->config->get("imageThumbnailJpgQuality")) ||
!$this->yellow->toolbox->modifyFile($fileNameOutput, $this->yellow->toolbox->getFileModified($fileName))) {
$this->yellow->page->error(500, "Can't write file '$fileNameOutput'!");