|
From: <var...@us...> - 2008-09-16 22:14:30
|
Revision: 6265
http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6265&view=rev
Author: vargenau
Date: 2008-09-16 22:14:40 +0000 (Tue, 16 Sep 2008)
Log Message:
-----------
New action page: AllUserPages
Modified Paths:
--------------
trunk/lib/PageList.php
trunk/lib/plugin/AllPages.php
trunk/pgsrc/SpecialPages
Added Paths:
-----------
trunk/pgsrc/AllUserPages
Modified: trunk/lib/PageList.php
===================================================================
--- trunk/lib/PageList.php 2008-09-16 18:39:14 UTC (rev 6264)
+++ trunk/lib/PageList.php 2008-09-16 22:14:40 UTC (rev 6265)
@@ -1085,6 +1085,22 @@
return $allPages;
}
+ // UserPages are pages NOT created by "The PhpWiki programming team"
+ function allUserPages($include_empty=false, $sortby='',
+ $limit='', $exclude='') {
+ $dbi = $GLOBALS['request']->getDbh();
+ $allPagehandles = $dbi->getAllPages($include_empty, $sortby, $limit, $exclude);
+ $allPages = array();
+ while ($pagehandle = $allPagehandles->next()) {
+ $name = $pagehandle->getName();
+ $creator = $pagehandle->getCreator();
+ if ($creator !== _("The PhpWiki programming team")) {
+ $allPages[] = $name;
+ }
+ }
+ return $allPages;
+ }
+
////////////////////
// private
////////////////////
@@ -1414,7 +1430,7 @@
and isset($col->_field)
and $col->_field == 'pagename'
and ($maxlen = $this->maxLen())) {
- $heading->setAttr('width', $maxlen * 7);
+ // $heading->setAttr('width', $maxlen * 7);
}
$row->pushContent($heading);
if (is_string($col->getHeading()))
Modified: trunk/lib/plugin/AllPages.php
===================================================================
--- trunk/lib/plugin/AllPages.php 2008-09-16 18:39:14 UTC (rev 6264)
+++ trunk/lib/plugin/AllPages.php 2008-09-16 22:14:40 UTC (rev 6265)
@@ -52,7 +52,8 @@
'include_empty' => false,
//'pages' => false, // DONT, this would be ListPages then.
'info' => '',
- 'debug' => false
+ 'debug' => false,
+ 'userpages' => false
));
}
@@ -70,7 +71,13 @@
$timer = new DebugTimer;
$caption = _("All pages in this wiki (%d total):");
- if ( !empty($args['owner']) ) {
+ if ( !empty($args['userpages']) ) {
+ $pages = PageList::allUserPages($args['include_empty'],
+ $args['sortby'], ''
+ );
+ $caption = fmt("List of user-created pages (%d total):", count($pages));
+ $args['count'] = $request->getArg('count');
+ } elseif ( !empty($args['owner']) ) {
$pages = PageList::allPagesByOwner($args['owner'], $args['include_empty'],
$args['sortby'], ''
);
Added: trunk/pgsrc/AllUserPages
===================================================================
--- trunk/pgsrc/AllUserPages (rev 0)
+++ trunk/pgsrc/AllUserPages 2008-09-16 22:14:40 UTC (rev 6265)
@@ -0,0 +1,16 @@
+Date: Mon, 16 Sep 2008 14:15:24 +0000
+Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
+X-Rcs-Id: $Id: AllPages 6184 2008-08-22 10:33:41Z vargenau $
+Content-Type: application/x-phpwiki;
+ pagename=AllPages;
+ flags=PAGE_LOCKED;
+ markup=2;
+ charset=iso-8859-1
+Content-Transfer-Encoding: binary
+
+Here is the list of all user pages on this Wiki (pages that were not created at initialisation of the wiki).
+
+<?plugin AllPages userpages=1 info||=mtime,author,hits limit||=1000 sortby=+pagename ?>
+
+----
+[CategoryActionPage]
Modified: trunk/pgsrc/SpecialPages
===================================================================
--- trunk/pgsrc/SpecialPages 2008-09-16 18:39:14 UTC (rev 6264)
+++ trunk/pgsrc/SpecialPages 2008-09-16 22:14:40 UTC (rev 6265)
@@ -1,4 +1,4 @@
-Date: Mon, 16 Jun 2008 14:15:24 +0000
+Date: Mon, 16 Sep 2008 14:15:24 +0000
Mime-Version: 1.0 (Produced by PhpWiki 1.3.14-20080124)
X-Rcs-Id: $Id$
Content-Type: application/x-phpwiki;
@@ -13,6 +13,7 @@
* [AllPagesCreatedByMe]
* [AllPagesOwnedByMe]
* [AllPagesLastEditedByMe]
+* [AllUserPages]
* [LockedPages]
* [OrphanedPages]
* [WantedPages]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|