SF.net SVN: phpwiki:[11025] trunk/themes

vargenau--- via phpwiki-checkins <[email protected]> Tue, 19 Apr 2022 14:53:47 +0000
Newsgroups gmane.comp.web.wiki.phpwiki.checkins
Message-ID <[email protected]>
Revision: 11025
          http://sourceforge.net/p/phpwiki/code/11025
Author:   vargenau
Date:     2022-04-19 14:53:46 +0000 (Tue, 19 Apr 2022)
Log Message:
-----------
Whitespace, braces

Modified Paths:
--------------
    trunk/themes/Crao/templates/htmldump.tmpl
    trunk/themes/Portland/templates/viewsource.tmpl
    trunk/themes/Sidebar/templates/dump-footer.tmpl
    trunk/themes/Sidebar/templates/top.tmpl
    trunk/themes/Wordpress/templates/viewsource.tmpl
    trunk/themes/blog/templates/browse-footer.tmpl
    trunk/themes/blog/templates/calendar.tmpl
    trunk/themes/blog/templates/sidebar.tmpl
    trunk/themes/default/templates/addcomment.tmpl
    trunk/themes/default/templates/comment.tmpl
    trunk/themes/default/templates/htmldump.tmpl
    trunk/themes/default/templates/login.tmpl
    trunk/themes/default/templates/online.tmpl
    trunk/themes/default/templates/pagelink.tmpl
    trunk/themes/default/templates/userprefs.tmpl
    trunk/themes/default/templates/wikiblog.tmpl
    trunk/themes/default/templates/wikiforum.tmpl
    trunk/themes/fusionforge/templates/userprefs.tmpl

Modified: trunk/themes/Crao/templates/htmldump.tmpl
===================================================================
--- trunk/themes/Crao/templates/htmldump.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/Crao/templates/htmldump.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -25,10 +25,11 @@
 <?php echo $WikiTheme->getCSS() ?>
 <?php
   // avoid redundant bookmark title for custom home page
-  if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
+  if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME) {
       $pagetitle = "";
-  else
+  } else {
       $pagetitle = " - ". AsString($TITLE);
+  }
 ?>
 <title><?php echo WIKI_NAME.$pagetitle?></title>
 </head>

Modified: trunk/themes/Portland/templates/viewsource.tmpl
===================================================================
--- trunk/themes/Portland/templates/viewsource.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/Portland/templates/viewsource.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -6,6 +6,6 @@
 ><?php echo $PAGE_SOURCE ?>
 </textarea>
 <hr />
-<a href="<?php echo WikiURL($page,array('action'=>_("PageHistory")))?>">
+<a href="<?php echo WikiURL($page, array('action'=>_("PageHistory")))?>">
 <?php echo $WikiTheme->getLastModifiedMessage($revision) ?></a>
 <br />

Modified: trunk/themes/Sidebar/templates/dump-footer.tmpl
===================================================================
--- trunk/themes/Sidebar/templates/dump-footer.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/Sidebar/templates/dump-footer.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,5 +1,7 @@
 <?php
-  if (empty($revision)) $revision = $page->getCurrentRevision();
+  if (empty($revision)) {
+      $revision = $page->getCurrentRevision();
+  }
 ?>
 <hr class="printer" />
 <div class="clear-floats"></div>

Modified: trunk/themes/Sidebar/templates/top.tmpl
===================================================================
--- trunk/themes/Sidebar/templates/top.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/Sidebar/templates/top.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,15 +1,17 @@
 <?php
 $pagename = $page->getName();
 $isActionPage = isActionPage($pagename);
-if (ENABLE_PAGE_PUBLIC)
+if (ENABLE_PAGE_PUBLIC) {
     $public = $page->get('public');
-else
+} else {
     $public = false;
+}
 if (ENABLE_RATEIT && !empty($user) && $user->isAuthenticated()
- && $page->exists() && !$isActionPage && !$WikiTheme->DUMP_MODE)
+ && $page->exists() && !$isActionPage && !$WikiTheme->DUMP_MODE) {
     $rating = 1;
-else
+} else {
     $rating = 0;
+}
 ?>
 <?php // Page title ?>
 <a id="contentTop"></a>

Modified: trunk/themes/Wordpress/templates/viewsource.tmpl
===================================================================
--- trunk/themes/Wordpress/templates/viewsource.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/Wordpress/templates/viewsource.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -7,7 +7,7 @@
 ><?php echo $PAGE_SOURCE ?>
 </textarea>
 <hr />
-<a href="<?php echo WikiURL($page,array('action'=>_("PageHistory")))?>">
+<a href="<?php echo WikiURL($page, array('action'=>_("PageHistory")))?>">
 <?php echo $WikiTheme->getLastModifiedMessage($revision) ?></a>
 <br />
 </div>

Modified: trunk/themes/blog/templates/browse-footer.tmpl
===================================================================
--- trunk/themes/blog/templates/browse-footer.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/blog/templates/browse-footer.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,6 +1,6 @@
 <footer role="contentinfo">
 <p class="editdate">
-<?php if( $page->getName() != _("HomePage")) { ?>
+<?php if ($page->getName() != _("HomePage")) { ?>
 <?php echo $WikiTheme->getOwnerMessage($page) ?>  <?php echo $WikiTheme->getLastModifiedMessage($revision) ?> <?php echo $WikiTheme->getAuthorMessage($revision) ?><br />
 <?php } ?>
 This site is powered by <a href="https://sourceforge.net/projects/phpwiki/">PhpWiki</a>. Page design based on Kubrick,<br />adapted by <a href="https://the.taoofmac.com">Rui Carmo</a> from an original design by <a href="https://binarybonsai.com">Michael Heilemann</a>.</p>

Modified: trunk/themes/blog/templates/calendar.tmpl
===================================================================
--- trunk/themes/blog/templates/calendar.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/blog/templates/calendar.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -7,7 +7,7 @@
       var d = calendar.date.getDate();      // integer, 1..31
       m = m < 10 ? "0" + m : m;
       d = d < 10 ? "0" + d : d;
-      window.location = "' . WikiURL($WikiTheme->calendarBase(),0,1) . '/' . '" + y + "-" + m + "-" + d;
+      window.location = "' . WikiURL($WikiTheme->calendarBase(), 0, 1) . '/' . '" + y + "-" + m + "-" + d;
     }
 };
 Calendar.setup({flat : "calendar", flatCallback : dateChanged, setDateStatusFunc : dateStatusFunc, weekNumbers : false})') ?>

Modified: trunk/themes/blog/templates/sidebar.tmpl
===================================================================
--- trunk/themes/blog/templates/sidebar.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/blog/templates/sidebar.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -22,8 +22,9 @@
 
 $box = new RelatedLinksBox();
 $body = $box->body;
-if ($body->asString() != "")
+if ($body->asString() != "") {
     printXml($box->format());
+}
 
 $box = new PluginSidebarBox("RecentChanges");
 printXml($box->format());

Modified: trunk/themes/default/templates/addcomment.tmpl
===================================================================
--- trunk/themes/default/templates/addcomment.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/addcomment.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,5 +1,5 @@
 <?php
-  $request->setArg('action',false);
+  $request->setArg('action', false);
 ?>
 <div class="wikicomment wikicomment-form">
 <?php if (!$WikiTheme->DUMP_MODE) { ?>

Modified: trunk/themes/default/templates/comment.tmpl
===================================================================
--- trunk/themes/default/templates/comment.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/comment.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -5,8 +5,9 @@
 if ($user->isAdmin() or $user->getId() == $COMMENT_CREATOR) {
     $buttons = HTML::small(array('class' => 'floatleft'),
                            Button('edit', false, $page));
-    if ($user->isAdmin())
+    if ($user->isAdmin()) {
         $buttons->pushContent($SEP, Button('remove', _("Remove Comment"), $page));
+    }
 }
 
 // This is a hack, but since we only have a fake PageRevision,

Modified: trunk/themes/default/templates/htmldump.tmpl
===================================================================
--- trunk/themes/default/templates/htmldump.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/htmldump.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -37,10 +37,11 @@
 <?php echo $WikiTheme->getCSS() ?>
 <?php
   // avoid redundant bookmark title for custom home page
-  if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME)
+  if ($page->getName() == WIKI_NAME && HOME_PAGE == WIKI_NAME) {
       $pagetitle = "";
-  else
+  } else {
       $pagetitle = " - ". AsString($TITLE);
+  }
 ?>
 <title><?php echo WIKI_NAME.$pagetitle?></title>
 </head>

Modified: trunk/themes/default/templates/login.tmpl
===================================================================
--- trunk/themes/default/templates/login.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/login.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -7,9 +7,9 @@
 <?php
 $dbh = $request->getDbh();
 if (ISREADONLY) {
-  echo asXML(HTML::p(array('class' => 'warning_msg'), _("System is locked as read-only for maintenance")));
+    echo asXML(HTML::p(array('class' => 'warning_msg'), _("System is locked as read-only for maintenance")));
 } elseif ($dbh->readonly) {
-  echo asXML(HTML::p(array('class' => 'warning_msg'), _("Database is locked as read-only for maintenance")));
+    echo asXML(HTML::p(array('class' => 'warning_msg'), _("Database is locked as read-only for maintenance")));
 }
 
 if (DEBUG & _DEBUG_LOGIN) {

Modified: trunk/themes/default/templates/online.tmpl
===================================================================
--- trunk/themes/default/templates/online.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/online.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -4,22 +4,23 @@
 // We have two modes: 1. a simple "summary" block, and
 // 2. "detail" with a table of online users, date and current actions
 $header = _("Who is Online");
-if ($MAX_ONLINE_TIME and $MAX_ONLINE_NUM)
-  $MAX_ONLINE_TIME = $WikiTheme->formatDateTime($MAX_ONLINE_TIME);
+if ($MAX_ONLINE_TIME and $MAX_ONLINE_NUM) {
+    $MAX_ONLINE_TIME = $WikiTheme->formatDateTime($MAX_ONLINE_TIME);
+}
 ?>
 
 <?php if ($mode == 'summary') {
     if ($allow_detail) {
-      $url = WikiURL($pagename,array("mode"=>"detail"));
-      $header = HTML::a(array('href'=>$url,'title'=>_("Switch to detailed list")),_("Who is Online"));
+        $url = WikiURL($pagename, array("mode"=>"detail"));
+        $header = HTML::a(array('href'=>$url,'title'=>_("Switch to detailed list")), _("Who is Online"));
     }
 ?>
 <table class="forumline fullwidth">
   <tr><td class="cat" colspan="2"><?php echo $header ?></td></tr>
   <tr><td class="row1" rowspan="3"><?php echo $ONLINE_ICON ?></td>
-      <td class="row1 gensmall"><?php echo fmt("Our users created a total of %d pages.",$NUM_PAGES) ?><br />
-      <?php echo fmt("We have a total of %d registered users.",$NUM_USERS) ?><br />
-          <?php echo $NEWEST_USER ? fmt("The newest registered user is %s.",$NEWEST_USER) : ''?>
+      <td class="row1 gensmall"><?php echo fmt("Our users created a total of %d pages.", $NUM_PAGES) ?><br />
+      <?php echo fmt("We have a total of %d registered users.", $NUM_USERS) ?><br />
+          <?php echo $NEWEST_USER ? fmt("The newest registered user is %s.", $NEWEST_USER) : ''?>
           </td></tr>
   <?php if ($SESSDATA_BOOL) { ?>
   <tr><td class="row1 gensmall">
@@ -30,11 +31,14 @@
 <?php
     $s='';
     foreach ($REGISTERED as $user) {
-      $link = WikiLink($user['name']);
-      $s .= $link->asXML() . ", ";
+        $link = WikiLink($user['name']);
+        $s .= $link->asXML() . ", ";
     }
-    if (!count($REGISTERED)) echo(htmlentities(_("None")));
-    else echo(substr($s,0,-2));
+    if (!count($REGISTERED)) {
+        echo(htmlentities(_("None")));
+    } else {
+        echo(substr($s, 0, -2));
+    }
 ?>
 <?php if (!empty($ADMINS) and $dispose_admin) { ?>
     <br />
@@ -42,7 +46,7 @@
 <?php } ?>
   </td></tr>
   <tr><td class="row1 gensmall">
-    <?php echo fmt("This data is based on users active over the past %s.",$SESSION_TIME) ?><br />
+    <?php echo fmt("This data is based on users active over the past %s.", $SESSION_TIME) ?><br />
     </td></tr>
   <?php } else { ?>
   <tr><td class="row1 gensmall"><br />
@@ -53,8 +57,8 @@
 <?php } ?>
 
 <?php if ($mode == 'detail') {
-    $url = WikiURL($pagename,array("mode"=>"summary"));
-    $header = HTML::a(array('href'=>$url,'title'=>_("Switch to summary")),_("Who is Online"));
+    $url = WikiURL($pagename, array("mode"=>"summary"));
+    $header = HTML::a(array('href'=>$url,'title'=>_("Switch to summary")), _("Who is Online"));
 ?>
 <table class="forumline fullwidth">
   <tr><td class="cat" colspan="3"><?php echo $header ?></td></tr>

Modified: trunk/themes/default/templates/pagelink.tmpl
===================================================================
--- trunk/themes/default/templates/pagelink.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/pagelink.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -7,8 +7,8 @@
  * More ideas: FIRST, LAST, ...
  */
 if ($WikiTheme->DUMP_MODE) {
-  $PREV = false;
-  $NEXT = false;
+    $PREV = false;
+    $NEXT = false;
 }
 ?>
 <tr><td style="width:100%" colspan="<?php echo $COLS ?>"><table class="fullwidth wikipaging"><tr class="wikipaging">

Modified: trunk/themes/default/templates/userprefs.tmpl
===================================================================
--- trunk/themes/default/templates/userprefs.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/userprefs.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,5 +1,7 @@
 <?php
-if (empty($errmsg)) $errmsg = '';
+if (empty($errmsg)) {
+    $errmsg = '';
+}
 
 $plugin = $request->getArg('pagename');
 $time = time();
@@ -7,8 +9,9 @@
 $pref = $request->_prefs;
 $num = $request->getArg('num');
 
-if (!$pref) return;
-
+if (!$pref) {
+    return;
+}
 $offset = $pref->get('timeOffset');
 $serverTime = $time - $offset * 3600;
 $timeOffsetInput = HTML::input(array('type' => "text",
@@ -49,12 +52,12 @@
                                      'value' => '1',
                                      'checked' => (bool) $pref->get('doubleClickEdit')));
 if (!function_exists('selectedOption')) {
-  function selectedOption ($value, $label = false) {
-    return HTML::option(array('value' => $value,'selected'=>"selected"), ($label ? $label : $value) . "\n");
-  }
-  function unselectedOption ($value, $label = false) {
-    return HTML::option(array('value' => $value), ($label ? $label : $value) . "\n");
-  }
+    function selectedOption($value, $label = false) {
+        return HTML::option(array('value' => $value,'selected'=>"selected"), ($label ? $label : $value) . "\n");
+    }
+    function unselectedOption($value, $label = false) {
+        return HTML::option(array('value' => $value), ($label ? $label : $value) . "\n");
+    }
 }
 
 $SelectThemes = ''; $SelectLanguages = '';
@@ -62,9 +65,9 @@
 $SelectOptions = HTML();
 if (!empty($available_themes) and is_array($available_themes)) {
     if (!$pref->get('theme') or $pref->get('theme') == THEME) {
-        $SelectOptions->pushContent(selectedOption("",_("<system theme>")));
+        $SelectOptions->pushContent(selectedOption("", _("<system theme>")));
     } else {
-        $SelectOptions->pushContent(unselectedOption("",_("<system theme>")));
+        $SelectOptions->pushContent(unselectedOption("", _("<system theme>")));
     }
     foreach ($available_themes as $theme) {
         if ($theme == $pref->get('theme') and $theme != THEME) {
@@ -80,9 +83,9 @@
 $SelectOptions = HTML();
 if (!empty($available_languages) and is_array($available_languages)) {
     if (!$pref->get('lang') or $pref->get('lang') == DEFAULT_LANGUAGE) {
-        $SelectOptions->pushContent(selectedOption("",_("<system language>")));
+        $SelectOptions->pushContent(selectedOption("", _("<system language>")));
     } else {
-        $SelectOptions->pushContent(unselectedOption("",_("<system language>")));
+        $SelectOptions->pushContent(unselectedOption("", _("<system language>")));
     }
     foreach ($available_languages as $lang) {
         if ($lang == $pref->get('lang') and $lang != DEFAULT_LANGUAGE) {

Modified: trunk/themes/default/templates/wikiblog.tmpl
===================================================================
--- trunk/themes/default/templates/wikiblog.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/wikiblog.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,7 +1,9 @@
 <?php
 $CDATE = $WikiTheme->formatDateTime($BLOG_CTIME);
 $buttons = $modified = '';
-if (empty($SEP)) $SEP = ' - ';
+if (empty($SEP)) {
+    $SEP = ' - ';
+}
 
 if ($user->isAdmin() or $user->getId() == $BLOG_CREATOR) {
     $buttons = HTML::small(array('class' => 'floatleft'),

Modified: trunk/themes/default/templates/wikiforum.tmpl
===================================================================
--- trunk/themes/default/templates/wikiforum.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/default/templates/wikiforum.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -24,7 +24,7 @@
       <td class="align-left"><?php echo WikiLink($FORUM_CREATOR, 'if_known')?></td>
       <td>
         <table class="wikiforum wikiforum-message">
-          <tr><td class="align-left"><?php echo fmt("Posted: %s",$CDATE)?></td>
+          <tr><td class="align-left"><?php echo fmt("Posted: %s", $CDATE)?></td>
               <td class="align-right"><?php echo _("Reply")?></td></tr>
           <tr><td><?php echo $CONTENT ?></td></tr>
         </table>

Modified: trunk/themes/fusionforge/templates/userprefs.tmpl
===================================================================
--- trunk/themes/fusionforge/templates/userprefs.tmpl	2022-04-19 14:43:35 UTC (rev 11024)
+++ trunk/themes/fusionforge/templates/userprefs.tmpl	2022-04-19 14:53:46 UTC (rev 11025)
@@ -1,19 +1,23 @@
 <?php
 // Todo: Move the logic and code to the plugin
 // This is very experimental and the read-only part an ugly hack so far.
-foreach (explode(',','errmsg,isForm') as $var) {
-    if (empty($$var)) $$var = false;
+foreach (explode(',', 'errmsg,isForm') as $var) {
+    if (empty($$var)) {
+        $$var = false;
+    }
 }
 
 $plugin = $request->getArg('pagename');
 $time = time();
-$user =& $request->getUser();
-$pref =& $request->_prefs;
+$user = $request->getUser();
+$pref = $request->_prefs;
 
-if (!$pref) return;
+if (!$pref) {
+    return;
+}
 $offset = $pref->get('timeOffset');
 $serverTime = $time - $offset * 3600;
-if ($isForm)
+if ($isForm) {
     $timeOffsetInput = HTML::input(array('type' => "text",
                                          'id' => 'timeOffsetInput',
                                          'size' => 6,
@@ -21,8 +25,9 @@
                                          'name' => "pref[timeOffset]",
                                          'class' => "numeric",
                                          'value' => $offset));
-else
+} else {
     $timeOffsetInput = $pref->get('timeOffset');
+}
 
 $OwnModificationsCB = HTML::input(array('type' => 'checkbox',
                                      'id' => 'ownModifications',

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.