From: <var...@us...> - 2009-02-13 16:17:15
|
Revision: 6495 http://phpwiki.svn.sourceforge.net/phpwiki/?rev=6495&view=rev Author: vargenau Date: 2009-02-13 16:17:09 +0000 (Fri, 13 Feb 2009) Log Message: ----------- Set author and modification time Modified Paths: -------------- trunk/lib/plugin/WikiAdminSearchReplace.php Modified: trunk/lib/plugin/WikiAdminSearchReplace.php =================================================================== --- trunk/lib/plugin/WikiAdminSearchReplace.php 2009-02-13 16:16:13 UTC (rev 6494) +++ trunk/lib/plugin/WikiAdminSearchReplace.php 2009-02-13 16:17:09 UTC (rev 6495) @@ -2,7 +2,7 @@ rcs_id('$Id$'); /* Copyright 2004,2007 $ThePhpWikiProgrammingTeam - Copyright 2008 Marc-Etienne Vargenau, Alcatel-Lucent + Copyright 2008-2009 Marc-Etienne Vargenau, Alcatel-Lucent This file is part of PhpWiki. @@ -58,7 +58,7 @@ )); } - function replaceHelper(&$dbi, $pagename, $from, $to, $case_exact=true, $regex=false) { + function replaceHelper(&$dbi, &$request, $pagename, $from, $to, $case_exact=true, $regex=false) { $page = $dbi->getPage($pagename); if ($page->exists()) {// don't replace default contents $current = $page->getCurrentRevision(); @@ -80,7 +80,10 @@ } if ($text != $newtext) { $meta = $current->_data; - $meta['summary'] = sprintf(_("WikiAdminSearchReplace %s by %s"),$from,$to); + $meta['summary'] = sprintf(_("Replace '%s' by '%s'"), $from, $to); + $meta['is_minor_edit'] = 0; + $meta['author'] = $request->_user->UserName(); + unset($meta['mtime']); // force new date return $page->save($newtext, $version + 1, $meta); } } @@ -97,7 +100,7 @@ foreach ($pages as $pagename) { if (!mayAccessPage('edit', $pagename)) { $ul->pushContent(HTML::li(fmt("Access denied to change page '%s'.",$pagename))); - } elseif (($result = $this->replaceHelper($dbi, $pagename, $from, $to, + } elseif (($result = $this->replaceHelper($dbi, $request, $pagename, $from, $to, $case_exact, $regex))) { $ul->pushContent(HTML::li(fmt("Replaced '%s' with '%s' in page '%s'.", @@ -179,7 +182,7 @@ $pagelist->addPageList($pages); - $header = HTML::p(); + $header = HTML::div(); if (empty($post_args['from'])) $header->pushContent( HTML::p(HTML::em(_("Warning: The search string cannot be empty!")))); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |