improved time stamp modification
This commit is contained in:
parent
4d86d39f1f
commit
de725efa0e
3 changed files with 9 additions and 5 deletions
|
@ -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'!");
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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'!");
|
||||
|
|
Loading…
Add table
Reference in a new issue