Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Wrong HTML code line when comments are disabled  (Read 2501 times)

patrice

  • Newbie
  • *
  • Karma: 8
  • Posts: 6
Wrong HTML code line when comments are disabled
« on: September 11, 2007, 07:38:10 pm »

Hi,
If comments have been disabled, when an article is edited once again, the source code of the Web page includes an HTML code line that doesn't correctly ends:
Code: [Select]
<input name="freeze" type="checkbox" id="fc"Tag '/>' lacks.
This bug is minor as it doesn't impact the editing.
Patrice
Logged
This message was sent from a PC laptop powered by GNU / Linux (distribution Ubuntu).

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Wrong HTML code line when comments are disabled
« Reply #1 on: September 12, 2007, 09:23:43 am »

yup...
will make fixe post, but for now, locate in form_articles() quite close to the bottom of that function

Code: [Select]
if (!empty($id)) {
echo '<p><input name="freeze" type="checkbox" id="fc"';
if ($r['commentable'] == 'FREEZ') {echo ' checked="checked" />';}
else if ($r['commentable'] == 'YES') {echo ' />';}
echo ' <label for="fc"> '.l('freeze_comments').'</label></p>';
}
and add an else line.
Code: [Select]
if (!empty($id)) {
echo '<p><input name="freeze" type="checkbox" id="fc"';
if ($r['commentable'] == 'FREEZ') {echo ' checked="checked" />';}
else if ($r['commentable'] == 'YES') {echo ' />';}
/*fixed*/ else{echo ' />';}
echo ' <label for="fc"> '.l('freeze_comments').'</label></p>';
}

« Last Edit: September 12, 2007, 09:26:19 am by philmoz »
Logged
Of all the things I have lost, it is my mind that I miss the most.

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
Re: Wrong HTML code line when comments are disabled
« Reply #2 on: September 13, 2007, 02:36:36 am »

Well spotted patrice :)
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future