From: Sébastien Le C. <seb...@we...> - 2010-09-10 22:29:26
|
Hi Marc-Étienne, I’m curious as to what error this patch caused so that I can have a look, rather than blindly reverting it -- the “AllPages” plugin is now again broken in my environments, which doesn’t seem to me like a convergent approach. Thanks, Sébastien. On 10/09/2010 12:31, var...@us... wrote: > Revision: 7681 > http://phpwiki.svn.sourceforge.net/phpwiki/?rev=7681&view=rev > Author: vargenau > Date: 2010-09-10 11:31:37 +0000 (Fri, 10 Sep 2010) > > Log Message: > ----------- > revert of Patch 3024787 by S?\195?\169bastien Le Callonnec (caused an SQL syntax error) > > Modified Paths: > -------------- > trunk/TODO > trunk/lib/plugin/AllPages.php > > Modified: trunk/TODO > =================================================================== > --- trunk/TODO 2010-09-10 11:27:57 UTC (rev 7680) > +++ trunk/TODO 2010-09-10 11:31:37 UTC (rev 7681) > @@ -4,6 +4,7 @@ > * AllPages give too many pages > * WantedPages give too many pages (from interwiki map) > (to be tested in both Pear and ADODB) > +* revert of Patch 3024787 by Sébastien Le Callonnec (caused an SQL syntax error) > > == Others== > * Minimizer for JS/CSS > > Modified: trunk/lib/plugin/AllPages.php > =================================================================== > --- trunk/lib/plugin/AllPages.php 2010-09-10 11:27:57 UTC (rev 7680) > +++ trunk/lib/plugin/AllPages.php 2010-09-10 11:31:37 UTC (rev 7681) > @@ -67,18 +67,17 @@ > $timer = new DebugTimer; > } > $caption = _("All pages in this wiki (%d total):"); > - $exclude_empty_pagename = array(''); > > if ( !empty($args['userpages']) ) { > $pages = PageList::allUserPages($args['include_empty'], > - $args['sortby'], '', > - $exclude_empty_pagename); > + $args['sortby'], '' > + ); > $caption = _("List of user-created pages (%d total):"); > $args['count'] = $request->getArg('count'); > } elseif ( !empty($args['owner']) ) { > $pages = PageList::allPagesByOwner($args['owner'], $args['include_empty'], > - $args['sortby'], '', > - $exclude_empty_pagename); > + $args['sortby'], '' > + ); > $args['count'] = $request->getArg('count'); > if (!$args['count']) > $args['count'] = $dbi->numPages($args['include_empty'], $args['exclude']); > @@ -90,8 +89,8 @@ > $pages->_options['count'] = $args['count']; > } elseif ( !empty($args['author']) ) { > $pages = PageList::allPagesByAuthor($args['author'], $args['include_empty'], > - $args['sortby'], '', > - $exclude_empty_pagename); > + $args['sortby'], '' > + ); > $args['count'] = $request->getArg('count'); > if (!$args['count']) > $args['count'] = $dbi->numPages($args['include_empty'], $args['exclude']); > @@ -103,8 +102,7 @@ > $pages->_options['count'] = $args['count']; > } elseif ( !empty($args['creator']) ) { > $pages = PageList::allPagesByCreator($args['creator'], $args['include_empty'], > - $args['sortby'], '', > - $exclude_empty_pagename > + $args['sortby'], '' > ); > $args['count'] = $request->getArg('count'); > if (!$args['count']) > @@ -115,6 +113,8 @@ > : $args['creator'], > 'if_known'), $args['count']); > $pages->_options['count'] = $args['count']; > + //} elseif ($pages) { > + // $args['count'] = count($pages); > } else { > if (! $request->getArg('count')) > $args['count'] = $dbi->numPages($args['include_empty'], $args['exclude']); > @@ -126,17 +126,15 @@ > $pagelist = new PageList($args['info'], $args['exclude'], $args); > if (!$args['noheader']) $pagelist->setCaption($caption); > > - if ($pages !== false) { > + // deleted pages show up as version 0. > + //if ($args['include_empty']) > + // $pagelist->_addColumn('version'); > + > + if ($pages !== false) > $pagelist->addPageList($pages); > - } > - else { > - // Clear count as previous value was for non-empty pages. > - $pagelist->clearArg('count'); > - $pagelist->addPages($dbi->getAllPages($args['include_empty'], > - $args['sortby'], > - $args['limit'], > - $exclude_empty_pagename)); > - } > + else > + $pagelist->addPages( $dbi->getAllPages($args['include_empty'], $args['sortby'], > + $args['limit']) ); > if (DEBUG&& $args['debug']) { > return HTML($pagelist, > HTML::p(fmt("Elapsed time: %s s", $timer->getStats()))); > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Automate Storage Tiering Simply > Optimize IT performance and efficiency through flexible, powerful, > automated storage tiering capabilities. View this brief to learn how > you can reduce costs and improve performance. > http://p.sf.net/sfu/dell-sfdev2dev > _______________________________________________ > phpwiki-checkins mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-checkins |