|
From: <var...@us...> - 2022-01-16 19:38:51
|
Revision: 10904
http://sourceforge.net/p/phpwiki/code/10904
Author: vargenau
Date: 2022-01-16 19:38:49 +0000 (Sun, 16 Jan 2022)
Log Message:
-----------
In DATABASE_TYPE = file, do not update metadata if page does not exist (reported by Harold Hallikainen).
Modified Paths:
--------------
trunk/lib/WikiDB/backend/file.php
trunk/locale/it/pgsrc/NoteDiRilascio
trunk/pgsrc/ReleaseNotes
Modified: trunk/lib/WikiDB/backend/file.php
===================================================================
--- trunk/lib/WikiDB/backend/file.php 2022-01-15 16:46:50 UTC (rev 10903)
+++ trunk/lib/WikiDB/backend/file.php 2022-01-16 19:38:49 UTC (rev 10904)
@@ -322,13 +322,15 @@
* @param string $pagename Page name.
* @param array $newdata hash New meta-data.
*
- * This will create a new page if page being requested does not
- * exist.
*/
function update_pagedata($pagename, $newdata)
{
$data = $this->get_pagedata($pagename);
if (count($data) == 0) {
+ // Do not update metadata if page does not exist
+ if ($this->get_latest_version($pagename) == 0) {
+ return;
+ }
$this->_savePageData($pagename, $newdata); // create a new pagedata-file
return;
}
Modified: trunk/locale/it/pgsrc/NoteDiRilascio
===================================================================
--- trunk/locale/it/pgsrc/NoteDiRilascio 2022-01-15 16:46:50 UTC (rev 10903)
+++ trunk/locale/it/pgsrc/NoteDiRilascio 2022-01-16 19:38:49 UTC (rev 10904)
@@ -1,4 +1,4 @@
-Date: Fri, 14 Jan 2022 15:40:31 +0000
+Date: Sun, 16 Jan 2022 20:37:57 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=NoteDiRilascio;
@@ -14,9 +14,10 @@
##READONLY## is renamed as ##ISREADONLY##, since ##readonly## is now a keyword in PHP 8.1.
=== Fixes ===
-* Make list of pages work with PDO (~AllPages, ~MostPopular...)
-* blog theme improved
+* Make list of pages work with PDO (~AllPages, ~MostPopular...).
* Better handling of theme change in ~UserPreferences.
+* In DATABASE_TYPE = file, do not update metadata if page does not exist (reported by Harold Hallikainen).
+* blog theme improved.
=== Changes ===
* Warn user that leaving the page will lose modifications.
Modified: trunk/pgsrc/ReleaseNotes
===================================================================
--- trunk/pgsrc/ReleaseNotes 2022-01-15 16:46:50 UTC (rev 10903)
+++ trunk/pgsrc/ReleaseNotes 2022-01-16 19:38:49 UTC (rev 10904)
@@ -1,4 +1,4 @@
-Date: Fri, 14 Jan 2022 15:40:31 +0000
+Date: Sun, 16 Jan 2022 20:37:57 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.0)
Content-Type: application/x-phpwiki;
pagename=ReleaseNotes;
@@ -14,9 +14,10 @@
##READONLY## is renamed as ##ISREADONLY##, since ##readonly## is now a keyword in PHP 8.1.
=== Fixes ===
-* Make list of pages work with PDO (~AllPages, ~MostPopular...)
-* blog theme improved
+* Make list of pages work with PDO (~AllPages, ~MostPopular...).
* Better handling of theme change in ~UserPreferences.
+* In DATABASE_TYPE = file, do not update metadata if page does not exist (reported by Harold Hallikainen).
+* blog theme improved.
=== Changes ===
* Warn user that leaving the page will lose modifications.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|