From: <var...@us...> - 2021-12-30 09:44:09
|
Revision: 10802 http://sourceforge.net/p/phpwiki/code/10802 Author: vargenau Date: 2021-12-30 09:44:07 +0000 (Thu, 30 Dec 2021) Log Message: ----------- Page locking and unlocking is now saved in page history Modified Paths: -------------- trunk/lib/editpage.php trunk/locale/it/pgsrc/NoteDiRilascio trunk/pgsrc/ReleaseNotes Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2021-12-25 10:56:37 UTC (rev 10801) +++ trunk/lib/editpage.php 2021-12-30 09:44:07 UTC (rev 10802) @@ -286,10 +286,11 @@ $this->tokens['LOCK_CHANGED_MSG'] .= ($this->locked ? _("Page now locked.") - : _("Page now unlocked.") . " "); + : _("Page now unlocked.")); $changed = true; } - if (defined('ENABLE_PAGE_PUBLIC') and ENABLE_PAGE_PUBLIC and (bool)$this->page->get('public') != (bool)$this->public) { + if (defined('ENABLE_PAGE_PUBLIC') and ENABLE_PAGE_PUBLIC + and (bool)$this->page->get('public') != (bool)$this->public) { $this->page->set('public', (bool)$this->public); $this->tokens['LOCK_CHANGED_MSG'] .= ($this->public @@ -298,15 +299,14 @@ $changed = true; } - if (defined('ENABLE_EXTERNAL_PAGES') and ENABLE_EXTERNAL_PAGES) { - if ((bool)$this->page->get('external') != (bool)$this->external) { - $this->page->set('external', (bool)$this->external); - $this->tokens['LOCK_CHANGED_MSG'] - = ($this->external - ? _("Page now external.") - : _("Page now not-external.")) . " "; - $changed = true; - } + if (defined('ENABLE_EXTERNAL_PAGES') and ENABLE_EXTERNAL_PAGES + and (bool)$this->page->get('external') != (bool)$this->external) { + $this->page->set('external', (bool)$this->external); + $this->tokens['LOCK_CHANGED_MSG'] + .= ($this->external + ? _("Page now external.") + : _("Page now not-external.")); + $changed = true; } return $changed; // lock changed. } @@ -318,13 +318,14 @@ if ($this->isUnchanged()) { // Allow admin lock/unlock even if // no text changes were made. + $lock_changed = false; if ($this->updateLock()) { - $dbi = $request->getDbh(); - $dbi->touch(); + $lock_changed = true; + } else { + // Save failed. No changes made. + $this->_redirectToBrowsePage(); + return true; } - // Save failed. No changes made. - $this->_redirectToBrowsePage(); - return true; } if (!$this->user->isAdmin() and $this->isSpam()) { @@ -338,6 +339,9 @@ // has not been explicitly updated. $meta = $this->selected->getMetaData(); $meta = array_merge($meta, $this->meta); + if ($lock_changed) { + $meta['summary'] = $this->tokens['LOCK_CHANGED_MSG']; + } // Save new revision $this->_content = $this->getContent(); Modified: trunk/locale/it/pgsrc/NoteDiRilascio =================================================================== --- trunk/locale/it/pgsrc/NoteDiRilascio 2021-12-25 10:56:37 UTC (rev 10801) +++ trunk/locale/it/pgsrc/NoteDiRilascio 2021-12-30 09:44:07 UTC (rev 10802) @@ -1,4 +1,4 @@ -Date: Wed, 15 Dec 2021 18:48:29 +0000 +Date: Thu, 30 Dec 2021 10:43:13 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=NoteDiRilascio; @@ -20,7 +20,8 @@ === Changes === * Remove ADODB DATABASE_TYPE. Use SQL (Pear) or PDO. * Add “Rename” tab in Sidebar theme. -* Add sample images for ~PhotoAlbum in blog theme +* Page locking and unlocking is now saved in page history. +* Add sample images for ~PhotoAlbum in blog theme. * Remove EDITING_POLICY * Remove ENABLE_XHTML_XML * Remove USECACHE, always true Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2021-12-25 10:56:37 UTC (rev 10801) +++ trunk/pgsrc/ReleaseNotes 2021-12-30 09:44:07 UTC (rev 10802) @@ -1,4 +1,4 @@ -Date: Wed, 15 Dec 2021 18:48:29 +0000 +Date: Thu, 30 Dec 2021 10:43:13 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.6.0) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -20,7 +20,8 @@ === Changes === * Remove ADODB DATABASE_TYPE. Use SQL (Pear) or PDO. * Add “Rename” tab in Sidebar theme. -* Add sample images for ~PhotoAlbum in blog theme +* Page locking and unlocking is now saved in page history. +* Add sample images for ~PhotoAlbum in blog theme. * Remove EDITING_POLICY * Remove ENABLE_XHTML_XML * Remove USECACHE, always true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |