gnucash-htdocs beta: Do not expose disabled code snippets

Frank H.Ellenberger fell at code.gnucash.org
Mon Oct 12 17:38:01 EDT 2020


Updated	 via  https://github.com/Gnucash/gnucash-htdocs/commit/42dad04f (commit)
	from  https://github.com/Gnucash/gnucash-htdocs/commit/d12e8fd4 (commit)



commit 42dad04f4ad425eeeeec02a6dd439a515bb22107
Author: Frank H. Ellenberger <frank.h.ellenberger at gmail.com>
Date:   Mon Oct 12 23:37:21 2020 +0200

    Do not expose disabled code snippets

diff --git a/externals/header.phtml b/externals/header.phtml
index 08904cc..a67be80 100644
--- a/externals/header.phtml
+++ b/externals/header.phtml
@@ -41,15 +41,15 @@
 
 <html prefix="og: https://ogp.me/ns#" lang="<?=$locale_str?>">
   <head>
-    <!-- Primary Meta Tags -->
-<?php
+<?php // Primary Meta Tags
       if (!isset($can_utf)) { $can_utf = true; }
       if ($can_utf)
-    { ?>
+      { ?>
     <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+<?php } //if ($can_utf) ?>
 
-    <!-- Useful for mobile devices: Zoom out and allow scaling. -->
-    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
+    <title><?=$full_title?></title>
+    <meta name="description" content="<?=strip_tags($description)?>"/>
 
     <!--meta properties for facebook Open Graph-->
     <meta property="og:locale" content="<?=$locale_str?>"/>
@@ -65,12 +65,14 @@
     <meta property="og:image" content="<?=$default_url."externals/logo_w120.png"?>"/>
     <meta property="og:site_name" content="GnuCash"/>
     <meta property="og:description" content="<?=strip_tags($description)?>"/>
-    <!--end of Open Graph properties-->
+<?php // end of Open Graph properties ?>
 
-<?php } //if ($can_utf) ?>
     <link rel="stylesheet" href="<?=$home?>/externals/gnucash.css" type="text/css" />
 
-    <!-- FavIcons for many different devices -->
+<?php // Device specific:
+      // Useful for mobile devices: Zoom out and allow scaling. ?>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/>
+<?php // FavIcons for many different devices ?>
     <link rel="icon" href="<?=$home?>/favicon.ico" type="image/x-icon" />
     <link rel="apple-touch-icon" sizes="180x180" href="<?=$home?>/apple-touch-icon.png?v=gAXA7A9nAq"/>
     <link rel="icon" type="image/png" sizes="32x32" href="<?=$home?>/favicon-32x32.png?v=gAXA7A9nAq"/>
@@ -81,32 +83,26 @@
     <meta name="msapplication-TileColor" content="#da532c"/>
     <meta name="theme-color" content="#ffffff"/>
 
-    <?php
-      $current_page = array_key_exists('HTTP_HOST', $_SERVER) ? ($top_dir . "/" . basename($_SERVER["SCRIPT_NAME"])) : "";
-      
-      if (isset($homepage)) { ?>
-        <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="<?=$home?>/atom.php" />
-    <?php } ?>
-
-    <title><?=$full_title?></title>
-    <meta name="description" content="<?=strip_tags($description)?>"/>
+<?php
+  $current_page = array_key_exists('HTTP_HOST', $_SERVER) ? ($top_dir . "/" . basename($_SERVER["SCRIPT_NAME"])) : "";
+  
+  if (isset($homepage)) { ?>
+    <link rel="alternate" type="application/atom+xml" title="Atom Feed" href="<?=$home?>/atom.php" />
+<?php } ?>
   </head>
 
   <body>
-
     <div id="head">
-
       <div id="branding">
         <p><img src="<?=$top_dir?>/images/gnucash-vert.png" alt="GnuCash" /></p>
       </div>
-  
+
+<?php /* FIXME: It does not conform to
+         https://curia.europa.eu/jcms/upload/docs/application/pdf/2019-07/cp190099en.pdf
+         potential fix: an improved version of
+         https://www.heise.de/ct/ausgabe/2014-26-Social-Media-Buttons-datenschutzkonform-nutzen-2463330.html
       <div id="socialbuttons">
-  
         <!--facebook like button-->
-        <!-- FIXME: It does not conform to
-           https://curia.europa.eu/jcms/upload/docs/application/pdf/2019-07/cp190099en.pdf
-           potential fix: an improve version of
-           https://www.heise.de/ct/ausgabe/2014-26-Social-Media-Buttons-datenschutzkonform-nutzen-2463330.html
         <div style="padding:0 0 5px 0">
           <div id="fb-root"></div>
           <script type="text/javascript">
@@ -123,9 +119,9 @@
                data-send="false" data-layout="box_count" data-width="60"
                data-show-faces="true" data-font="verdana">
           </div>
-        </div> End of FIXME --> <!-- facebook like button-->
+        </div> <!-- facebook like button-->
       </div> <!-- socialbuttons -->
-
+*/ ?>
       <!-- the icons on the top right-->
       <div style="float:right;">
         <ul id="navlist">
@@ -160,10 +156,10 @@
         | <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "zh_CN"); ?>">简体中文</a>
         | <a class="nav" href="<?= make_lang_href($current_page, $get_parms, "zh_TW"); ?>">繁體中文</a>
       </span> <!-- language -->
-      <span id="location">  <!-- The mirrors currently not exist
+      <span id="location">  <?php /* The mirrors currently not exist
          <?= _("Continent"); ?>:
          (<a class="nav" href="https://www.gnucash.org/">US</a>)
          (<a class="nav" href="http://www.at.gnucash.org/">EU</a>) 
-         (<a class="nav" href="http://www.au.gnucash.org/">AU</a>) -->
+         (<a class="nav" href="http://www.au.gnucash.org/">AU</a>)  */ ?>
       </span> <!-- Continent -->
     </div> <!-- head -->
diff --git a/externals/menu.phtml b/externals/menu.phtml
index 91c4667..63d94aa 100644
--- a/externals/menu.phtml
+++ b/externals/menu.phtml
@@ -8,10 +8,10 @@
       <ul>
         <li><a href="<?=$home?>/index.phtml"><?= T_("Home")?></a></li>
         <li><a href="<?=$home?>/news.phtml"><?= T_("News")?></a></li>    
-        <!--RSS atom feed link is on the top-right of the page
+<?PHP /* RSS atom feed link is now on the top-right of the header
           <li><a href="<?=$home?>/atom.php">
             <img src="<?=$home?>/images/icons/feed-icon-12x12.png" width="12" height="12" alt="[atom feed]" /> <?= T_("News Feed")?></a></li>
-        -->
+      */ ?>
         <li><a href="<?=$home?>/features.phtml"><?=T_("Screenshots, Features")?></a></li>
         <li><a href="https://wiki.gnucash.org/wiki/Installation"><?=T_("Installation")?></a></li>
         <li><a href="https://wiki.gnucash.org/wiki/Getting_Help"><?= T_("Getting help")?></a></li>
@@ -19,7 +19,6 @@
       </ul>
     </div>
     <div class="othernews">
-      <!-- ?php include("$top_dir/externals/menu-downloads.phtml");? -->
       <span class="linktop">
         <b><?=T_("Downloads")?></b>
       </span>
@@ -36,11 +35,13 @@
           <li><a href="https://wiki.gnucash.org/wiki/FAQ"><?=T_("FAQ")?></a></li>
           <li><a href="https://wiki.gnucash.org/wiki/"><?=T_("Wiki")?></a> <a href="https://wiki.gnucash.org/wiki/De/GnuCash">[de]</a></li>
           <li><a href="https://wiki.gnucash.org/wiki/Mailing_Lists"><?=T_("Mailing Lists")?></a></li>
-    <!--      <li style="list-style-image:none;list-style-type:none;">
+<?PHP /* http://www.namazu.org/ made the last release 2011-07-18
+          <li style="list-style-image:none;list-style-type:none;">
             <ul style="padding-bottom:0px;  margin-top:0px; margin-bottom:5px;">
-            <li><a href="https://lists.gnucash.org/search/<? if ($locale != "") { echo "?lang=$locale"; } ?>"><?=T_("Search")?></a></li>
+              <li><a href="https://lists.gnucash.org/search/<? if ($locale != "") { echo "?lang=$locale"; } ?>"><?=T_("Search")?></a></li>
             </ul>
-          </li>-->
+          </li>
+      */ ?>
           <li><a href="https://wiki.gnucash.org/wiki/Bugzilla"><?=T_("Bug Reports")?></a></li>
           <li><a href="https://wiki.gnucash.org/wiki/IRC"><?=T_("IRC (Chat)")?></a></li>
         </ul>



Summary of changes:
 externals/header.phtml | 54 +++++++++++++++++++++++---------------------------
 externals/menu.phtml   | 13 ++++++------
 2 files changed, 32 insertions(+), 35 deletions(-)



More information about the gnucash-changes mailing list