bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PHP4: embeded html not handled properly


From: Patrick Strasser
Subject: PHP4: embeded html not handled properly
Date: Mon, 18 Jul 2005 13:34:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050602 Thunderbird/1.0.2 Mnenhy/0.7.2.0

Hello!

<praise, honestly>
I'm a great fan of global for it's really convenient way of browsing code. Now together with doxygen, it's even better. I just noticed the PHP4-support and was really hyppy, as finding some source tagging system for php is quite diffcult.
</praise>
Today I fetched global 4.8.6, built is (wow, that was fast) and let it run:

htags -t "MGA Webshop" -afFngosx

The result looked quite nice.
BUT:
I was realy dirsturbed when I saw that some lines (option -n) were not handled in a sane way. I got output like:

----htags-produced-----

  31 <? include ("head.inc");?>
  32
  33
  34
  35
  36   37     38       41     42
  43
  44     45
  46       49
  50
  51       79
  80
  81       83
  84
  85      148
 149
 150
 151        154
 155
 156      157
 158     <? include ("footer.inc"); ?>

----end htags-produced-----

The original code looks like: ($ less -N index.php)

----original code----

31 <? include ("head.inc");?>
32
33
34 <body topmargin="0" leftmargin="0" marginwidth="0" marginheight="0 34 " rightmargin="0" bgcolor="#FFFFFF">
35
36 <table class="all" border="0" cellpadding="0" cellspacing="0" ><!- 36 - width="778" style="border-top: 20px solid #0065A9" -->
37   <tr>
38     <td class="ramen" colspan="5"> <!-- Ramen oben -->
39     &nbsp;
40     </td><!-- /Ramen oben -->
41   </tr>
42
43   <!-- Alles -->
44   <tr>
45
46     <td class="ramen" height="20px"> <!-- Ramen links -->
47
48     </td><!-- /Ramen links -->
49
50   <!-- Left part -->
51 <td class="leftpart" width="520" valign="top" style="backgroun 51 d: #EBEBEB; " height="100%">
52 0%"><!--  border="0" cellspacing="0" cellpadding="0" -->
53         <tr>
54           <td class="header_shop ">
55             <? include ('header-shop.inc') ?>
56           </td>
57         </tr>
58         <tr>
59 <td height="100%" class="">
60   <table border="0" cellpadding="0" cellspacing="0" height
60 ="100%" >
61<tr>
62  <td width=500 height="100%" class="artikel" style="v
62 ertical-align: top; border-right: 1px solid #3B404B" valign="top">&n
62 bsp;
63    <?php
64    //printr($_SESSION);
65    require_once('selector.php');
66    show_left_content();
67    flush();
68    $DEBUG=true;
69    $DEBUG=false;
70    ?> 71 </td>
72</tr>
73   </table>
74
75 </td> <!-- /leftcontent -->
76    </tr>
77  </table>
78</td>
79 <!-- /Left part -->
80
81<td height="100%" class="ramen"> <!-- Ramen mitte -->
82</td><!-- /Ramen mitte -->
83
84  <!-- Right part -->
85<td class="rightpart">
86
87  <? include ('logo.inc'); ?>
88
89  <? include ('trennbalken.inc'); ?>
90
91  <table width="100%" border="0" align="center" cellpadding="0"
91 cellspacing="0">
92    <tr>
93 <td colspan="2" style="padding-bottom:8px; padding-left:11
93 px; padding-top:10px; padding-right: 8px;" class="login">
94   <div style="text-align:right;">
95<?php
96  require_once ("utils.php");
97  require_once ('login.php');
98  print_login_state();
99?>
100   </div>
101 </td>
102</tr>
103  </table>
104  <?  // ADMIN
105 if (isset($_SESSION["creds"]) && $_SESSION["creds"]->is_set("ad
105 min")) {
106include ('trennbalken.inc'); ?>
107 <div style="margin:6px; text-align: right;" >
108   <a href="<?= dirname($_SERVER["PHP_SELF"])."/admin?>">
108 Admin</a><br>
109   <!-- Aktion -->
110 </div>
111
112 <? } // /ADMIN ?>
113  <? include ('trennbalken.inc'); ?>
114<div style="margin:6px; text-align: right;" >
115 <a href="?action=search">Artikel suchen</a><br>
116 <!-- Aktion -->
117</div>
118  <? include ('trennbalken.inc'); ?>
119
120  <?php
121  //}
122  ?>
123  <table width="100%" border="0" align="center" cellpadding="0"
123 cellspacing="0">
124<tr>
125 <td colspan="2" style="padding-bottom:8px; padding-left:11
125 px; padding-top:10px;">
126 <?php
127   /*
128   require_once('vendor.php');
129   vendor_selector();
130   */
131   require_once ("list.php");
132   show_tree();
133   ?>
134 </td>
135</tr>
136  </table>
137
138  <? include ('trennbalken.inc'); ?>
139
140  <? include ('agb.inc'); ?>
141
142  <? include ('trennbalken.inc'); ?>
143
144  <? include ('kontakt.inc'); ?>
145
146  <!-- /Content -->
147  </td>
148<!-- /Right part -->
149
150  <!-- Right border -->
151  <td style="border-right:1px solid #3B404B; background:#0065A9;
151 ">
152<img src="../images/pixel/nix.gif" width="3" height="1" alt=
152 ""><br>
153  </td>
154  <!-- /Right border -->
155
156</tr>
157
158<? include ("footer.inc"); ?>

----end original code----

There seems to be definitely be missing something...

This behaviour renders PHP-usage of global useless for me, as (like most people) I use php to spit out some html code. It is integral part of the application.

Patrick
--
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at  tugraz dot at>
Student of Telematik, Techn. University Graz, Austria




reply via email to

[Prev in Thread] Current Thread [Next in Thread]