From 917555784cbf16dac6bbdc959ded9e8bfd3ef76a Mon Sep 17 00:00:00 2001 From: vargenau Date: Thu, 4 Mar 2010 10:48:07 +0000 Subject: [PATCH] Replace tabs by spaces; remove EOL spaces git-svn-id: svn://svn.code.sf.net/p/phpwiki/code/trunk@7302 96ab9672-09ca-45d6-a79d-3d69d39ca109 --- lib/plugin/AddComment.php | 20 +- lib/plugin/AllPages.php | 68 +-- lib/plugin/AllUsers.php | 6 +- lib/plugin/AnalyseAccessLogSql.php | 36 +- lib/plugin/AppendText.php | 42 +- lib/plugin/AsciiMath.php | 14 +- lib/plugin/AsciiSVG.php | 32 +- lib/plugin/BackLinks.php | 110 ++-- lib/plugin/BlogArchives.php | 24 +- lib/plugin/BlogJournal.php | 14 +- lib/plugin/BoxRight.php | 4 +- lib/plugin/CacheTest.php | 2 +- lib/plugin/Calendar.php | 22 +- lib/plugin/CalendarList.php | 58 +-- lib/plugin/Chart.php | 14 +- lib/plugin/CreateBib.php | 28 +- lib/plugin/CreatePage.php | 76 +-- lib/plugin/CreateToc.php | 130 ++--- lib/plugin/Diff.php | 18 +- lib/plugin/DynamicIncludePage.php | 20 +- lib/plugin/EditMetaData.php | 106 ++-- lib/plugin/ExternalSearch.php | 36 +- lib/plugin/FileInfo.php | 336 ++++++------- lib/plugin/FoafViewer.php | 40 +- lib/plugin/FrameInclude.php | 6 +- lib/plugin/FullTextSearch.php | 26 +- lib/plugin/GoTo.php | 8 +- lib/plugin/GoogleMaps.php | 62 +-- lib/plugin/GooglePlugin.php | 10 +- lib/plugin/GraphViz.php | 86 ++-- lib/plugin/HtmlConverter.php | 200 ++++---- lib/plugin/Imdb.php | 4 +- lib/plugin/IncludePage.php | 12 +- lib/plugin/IncludePages.php | 18 +- lib/plugin/IncludeSiteMap.php | 4 +- lib/plugin/InterWikiSearch.php | 12 +- lib/plugin/JabberPresence.php | 16 +- lib/plugin/LdapSearch.php | 126 ++--- lib/plugin/LinkDatabase.php | 42 +- lib/plugin/LinkSearch.php | 212 ++++---- lib/plugin/ListPages.php | 20 +- lib/plugin/ListRelations.php | 10 +- lib/plugin/MediawikiTable.php | 38 +- lib/plugin/ModeratedPage.php | 264 +++++----- lib/plugin/MostPopular.php | 6 +- lib/plugin/NewPagesPerUser.php | 128 ++--- lib/plugin/NoCache.php | 4 +- lib/plugin/OldStyleTable.php | 16 +- lib/plugin/OrphanedPages.php | 4 +- lib/plugin/PageDump.php | 14 +- lib/plugin/PageGroup.php | 6 +- lib/plugin/PageHistory.php | 54 +- lib/plugin/PageInfo.php | 2 +- lib/plugin/PageTrail.php | 2 +- lib/plugin/PasswordReset.php | 226 ++++----- lib/plugin/PhotoAlbum.php | 136 ++--- lib/plugin/PhpWeather.php | 2 +- lib/plugin/Ploticus.php | 94 ++-- lib/plugin/PluginManager.php | 10 +- lib/plugin/PopUp.php | 64 +-- lib/plugin/PopularNearby.php | 22 +- lib/plugin/PopularTags.php | 54 +- lib/plugin/PreferenceApp.php | 88 ++-- lib/plugin/Processing.php | 32 +- lib/plugin/RandomPage.php | 4 +- lib/plugin/RateIt.php | 172 +++---- lib/plugin/RawHtml.php | 28 +- lib/plugin/RecentChanges.php | 276 +++++----- lib/plugin/RecentChangesCached.php | 32 +- lib/plugin/RecentComments.php | 22 +- lib/plugin/RecentReferrers.php | 6 +- lib/plugin/RedirectTo.php | 2 +- lib/plugin/RelatedChanges.php | 6 +- lib/plugin/RichTable.php | 20 +- lib/plugin/RssFeed.php | 26 +- lib/plugin/SearchHighlight.php | 18 +- lib/plugin/SemanticRelations.php | 46 +- lib/plugin/SemanticSearch.php | 696 +++++++++++++------------- lib/plugin/SemanticSearchAdvanced.php | 244 ++++----- lib/plugin/SiteMap.php | 18 +- lib/plugin/SpellCheck.php | 92 ++-- lib/plugin/SqlResult.php | 42 +- lib/plugin/SyncWiki.php | 526 +++++++++---------- lib/plugin/SyntaxHighlighter.php | 12 +- lib/plugin/SystemInfo.php | 24 +- lib/plugin/TeX2png.php | 66 +-- lib/plugin/Template.php | 52 +- lib/plugin/TexToPng.php | 88 ++-- lib/plugin/TitleSearch.php | 18 +- lib/plugin/Transclude.php | 14 +- lib/plugin/TranslateText.php | 6 +- lib/plugin/UnfoldSubpages.php | 58 +-- lib/plugin/UpLoad.php | 64 +-- lib/plugin/UriResolver.php | 18 +- lib/plugin/UserPreferences.php | 24 +- lib/plugin/UserRatings.php | 52 +- lib/plugin/VisualWiki.php | 28 +- lib/plugin/WantedPages.php | 54 +- lib/plugin/WatchPage.php | 68 +-- lib/plugin/WhoIsOnline.php | 40 +- lib/plugin/WikiAdminChmod.php | 20 +- lib/plugin/WikiAdminChown.php | 16 +- lib/plugin/WikiAdminMarkup.php | 16 +- lib/plugin/WikiAdminPurge.php | 6 +- lib/plugin/WikiAdminRemove.php | 12 +- lib/plugin/WikiAdminRename.php | 84 ++-- lib/plugin/WikiAdminSearchReplace.php | 52 +- lib/plugin/WikiAdminSelect.php | 10 +- lib/plugin/WikiAdminSetAcl.php | 44 +- lib/plugin/WikiAdminSetExternal.php | 8 +- lib/plugin/WikiAdminUtils.php | 104 ++-- lib/plugin/WikiBlog.php | 102 ++-- lib/plugin/WikiForm.php | 2 +- lib/plugin/WikiFormRich.php | 288 +++++------ lib/plugin/WikiForum.php | 6 +- lib/plugin/WikiPoll.php | 116 ++--- lib/plugin/WikicreoleTable.php | 24 +- lib/plugin/YouTube.php | 268 +++++----- lib/plugin/_AuthInfo.php | 24 +- lib/plugin/_BackendInfo.php | 60 +-- lib/plugin/_GroupInfo.php | 2 +- lib/plugin/_Retransform.php | 32 +- lib/plugin/_WikiTranslation.php | 96 ++-- lib/plugin/text2png.php | 70 +-- 124 files changed, 3910 insertions(+), 3910 deletions(-) diff --git a/lib/plugin/AddComment.php b/lib/plugin/AddComment.php index bf93c215d..cb3d966f2 100644 --- a/lib/plugin/AddComment.php +++ b/lib/plugin/AddComment.php @@ -2,7 +2,7 @@ rcs_id('$Id$'); /* * Copyright (C) 2004 $ThePhpWikiProgrammingTeam - * + * * This file is part of PhpWiki. * * PhpWiki is free software; you can redistribute it and/or modify @@ -59,7 +59,7 @@ extends WikiPlugin_WikiBlog // 'add' - only show entry box for new comment // 'show,add' - show old comments, then entry box // 'add,show' - show entry box followed by list of comments - // jshide - boolean - quick javascript expansion of the comments + // jshide - boolean - quick javascript expansion of the comments // and addcomment box function getDefaultArguments() { @@ -80,7 +80,7 @@ extends WikiPlugin_WikiBlog // Get our form args. $comment = $request->getArg("comment"); $request->setArg('comment', false); - + if ($request->isPost() and !empty($comment['addcomment'])) { $this->add($request, $comment, 'comment'); // noreturn } @@ -125,12 +125,12 @@ function togglecomments(a) { $div->pushContent($show); break; case 'add': - global $WikiTheme; - if (!$WikiTheme->DUMP_MODE) { - $add = $this->showForm($request, $args, 'addcomment'); - //if ($args['jshide']) $add->setAttr('style','display:none;'); - $div->pushContent($add); - } + global $WikiTheme; + if (!$WikiTheme->DUMP_MODE) { + $add = $this->showForm($request, $args, 'addcomment'); + //if ($args['jshide']) $add->setAttr('style','display:none;'); + $div->pushContent($add); + } break; default: return $this->error(sprintf("Bad mode ('%s')", $show)); @@ -139,7 +139,7 @@ function togglecomments(a) { $html->pushContent($div); return $html; } - + }; // For emacs users diff --git a/lib/plugin/AllPages.php b/lib/plugin/AllPages.php index 65fd2fa9f..496ede37a 100644 --- a/lib/plugin/AllPages.php +++ b/lib/plugin/AllPages.php @@ -56,7 +56,7 @@ extends WikiPlugin 'userpages' => false )); } - + // info arg allows multiple columns // info=mtime,hits,summary,version,author,locked,minor,markup or all // exclude arg allows multiple pagenames exclude=HomePage,RecentChanges @@ -72,53 +72,53 @@ extends WikiPlugin $timer = new DebugTimer; } $caption = _("All pages in this wiki ({total} total):"); - + if ( !empty($args['userpages']) ) { $pages = PageList::allUserPages($args['include_empty'], $args['sortby'], '' - ); - $caption = _("List of user-created pages ({total} total):"); - $args['count'] = $request->getArg('count'); + ); + $caption = _("List of user-created pages ({total} total):"); + $args['count'] = $request->getArg('count'); } elseif ( !empty($args['owner']) ) { $pages = PageList::allPagesByOwner($args['owner'], $args['include_empty'], $args['sortby'], '' - ); - $caption = fmt("List of pages owned by [%s] ({total} total):", - WikiLink($args['owner'] == '[]' - ? $request->_user->getAuthenticatedId() - : $args['owner'], - 'if_known')); - $args['count'] = $request->getArg('count'); - $pages->_options['count'] = $args['count']; + ); + $caption = fmt("List of pages owned by [%s] ({total} total):", + WikiLink($args['owner'] == '[]' + ? $request->_user->getAuthenticatedId() + : $args['owner'], + 'if_known')); + $args['count'] = $request->getArg('count'); + $pages->_options['count'] = $args['count']; } elseif ( !empty($args['author']) ) { $pages = PageList::allPagesByAuthor($args['author'], $args['include_empty'], - $args['sortby'], '' - ); - $caption = fmt("List of pages last edited by [%s] ({total} total):", - WikiLink($args['author'] == '[]' - ? $request->_user->getAuthenticatedId() - : $args['author'], - 'if_known')); - $args['count'] = $request->getArg('count'); - $pages->_options['count'] = $args['count']; + $args['sortby'], '' + ); + $caption = fmt("List of pages last edited by [%s] ({total} total):", + WikiLink($args['author'] == '[]' + ? $request->_user->getAuthenticatedId() + : $args['author'], + 'if_known')); + $args['count'] = $request->getArg('count'); + $pages->_options['count'] = $args['count']; } elseif ( !empty($args['creator']) ) { $pages = PageList::allPagesByCreator($args['creator'], $args['include_empty'], $args['sortby'], '' - ); - $caption = fmt("List of pages created by [%s] ({total} total):", - WikiLink($args['creator'] == '[]' - ? $request->_user->getAuthenticatedId() - : $args['creator'], - 'if_known')); - $args['count'] = $request->getArg('count'); - $pages->_options['count'] = $args['count']; + ); + $caption = fmt("List of pages created by [%s] ({total} total):", + WikiLink($args['creator'] == '[]' + ? $request->_user->getAuthenticatedId() + : $args['creator'], + 'if_known')); + $args['count'] = $request->getArg('count'); + $pages->_options['count'] = $args['count']; //} elseif ($pages) { // $args['count'] = count($pages); } else { - if (! $request->getArg('count')) + if (! $request->getArg('count')) $args['count'] = $dbi->numPages($args['include_empty'], $args['exclude']); - else - $args['count'] = $request->getArg('count'); + else + $args['count'] = $request->getArg('count'); } if (empty($args['count']) and !empty($pages)) $args['count'] = count($pages); @@ -132,7 +132,7 @@ extends WikiPlugin if ($pages !== false) $pagelist->addPageList($pages); else - $pagelist->addPages( $dbi->getAllPages($args['include_empty'], $args['sortby'], + $pagelist->addPages( $dbi->getAllPages($args['include_empty'], $args['sortby'], $args['limit']) ); if (defined('DEBUG') && DEBUG && $args['debug']) { return HTML($pagelist, diff --git a/lib/plugin/AllUsers.php b/lib/plugin/AllUsers.php index 68c80186e..c9d8631b6 100644 --- a/lib/plugin/AllUsers.php +++ b/lib/plugin/AllUsers.php @@ -25,9 +25,9 @@ require_once('lib/PageList.php'); /** * Based on AllPages and WikiGroup. * - * We list all users, - * either homepage users (prefs stored in a page), - * users with db prefs and + * We list all users, + * either homepage users (prefs stored in a page), + * users with db prefs and * externally authenticated users with a db users table, if auth_user_exists is defined. */ class WikiPlugin_AllUsers diff --git a/lib/plugin/AnalyseAccessLogSql.php b/lib/plugin/AnalyseAccessLogSql.php index 89ce6801d..a7ba89630 100644 --- a/lib/plugin/AnalyseAccessLogSql.php +++ b/lib/plugin/AnalyseAccessLogSql.php @@ -66,12 +66,12 @@ extends WikiPlugin $query = ''; $backend_type = $request->_dbi->_backend->backendType(); switch ($backend_type) { - case 'mysql': + case 'mysql': $Referring_URL = "left(referer,length(referer)-instr(reverse(referer),'?'))"; break; - case 'pgsql': - case 'postgres7': + case 'pgsql': + case 'postgres7': $Referring_URL = "substr(referer,0,position('?' in referer))"; break; - default: + default: $Referring_URL = "referer"; } switch ($args['mode']) { @@ -101,12 +101,12 @@ extends WikiPlugin if ($where_conditions<>'') $where_conditions = 'WHERE '.$where_conditions.' '; switch ($backend_type) { - case 'mysql': + case 'mysql': $Referring_Domain = "left(referer, if(locate('/', referer, 8) > 0,locate('/', referer, 8) -1, length(referer)))"; break; - case 'pgsql': - case 'postgres7': + case 'pgsql': + case 'postgres7': $Referring_Domain = "substr(referer,0,8) || regexp_replace(substr(referer,8), '/.*', '')"; break; - default: + default: $Referring_Domain = "referer"; break; } $query = "SELECT " @@ -183,13 +183,13 @@ extends WikiPlugin // If PHPSESSID appears in the URI, just display the URI to the left of this $sessname = session_name(); switch ($backend_type) { - case 'mysql': + case 'mysql': $Request_URI = "IF(instr(request_uri, '$sessname')=0, request_uri,left(request_uri, instr(request_uri, '$sessname')-2))"; break; - case 'pgsql': - case 'postgres7': + case 'pgsql': + case 'postgres7': $Request_URI = "regexp_replace(request_uri, '$sessname.*', '')"; break; - default: + default: $Request_URI = 'request_uri'; break; } $now = time(); @@ -239,7 +239,7 @@ extends WikiPlugin return array( 'mode' => 'referring_domains', // referring_domains, referring_urls, remote_hosts, users, host_users, search_bots, search_bots_hits - 'caption' => '', + 'caption' => '', // blank means use the mode as the caption/title for the output 'local_referrers' => 'true', // only show external referring sites 'period' => '', // the type of period to report: @@ -356,19 +356,19 @@ extends WikiPlugin $len = strlen($localhost); $backend_type = $request->_dbi->_backend->backendType(); switch ($backend_type) { - case 'mysql': + case 'mysql': $ref_localhost = "left(referer,$len)<>'$localhost'"; break; - case 'pgsql': - case 'postgres7': + case 'pgsql': + case 'postgres7': $ref_localhost = "substr(referer,0,$len)<>'$localhost'"; break; - default: + default: $ref_localhost = ""; } $where_conditions = $where_conditions.$ref_localhost; } // The assumed contract is that there is a space at the end of the - // conditions string, so that following SQL clauses (such as GROUP BY) + // conditions string, so that following SQL clauses (such as GROUP BY) // will not cause a syntax error if ($where_conditions<>'') $where_conditions = $where_conditions.' '; diff --git a/lib/plugin/AppendText.php b/lib/plugin/AppendText.php index 16df53df1..b5f4548a0 100644 --- a/lib/plugin/AppendText.php +++ b/lib/plugin/AppendText.php @@ -28,7 +28,7 @@ rcs_id('$Id$'); * See http://sourceforge.net/mailarchive/message.php?msg_id=10141823 * why not to use "text" as parameter. Nasty mozilla bug with mult. radio rows. * - * Todo: multiple pages. e.g. AppendText s=~[CategoryINtime~] page= + * Todo: multiple pages. e.g. AppendText s=~[CategoryINtime~] page= */ class WikiPlugin_AppendText extends WikiPlugin @@ -48,7 +48,7 @@ extends WikiPlugin function getDefaultArguments() { return array('page' => '[pagename]', - 'pages' => false, + 'pages' => false, 's' => '', // Text to append. 'before' => '', // Add before (ignores after if defined) 'after' => '', // Add after line beginning with this @@ -65,17 +65,17 @@ extends WikiPlugin function run($dbi, $argstr, &$request, $basepage) { $args = $this->getArgs($argstr, $request); - if (!$args['pages'] or !$request->isPost()) { - return $this->_work($args['page'], $args, $dbi, $request); - } else { - $html = HTML(); - if ($args['page'] != $basepage) - $html->pushContent("pages argument overrides page argument. ignored.",HTML::br()); - foreach ($args['pages'] as $pagename) { - $html->pushContent($this->_work($pagename, $args, $dbi, $request)); - } - return $html; - } + if (!$args['pages'] or !$request->isPost()) { + return $this->_work($args['page'], $args, $dbi, $request); + } else { + $html = HTML(); + if ($args['page'] != $basepage) + $html->pushContent("pages argument overrides page argument. ignored.",HTML::br()); + foreach ($args['pages'] as $pagename) { + $html->pushContent($this->_work($pagename, $args, $dbi, $request)); + } + return $html; + } } function _work($pagename, $args, $dbi, &$request) { @@ -95,7 +95,7 @@ extends WikiPlugin $pagename)); return $message; } - + $current = $page->getCurrentRevision(); $oldtext = $current->getPackedContent(); $text = $args['s']; @@ -104,15 +104,15 @@ extends WikiPlugin if (!empty($args['before'])) { $before = preg_quote($args['before'], "/"); // Insert before - $newtext = preg_match("/\n${before}/", $oldtext) + $newtext = preg_match("/\n${before}/", $oldtext) ? preg_replace("/(\n${before})/", "\n" . preg_quote($text, "/") . "\\1", - $oldtext) + $oldtext) : $this->_fallback($text, $oldtext, $args['before'], $message); } elseif (!empty($args['after'])) { // Insert after $after = preg_quote($args['after'], "/"); - $newtext = preg_match("/\n${after}/", $oldtext) + $newtext = preg_match("/\n${after}/", $oldtext) ? preg_replace("/(\n${after})/", "\\1\n" . preg_quote($text, "/"), $oldtext) @@ -129,19 +129,19 @@ extends WikiPlugin if ($page->save($newtext, $current->getVersion() + 1, $meta)) { $message->pushContent(_("Page successfully updated."), HTML::br()); } - + // AppendText has been called from the same page that got modified // so we directly show the page. if ( $request->getArg($pagename) == $pagename ) { - // TODO: Just invalidate the cache, if AppendText didn't + // TODO: Just invalidate the cache, if AppendText didn't // change anything before. - // + // return $request->redirect(WikiURL($pagename, false, 'absurl'), false); // The user asked to be redirected to the modified page } elseif ($args['redirect']) { return $request->redirect(WikiURL($pagename, false, 'absurl'), false); - + } else { $link = HTML::em(WikiLink($pagename)); $message->pushContent(HTML::Raw(sprintf(_("Go to %s."), $link->asXml()))); diff --git a/lib/plugin/AsciiMath.php b/lib/plugin/AsciiMath.php index 4e1c4634f..781dfc2f7 100644 --- a/lib/plugin/AsciiMath.php +++ b/lib/plugin/AsciiMath.php @@ -27,19 +27,19 @@ if (phpversion() >= '5') { require_once("lib/ASCIIMathPHP/ASCIIMathPHP.class.php"); } -/** +/** * Render ASCII math as MathML * Requires ENABLE_XHTML_XML = true * See http://www.jcphysics.com/ASCIIMath/ * Syntax: http://www1.chapman.edu/~jipsen/mathml/asciimathsyntax.xml * Example: "int_-1^1 sqrt(1-x^2)dx = pi/2" * => - -11 - 1-x2 - d - x - = - π2 + -11 + 1-x2 + d + x + = + π2 */ class WikiPlugin_AsciiMath diff --git a/lib/plugin/AsciiSVG.php b/lib/plugin/AsciiSVG.php index 8821763bd..07a37e77d 100644 --- a/lib/plugin/AsciiSVG.php +++ b/lib/plugin/AsciiSVG.php @@ -44,8 +44,8 @@ extends WikiPlugin function getDefaultArguments() { return array('width' => 200, 'height' => 200, - 'script' => false, // one line script. not very likely - 'onmousemove' => false + 'script' => false, // one line script. not very likely + 'onmousemove' => false ); } function handle_plugin_args_cruft(&$argstr, &$args) { @@ -67,21 +67,21 @@ extends WikiPlugin $html->pushContent($js); $WikiTheme->_asciiSVG = 1; // prevent duplicates } - // extract