From: <var...@us...> - 2021-09-16 17:56:50
|
Revision: 10558 http://sourceforge.net/p/phpwiki/code/10558 Author: vargenau Date: 2021-09-16 17:56:48 +0000 (Thu, 16 Sep 2021) Log Message: ----------- Simplify call to rename_page Modified Paths: -------------- trunk/lib/WikiDB.php Modified: trunk/lib/WikiDB.php =================================================================== --- trunk/lib/WikiDB.php 2021-09-16 17:34:48 UTC (rev 10557) +++ trunk/lib/WikiDB.php 2021-09-16 17:56:48 UTC (rev 10558) @@ -573,21 +573,7 @@ } } } - if ($oldpage->exists() and !$newpage->exists()) { - if ($result = $this->_backend->rename_page($from, $to)) { - // create a RecentChanges entry with explaining summary - $page = $this->getPage($to); - $current = $page->getCurrentRevision(); - $meta = $current->_data; - $version = $current->getVersion(); - $meta['summary'] = sprintf(_("renamed from %s"), $from); - unset($meta['mtime']); // force new date - $page->save($current->getPackedContent(), $version + 1, $meta); - } - } elseif (!$oldpage->getCurrentRevision(false) and !$newpage->exists()) { - // if a version 0 exists try it also. - $result = $this->_backend->rename_page($from, $to); - } + $result = $this->_backend->rename_page($from, $to); /* Generate notification emails? */ if ($result and ENABLE_MAILNOTIFY) { $notify = $this->get('notify'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |