|
From: <var...@us...> - 2021-09-16 17:34:51
|
Revision: 10557
http://sourceforge.net/p/phpwiki/code/10557
Author: vargenau
Date: 2021-09-16 17:34:48 +0000 (Thu, 16 Sep 2021)
Log Message:
-----------
function rename_page is implemented in all backends
Modified Paths:
--------------
trunk/lib/WikiDB.php
trunk/lib/plugin/WikiAdminRename.php
trunk/locale/de/LC_MESSAGES/phpwiki.mo
trunk/locale/es/LC_MESSAGES/phpwiki.mo
trunk/locale/fr/LC_MESSAGES/phpwiki.mo
trunk/locale/it/LC_MESSAGES/phpwiki.mo
trunk/locale/ja/LC_MESSAGES/phpwiki.mo
trunk/locale/nl/LC_MESSAGES/phpwiki.mo
trunk/locale/po/de.po
trunk/locale/po/es.po
trunk/locale/po/fr.po
trunk/locale/po/it.po
trunk/locale/po/ja.po
trunk/locale/po/nl.po
trunk/locale/po/phpwiki.pot
trunk/locale/po/sv.po
trunk/locale/po/zh.po
trunk/locale/sv/LC_MESSAGES/phpwiki.mo
trunk/locale/zh/LC_MESSAGES/phpwiki.mo
Modified: trunk/lib/WikiDB.php
===================================================================
--- trunk/lib/WikiDB.php 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/lib/WikiDB.php 2021-09-16 17:34:48 UTC (rev 10557)
@@ -544,16 +544,26 @@
assert(is_string($from) && $from != '');
assert(is_string($to) && $to != '');
$result = false;
- if (method_exists($this->_backend, 'rename_page')) {
- $oldpage = $this->getPage($from);
- $newpage = $this->getPage($to);
- //update all WikiLinks in existing pages
- //non-atomic! i.e. if rename fails the links are not undone
- if ($updateWikiLinks) {
- $lookbehind = "/(?<=[\W:])\Q";
- $lookahead = "\E(?=[\W:])/";
- require_once 'lib/plugin/WikiAdminSearchReplace.php';
- $links = $oldpage->getBackLinks();
+ $oldpage = $this->getPage($from);
+ $newpage = $this->getPage($to);
+ //update all WikiLinks in existing pages
+ //non-atomic! i.e. if rename fails the links are not undone
+ if ($updateWikiLinks) {
+ $lookbehind = "/(?<=[\W:])\Q";
+ $lookahead = "\E(?=[\W:])/";
+ require_once 'lib/plugin/WikiAdminSearchReplace.php';
+ $links = $oldpage->getBackLinks();
+ while ($linked_page = $links->next()) {
+ WikiPlugin_WikiAdminSearchReplace::replaceHelper
+ ($this,
+ $linked_page->getName(),
+ $lookbehind . $from . $lookahead, $to,
+ true, true);
+ }
+ // FIXME: Disabled to avoid recursive modification when renaming
+ // a page like 'PageFoo to 'PageFooTwo'
+ if (0) {
+ $links = $newpage->getBackLinks();
while ($linked_page = $links->next()) {
WikiPlugin_WikiAdminSearchReplace::replaceHelper
($this,
@@ -561,37 +571,22 @@
$lookbehind . $from . $lookahead, $to,
true, true);
}
- // FIXME: Disabled to avoid recursive modification when renaming
- // a page like 'PageFoo to 'PageFooTwo'
- if (0) {
- $links = $newpage->getBackLinks();
- while ($linked_page = $links->next()) {
- WikiPlugin_WikiAdminSearchReplace::replaceHelper
- ($this,
- $linked_page->getName(),
- $lookbehind . $from . $lookahead, $to,
- true, true);
- }
- }
}
- 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);
+ }
+ 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);
}
- } else {
- trigger_error(_("WikiDB::renamePage() not yet implemented for this backend"),
- E_USER_WARNING);
+ } elseif (!$oldpage->getCurrentRevision(false) and !$newpage->exists()) {
+ // if a version 0 exists try it also.
+ $result = $this->_backend->rename_page($from, $to);
}
/* Generate notification emails? */
if ($result and ENABLE_MAILNOTIFY) {
Modified: trunk/lib/plugin/WikiAdminRename.php
===================================================================
--- trunk/lib/plugin/WikiAdminRename.php 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/lib/plugin/WikiAdminRename.php 2021-09-16 17:34:48 UTC (rev 10557)
@@ -240,7 +240,6 @@
$ul->pushContent(HTML::li(fmt("Access denied to rename page “%s”.",
WikiLink($name))));
} elseif ($dbi->renamePage($name, $newname, $updatelinks)) {
- /* not yet implemented for all backends */
$page = $dbi->getPage($newname);
$current = $page->getCurrentRevision();
$version = $current->getVersion();
Modified: trunk/locale/de/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/es/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/fr/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/it/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/ja/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/nl/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/po/de.po
===================================================================
--- trunk/locale/po/de.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/de.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2000-10-31 02:23+0200\n"
"Last-Translator: Reini Urban <ru...@x-...>, Carsten Klapp "
"<car...@us...>, Helmer Pardun <pardunpress@t-online."
@@ -1375,6 +1375,9 @@
"Liste aller Versionen eines Autors mit Diff-Links, oder eine SeitenProtokoll-"
"ähnliche Liste einer Seite nur für einen Autor."
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr "kleinere"
@@ -4682,9 +4685,6 @@
msgid "renamed from %s"
msgstr "umbenannt von %s"
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr "WikiDB::renamePage() für dieses Backend noch nicht implementiert"
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr "%s: Datum dieser aktuellen Neubearbeitung ist %s"
Modified: trunk/locale/po/es.po
===================================================================
--- trunk/locale/po/es.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/es.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -11,7 +11,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2000-02-01 00:50-0500\n"
"Last-Translator: Pablo Roca <pr...@cl...>\n"
"Language-Team: \n"
@@ -1349,6 +1349,9 @@
"PageHistory-like list of a single page for only one user."
msgstr ""
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr ""
@@ -4556,9 +4559,6 @@
msgid "renamed from %s"
msgstr "retitulado de %s"
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr "WikiDB::renamePage() no todavía puesto en ejecucio'n para este backend"
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr "%s: La fecha de la nueva revisión es %s"
Modified: trunk/locale/po/fr.po
===================================================================
--- trunk/locale/po/fr.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/fr.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2004-06-22 21:10+0200\n"
"Last-Translator: Pierrick Meignen <mei...@wa...>, Roland "
"Trique <rol...@fr...>, Stéphane Gourichon <stephane.gourichon@lip6."
@@ -1365,6 +1365,9 @@
"liste du type HistoriqueDeLaPage pour une simple page uniquement pour un "
"auteur."
+msgid "You are not signed in and no author is specified."
+msgstr "Vous n'êtes pas identifié et il n'y a pas d'auteur spécifié."
+
msgid "Minor"
msgstr "Mineur"
@@ -4654,9 +4657,6 @@
msgid "renamed from %s"
msgstr "renommée à partir de %s"
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr "WikiBD::renamePage() pas encore implémentée pour le Principal"
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr "%s : la date de la nouvelle version est %s"
Modified: trunk/locale/po/it.po
===================================================================
--- trunk/locale/po/it.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/it.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2005-02-12 16:23+0100\n"
"Last-Translator: Antonio Bonifati ant[(at)]monitor.deis.unical.it\n"
"Language-Team: \n"
@@ -1332,6 +1332,9 @@
"PageHistory-like list of a single page for only one user."
msgstr ""
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr ""
@@ -4530,9 +4533,6 @@
msgid "renamed from %s"
msgstr ""
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr ""
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr ""
Modified: trunk/locale/po/ja.po
===================================================================
--- trunk/locale/po/ja.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/ja.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2003-06-07 09:01+0900\n"
"Last-Translator: Tadashi Jokagi <web...@el...>\n"
"Language-Team: LANGUAGE <LL...@li...>\n"
@@ -1318,6 +1318,9 @@
"PageHistory-like list of a single page for only one user."
msgstr ""
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr ""
@@ -4516,9 +4519,6 @@
msgid "renamed from %s"
msgstr ""
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr ""
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr ""
Modified: trunk/locale/po/nl.po
===================================================================
--- trunk/locale/po/nl.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/nl.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2000-09-30 02:23+0200\n"
"Last-Translator: Jan Nieuwenhuizen <ja...@gn...>\n"
"Language-Team: Dutch <nl...@li...>\n"
@@ -1324,6 +1324,9 @@
"PageHistory-like list of a single page for only one user."
msgstr ""
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr ""
@@ -4522,9 +4525,6 @@
msgid "renamed from %s"
msgstr ""
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr ""
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr ""
Modified: trunk/locale/po/phpwiki.pot
===================================================================
--- trunk/locale/po/phpwiki.pot 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/phpwiki.pot 2021-09-16 17:34:48 UTC (rev 10557)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki-1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2002-12-14 17:51-0500\n"
"Last-Translator: Reini Urban <ru...@us...>\n"
"Language-Team: LANGUAGE <LL...@li...>\n"
@@ -1318,6 +1318,9 @@
"PageHistory-like list of a single page for only one user."
msgstr ""
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr ""
@@ -4516,9 +4519,6 @@
msgid "renamed from %s"
msgstr ""
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr ""
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr ""
Modified: trunk/locale/po/sv.po
===================================================================
--- trunk/locale/po/sv.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/sv.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -7,7 +7,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2001-01-27 01:58+0200\n"
"Last-Translator: Jon Åslund <jo...@he...>\n"
"Language-Team: \n"
@@ -1319,6 +1319,9 @@
"PageHistory-like list of a single page for only one user."
msgstr ""
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr ""
@@ -4517,9 +4520,6 @@
msgid "renamed from %s"
msgstr ""
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr ""
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr ""
Modified: trunk/locale/po/zh.po
===================================================================
--- trunk/locale/po/zh.po 2021-09-16 15:48:25 UTC (rev 10556)
+++ trunk/locale/po/zh.po 2021-09-16 17:34:48 UTC (rev 10557)
@@ -6,7 +6,7 @@
msgstr ""
"Project-Id-Version: PhpWiki 1.6.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2021-09-03 19:05+0200\n"
+"POT-Creation-Date: 2021-09-16 19:32+0200\n"
"PO-Revision-Date: 2004-04-21 10:08+0800\n"
"Last-Translator: DruryL <dr...@us...>\n"
"Language-Team: DruryL <dr...@us...>\n"
@@ -1323,6 +1323,9 @@
"列出所有被使用者編輯的頁面修訂,並帶有差異連結,或顯示像是頁面歷程的單一頁面列"
"表."
+msgid "You are not signed in and no author is specified."
+msgstr ""
+
msgid "Minor"
msgstr "次要"
@@ -4533,9 +4536,6 @@
msgid "renamed from %s"
msgstr "從 %s 更名"
-msgid "WikiDB::renamePage() not yet implemented for this backend"
-msgstr "後台的 WikiDB::renamePage() 還沒實作出來."
-
#, php-format
msgid "%s: Date of new revision is %s"
msgstr "%s: 新版本的日期是 %s"
Modified: trunk/locale/sv/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
Modified: trunk/locale/zh/LC_MESSAGES/phpwiki.mo
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|