mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit d083218261d85fc8cf606676cdf03b10d19a6f2c
parent ab7626afd297b73fbf63bfbc10fcef5e2410ad68
Author: markseu <mark2011@mayberg.se>
Date:   Tue,  6 Mar 2018 09:39:33 +0100

Updated system, changed setting for new file

Diffstat:
Msystem/config/config.ini | 2+-
Msystem/plugins/core.php | 3++-
Msystem/plugins/edit.php | 7+++----
Msystem/plugins/update.php | 7++++---
4 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/system/config/config.ini b/system/config/config.ini @@ -40,6 +40,7 @@ UploadExtension: .upload TextFile: text.ini LanguageFile: language-(.*).txt ErrorFile: page-error-(.*).txt +NewFile: page-new-(.*).txt RobotsFile: robots.txt FaviconFile: favicon.ico ServerUrl: @@ -54,7 +55,6 @@ MultiLanguageMode: 0 InstallationMode: 1 StartupUpdate: none EditLocation: /edit/ -EditNewFile: page-new-(.*).txt EditUserFile: user.ini EditUserPasswordMinLength: 4 EditUserHashAlgorithm: bcrypt diff --git a/system/plugins/core.php b/system/plugins/core.php @@ -1,6 +1,6 @@ <?php // Core plugin, https://github.com/datenstrom/yellow-plugins/tree/master/core -// Copyright (c) 2013-2017 Datenstrom, https://datenstrom.se +// Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se // This file may be used and distributed under the terms of the public license. class YellowCore @@ -67,6 +67,7 @@ class YellowCore $this->config->setDefault("textFile", "text.ini"); $this->config->setDefault("languageFile", "language-(.*).txt"); $this->config->setDefault("errorFile", "page-error-(.*).txt"); + $this->config->setDefault("newFile", "page-new-(.*).txt"); $this->config->setDefault("robotsFile", "robots.txt"); $this->config->setDefault("faviconFile", "favicon.ico"); $this->config->setDefault("serverUrl", ""); diff --git a/system/plugins/edit.php b/system/plugins/edit.php @@ -5,7 +5,7 @@ class YellowEdit { - const VERSION = "0.7.7"; + const VERSION = "0.7.8"; var $yellow; //access to API var $response; //web response var $users; //user accounts @@ -19,7 +19,6 @@ class YellowEdit $this->users = new YellowUsers($yellow); $this->merge = new YellowMerge($yellow); $this->yellow->config->setDefault("editLocation", "/edit/"); - $this->yellow->config->setDefault("editNewFile", "page-new-(.*).txt"); $this->yellow->config->setDefault("editUserFile", "user.ini"); $this->yellow->config->setDefault("editUserPasswordMinLength", "4"); $this->yellow->config->setDefault("editUserHashAlgorithm", "bcrypt"); @@ -999,14 +998,14 @@ class YellowResponse if($page->isExisting("templateNew")) { $name = $this->yellow->lookup->normaliseName($page->get("templateNew")); - $fileName = strreplaceu("(.*)", $name, $this->yellow->config->get("configDir").$this->yellow->config->get("editNewFile")); + $fileName = strreplaceu("(.*)", $name, $this->yellow->config->get("configDir").$this->yellow->config->get("newFile")); if(is_file($fileName)) break; } } if(!is_file($fileName)) { $name = $this->yellow->lookup->normaliseName($this->yellow->config->get("template")); - $fileName = strreplaceu("(.*)", $name, $this->yellow->config->get("configDir").$this->yellow->config->get("editNewFile")); + $fileName = strreplaceu("(.*)", $name, $this->yellow->config->get("configDir").$this->yellow->config->get("newFile")); } $rawData = $this->yellow->toolbox->readFile($fileName); $rawData = preg_replace("/@timestamp/i", time(), $rawData); diff --git a/system/plugins/update.php b/system/plugins/update.php @@ -1,11 +1,11 @@ <?php // Update plugin, https://github.com/datenstrom/yellow-plugins/tree/master/update -// Copyright (c) 2013-2017 Datenstrom, https://datenstrom.se +// Copyright (c) 2013-2018 Datenstrom, https://datenstrom.se // This file may be used and distributed under the terms of the public license. class YellowUpdate { - const VERSION = "0.7.8"; + const VERSION = "0.7.9"; var $yellow; //access to API var $updates; //number of updates @@ -18,6 +18,7 @@ class YellowUpdate $this->yellow->config->setDefault("updateInformationFile", "update.ini"); $this->yellow->config->setDefault("updateVersionFile", "version.ini"); $this->yellow->config->setDefault("updateResourceFile", "resource.ini"); + $this->yellow->config->setDefault("newFile", "page-new-(.*).txt"); //TODO: remove with next release } // Handle startup @@ -674,7 +675,7 @@ class YellowUpdate function getRawDataInstallation() { $language = $this->yellow->toolbox->detectBrowserLanguage($this->yellow->text->getLanguages(), $this->yellow->config->get("language")); - $fileName = strreplaceu("(.*)", "installation", $this->yellow->config->get("configDir").$this->yellow->config->get("editNewFile")); + $fileName = strreplaceu("(.*)", "installation", $this->yellow->config->get("configDir").$this->yellow->config->get("newFile")); $rawData = $this->yellow->toolbox->readFile($fileName); if(empty($rawData)) {