|
From: <var...@us...> - 2021-12-09 14:33:02
|
Revision: 10757
http://sourceforge.net/p/phpwiki/code/10757
Author: vargenau
Date: 2021-12-09 14:32:59 +0000 (Thu, 09 Dec 2021)
Log Message:
-----------
WikiAdminRename plugin: factor code, avoid warning, private functions
Modified Paths:
--------------
trunk/lib/plugin/WikiAdminRename.php
Modified: trunk/lib/plugin/WikiAdminRename.php
===================================================================
--- trunk/lib/plugin/WikiAdminRename.php 2021-12-09 13:59:17 UTC (rev 10756)
+++ trunk/lib/plugin/WikiAdminRename.php 2021-12-09 14:32:59 UTC (rev 10757)
@@ -190,7 +190,7 @@
=> WIKIAUTH_ADMIN))));
}
- private function checkBox(&$post_args, $name, $msg)
+ private function checkBox($post_args, $name, $msg)
{
$id = 'admin_rename-' . $name;
$checkbox = HTML::input(array('type' => 'checkbox',
@@ -203,7 +203,7 @@
return HTML::div($checkbox, ' ', HTML::label(array('for' => $id), $msg));
}
- private function renamePages(&$dbi, &$request, $pages, $from, $to, $updatelinks = false,
+ private function renamePages($dbi, $request, $pages, $from, $to, $updatelinks = false,
$createredirect = false)
{
$result = HTML::div();
@@ -279,18 +279,19 @@
$result->pushContent(HTML::p(
fmt("%d pages have been renamed:", $count)));
}
- $result->pushContent($ul);
- return $result;
} else {
$result->setAttr('class', 'error');
$result->pushContent(HTML::p(fmt("No pages renamed.")));
- $result->pushContent($ul);
- return $result;
}
+ $result->pushContent($ul);
+ return $result;
}
- private function renameForm(&$header, $post_args, $singlepage, $confirm=false)
+ private function renameForm($header, $post_args, $singlepage, $confirm=false)
{
+ if ($post_args === false) {
+ $post_args = array('from' => '', 'to' => '');
+ }
$table = HTML::table();
if ($singlepage) {
$this->tablePush($table, _("Rename") . " " . _("from") . _(": "),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|