From: <var...@us...> - 2009-02-14 14:57:06
|
Revision: 6498 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6498&view=rev Author: vargenau Date: 2009-02-14 14:57:03 +0000 (Sat, 14 Feb 2009) Log Message: ----------- Fix regression: lock/unlock checkbox no longer worked if ENABLE_PAGE_PUBLIC was false Modified Paths: -------------- trunk/lib/editpage.php Modified: trunk/lib/editpage.php =================================================================== --- trunk/lib/editpage.php 2009-02-13 16:20:08 UTC (rev 6497) +++ trunk/lib/editpage.php 2009-02-14 14:57:03 UTC (rev 6498) @@ -234,16 +234,20 @@ function updateLock() { $changed = false; - if (!ENABLE_PAGE_PUBLIC) { - if ((bool)$this->page->get('locked') == (bool)$this->locked) - return false; // Not changed. - } - if (!$this->user->isAdmin()) { // FIXME: some sort of message return false; // not allowed. } + if ((bool)$this->page->get('locked') != (bool)$this->locked) { + $this->page->set('locked', (bool)$this->locked); + $this->tokens['LOCK_CHANGED_MSG'] + .= $this->locked + ? _("Page now locked.") + : _("Page now unlocked."); + $changed = true; + } + if (ENABLE_PAGE_PUBLIC) { if ((bool)$this->page->get('public') != (bool)$this->public) { $this->page->set('public', (bool)$this->public); @@ -253,13 +257,6 @@ : _("Page now not-public.")) . " "; $changed = true; } - - $this->page->set('locked', (bool)$this->locked); - $this->tokens['LOCK_CHANGED_MSG'] - .= $this->locked - ? _("Page now locked.") - : _("Page now unlocked."); - $changed = true; } return $changed; // lock changed. } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |