From 49f3d622b618b57581ae543327288bcbfd041bde Mon Sep 17 00:00:00 2001 From: Fraenkiman Date: Tue, 26 Mar 2024 10:02:36 +0100 Subject: [PATCH] Fixes #349 | DateChanger plugin: use UTC+timeoffset - Note removed from support plugin - DateChanger plugin is activated again as default --- fp-defaults/plugins.conf.php | 4 +--- fp-plugins/datechanger/doc_datechanger.txt | 2 -- fp-plugins/datechanger/plugin.datechanger.php | 6 ++++-- fp-plugins/support/lang/lang.cs-cz.php | 2 -- fp-plugins/support/lang/lang.da-dk.php | 2 -- fp-plugins/support/lang/lang.de-de.php | 2 -- fp-plugins/support/lang/lang.el-gr.php | 2 -- fp-plugins/support/lang/lang.en-us.php | 2 -- fp-plugins/support/lang/lang.es-es.php | 2 -- fp-plugins/support/lang/lang.fr-fr.php | 2 -- fp-plugins/support/lang/lang.it-it.php | 2 -- fp-plugins/support/lang/lang.ja-jp.php | 2 -- fp-plugins/support/lang/lang.nl-nl.php | 2 -- fp-plugins/support/lang/lang.pt-br.php | 2 -- fp-plugins/support/lang/lang.ru-ru.php | 2 -- fp-plugins/support/lang/lang.sl-si.php | 2 -- fp-plugins/support/plugin.support.php | 4 ---- fp-plugins/support/tpls/admin.plugin.support.tpl | 3 --- 18 files changed, 5 insertions(+), 40 deletions(-) diff --git a/fp-defaults/plugins.conf.php b/fp-defaults/plugins.conf.php index fd2e814..d5d8784 100755 --- a/fp-defaults/plugins.conf.php +++ b/fp-defaults/plugins.conf.php @@ -27,9 +27,7 @@ $fp_plugins = array( 'postviews', // Counts and displays entry views 'commentcenter', // including Akismet interface 'mediamanager', - // 'datechanger', // Lets you change the publish date for (new) entries. - // DateChanger uses UTC. The time correction in the admin area is skipped - // Therefore deactivated by default + 'datechanger', // Lets you change the publish date for (new) entries. 'feed', // Activates the RSS and Atom feed widget 'emoticons', // Activates an emoticons toolbar for entries and static pages 'support', // Provides the FlatPress admin and the community with all relevant data in case of problems. diff --git a/fp-plugins/datechanger/doc_datechanger.txt b/fp-plugins/datechanger/doc_datechanger.txt index 3c80b6b..dde3860 100644 --- a/fp-plugins/datechanger/doc_datechanger.txt +++ b/fp-plugins/datechanger/doc_datechanger.txt @@ -4,8 +4,6 @@ Lets you change the publish date for (new) entries. Therefore, it adds the edit This plugin only works for NEW entries. Once published, the date cannot be changed again! -Attention: The plugin skips a time correction, which can be set in the configuration menu. - About ----- The DateChanger plugin was originally built by Edoardo Vacchi (NoWhereMan). diff --git a/fp-plugins/datechanger/plugin.datechanger.php b/fp-plugins/datechanger/plugin.datechanger.php index 349869b..88370d7 100644 --- a/fp-plugins/datechanger/plugin.datechanger.php +++ b/fp-plugins/datechanger/plugin.datechanger.php @@ -5,7 +5,7 @@ * Type: Block * Author: FlatPress * Description: Allows to change the date and time for new entries via a drop-down menu. Part of the standard distribution. [Instructions] - * Version: 1.0.4 + * Version: 1.0.5 * Author URI: https://www.flatpress.org */ if (!(basename($_SERVER ['PHP_SELF']) == 'admin.php' && // must be admin area @@ -15,7 +15,9 @@ if (!(basename($_SERVER ['PHP_SELF']) == 'admin.php' && // must be admin area return; function plugin_datechanger_toolbar() { - $time = time(); + // $time = time(); + // use UTC + timeoffset, coe.date.php. line 64 + $time = date_time(); $h = date('H', $time); $m = date('i', $time); diff --git a/fp-plugins/support/lang/lang.cs-cz.php b/fp-plugins/support/lang/lang.cs-cz.php index 9803d63..fb425ad 100644 --- a/fp-plugins/support/lang/lang.cs-cz.php +++ b/fp-plugins/support/lang/lang.cs-cz.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.da-dk.php b/fp-plugins/support/lang/lang.da-dk.php index 16115f9..73d69a8 100644 --- a/fp-plugins/support/lang/lang.da-dk.php +++ b/fp-plugins/support/lang/lang.da-dk.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.de-de.php b/fp-plugins/support/lang/lang.de-de.php index 5553307..d6c6aa8 100644 --- a/fp-plugins/support/lang/lang.de-de.php +++ b/fp-plugins/support/lang/lang.de-de.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.el-gr.php b/fp-plugins/support/lang/lang.el-gr.php index ed5fce3..8d9663f 100644 --- a/fp-plugins/support/lang/lang.el-gr.php +++ b/fp-plugins/support/lang/lang.el-gr.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.en-us.php b/fp-plugins/support/lang/lang.en-us.php index 6bd389c..fe6fc17 100644 --- a/fp-plugins/support/lang/lang.en-us.php +++ b/fp-plugins/support/lang/lang.en-us.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.es-es.php b/fp-plugins/support/lang/lang.es-es.php index da3d3fc..02b287f 100644 --- a/fp-plugins/support/lang/lang.es-es.php +++ b/fp-plugins/support/lang/lang.es-es.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.fr-fr.php b/fp-plugins/support/lang/lang.fr-fr.php index 1911ee0..7d6d9b2 100644 --- a/fp-plugins/support/lang/lang.fr-fr.php +++ b/fp-plugins/support/lang/lang.fr-fr.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins:

', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.it-it.php b/fp-plugins/support/lang/lang.it-it.php index 1cc0caa..e34ece7 100644 --- a/fp-plugins/support/lang/lang.it-it.php +++ b/fp-plugins/support/lang/lang.it-it.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.ja-jp.php b/fp-plugins/support/lang/lang.ja-jp.php index 1475ec3..0c586b7 100644 --- a/fp-plugins/support/lang/lang.ja-jp.php +++ b/fp-plugins/support/lang/lang.ja-jp.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.nl-nl.php b/fp-plugins/support/lang/lang.nl-nl.php index 10aabda..5a24c30 100644 --- a/fp-plugins/support/lang/lang.nl-nl.php +++ b/fp-plugins/support/lang/lang.nl-nl.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.pt-br.php b/fp-plugins/support/lang/lang.pt-br.php index c69dd8a..2dc93a5 100644 --- a/fp-plugins/support/lang/lang.pt-br.php +++ b/fp-plugins/support/lang/lang.pt-br.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.ru-ru.php b/fp-plugins/support/lang/lang.ru-ru.php index 590a9b6..89d7931 100644 --- a/fp-plugins/support/lang/lang.ru-ru.php +++ b/fp-plugins/support/lang/lang.ru-ru.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/lang/lang.sl-si.php b/fp-plugins/support/lang/lang.sl-si.php index a2625f5..16674fe 100644 --- a/fp-plugins/support/lang/lang.sl-si.php +++ b/fp-plugins/support/lang/lang.sl-si.php @@ -34,8 +34,6 @@ $lang ['admin'] ['maintain'] ['support'] = array( 'pos_plugins' => '

Activated plugins: ', 'neg_plugins' => '

Activated plugins: Could not be determined.

', - 'output_datechanger' => '

The active DateChanger plugin skips the corrected timezone in the configuration menu.

', - // output "Core files" 'h2_permissions' => 'File and directory permissions', 'h3_core_files' => 'Core', diff --git a/fp-plugins/support/plugin.support.php b/fp-plugins/support/plugin.support.php index cd40a1a..b386aad 100644 --- a/fp-plugins/support/plugin.support.php +++ b/fp-plugins/support/plugin.support.php @@ -111,10 +111,6 @@ if (class_exists('AdminPanelAction')) { $support ['plugins'] = $lang ['admin'] ['maintain'] ['support'] ['neg_plugins']; } - if (function_exists("plugin_datechanger_toolbar")) { - $support ['output_datechanger'] = $lang ['admin'] ['maintain'] ['support'] ['output_datechanger']; - } - /** * prepare output "Core files" */ diff --git a/fp-plugins/support/tpls/admin.plugin.support.tpl b/fp-plugins/support/tpls/admin.plugin.support.tpl index d1f2212..3e945f8 100644 --- a/fp-plugins/support/tpls/admin.plugin.support.tpl +++ b/fp-plugins/support/tpls/admin.plugin.support.tpl @@ -39,9 +39,6 @@
  • {$support.plugins}{$support.output_plugins}
  • -
  • - {$support.output_datechanger} -
  • [/code]