From: Carsten K. <car...@us...> - 2002-02-15 17:52:50
|
Update of /cvsroot/phpwiki/phpwiki/lib/plugin In directory usw-pr-cvs1:/tmp/cvs-serv12153 Modified Files: OrphanedPages.php Log Message: add version column to identify empty / deleted pages Index: OrphanedPages.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/plugin/OrphanedPages.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -I^#: -d -r1.1 -r1.2 --- OrphanedPages.php 15 Feb 2002 14:45:49 -0000 1.1 +++ OrphanedPages.php 15 Feb 2002 17:52:46 -0000 1.2 @@ -54,13 +54,19 @@ extract($this->getArgs($argstr, $request)); $pagelist = new PageList($info, $exclude); + if (!$noheader) $pagelist->setCaption(_("Orphaned Pages in this wiki (%d total):")); - $allpages_iter = $dbi->getAllPages($include_empty); + + // deleted pages show up as version 0. + if ($include_empty) + $pagelist->_addColumn('version'); // There's probably a more efficient way to do this (eg a tailored SQL query via the // backend, but this does the job + $allpages_iter = $dbi->getAllPages($include_empty); + while ($page = $allpages_iter->next()) { $links_iter = $page->getLinks(); @@ -68,6 +74,7 @@ if (!$links_iter->next()) $pagelist->addPage($page); } + return $pagelist; } |