|
From: <var...@us...> - 2022-02-05 17:52:44
|
Revision: 10984
http://sourceforge.net/p/phpwiki/code/10984
Author: vargenau
Date: 2022-02-05 17:52:43 +0000 (Sat, 05 Feb 2022)
Log Message:
-----------
LinkDatabase plugin: argument include_empty makes no sense, empty pages have no link
Modified Paths:
--------------
trunk/lib/plugin/LinkDatabase.php
trunk/pgsrc/Help%2FLinkDatabasePlugin
Modified: trunk/lib/plugin/LinkDatabase.php
===================================================================
--- trunk/lib/plugin/LinkDatabase.php 2022-02-05 17:42:12 UTC (rev 10983)
+++ trunk/lib/plugin/LinkDatabase.php 2022-02-05 17:52:43 UTC (rev 10984)
@@ -63,7 +63,6 @@
array(
'format' => 'html', // 'html', 'text', 'xml'
'noheader' => false,
- 'include_empty' => false,
'exclude_from' => false,
));
}
@@ -102,17 +101,6 @@
global $WikiTheme;
$args = $this->getArgs($argstr, $request);
- $include_empty = $args['include_empty'];
- if (!is_bool($include_empty)) {
- if (($include_empty == '0') || ($include_empty == 'false')) {
- $include_empty = false;
- } elseif (($include_empty == '1') || ($include_empty == 'true')) {
- $include_empty = true;
- } else {
- return $this->error(sprintf(_("Argument '%s' must be a boolean"), "include_empty"));
- }
- }
-
if (isset($args['limit']) && !is_limit($args['limit'])) {
return HTML::p(array('class' => "error"),
_("Illegal “limit” argument: must be an integer or two integers separated by comma"));
@@ -121,7 +109,7 @@
$caption = _("All pages with all links in this wiki (%d total):");
if (!empty($args['owner'])) {
- $pages = PageList::allPagesByOwner($args['owner'], $include_empty,
+ $pages = PageList::allPagesByOwner($args['owner'], false,
$args['sortby'], $args['limit']);
if ($args['owner'])
$caption = fmt("List of pages owned by %s (%d total):",
@@ -128,7 +116,7 @@
WikiLink($args['owner'], 'if_known'),
count($pages));
} elseif (!empty($args['author'])) {
- $pages = PageList::allPagesByAuthor($args['author'], $include_empty,
+ $pages = PageList::allPagesByAuthor($args['author'], false,
$args['sortby'], $args['limit']);
if ($args['author'])
$caption = fmt("List of pages last edited by %s (%d total):",
@@ -135,7 +123,7 @@
WikiLink($args['author'], 'if_known'),
count($pages));
} elseif (!empty($args['creator'])) {
- $pages = PageList::allPagesByCreator($args['creator'], $include_empty,
+ $pages = PageList::allPagesByCreator($args['creator'], false,
$args['sortby'], $args['limit']);
if ($args['creator'])
$caption = fmt("List of pages created by %s (%d total):",
@@ -143,10 +131,10 @@
count($pages));
} else {
if (!$request->getArg('count'))
- $args['count'] = $dbi->numPages($include_empty, $args['exclude_from']);
+ $args['count'] = $dbi->numPages(false, $args['exclude_from']);
else
$args['count'] = $request->getArg('count');
- $pages = $dbi->getAllPages($include_empty, $args['sortby'],
+ $pages = $dbi->getAllPages(false, $args['sortby'],
$args['limit'], $args['exclude_from']);
}
if ($args['format'] == 'html') {
Modified: trunk/pgsrc/Help%2FLinkDatabasePlugin
===================================================================
--- trunk/pgsrc/Help%2FLinkDatabasePlugin 2022-02-05 17:42:12 UTC (rev 10983)
+++ trunk/pgsrc/Help%2FLinkDatabasePlugin 2022-02-05 17:52:43 UTC (rev 10984)
@@ -1,4 +1,4 @@
-Date: Sat, 5 Feb 2022 18:40:59 +0000
+Date: Sat, 5 Feb 2022 18:51:29 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.6.1)
Content-Type: application/x-phpwiki;
pagename=Help%2FLinkDatabasePlugin;
@@ -32,10 +32,6 @@
| Boolean. If true, header should be omitted.
| false
|-
-| **include_empty**
-| Boolean. If true, pages that are referenced but not yet created are included in the list.
-| false
-|-
| **exclude_from**
|
| false
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|