Page 1 of 1

Small code fix patch

Posted: 04 Mar 2012, 18:08
by jacobjob
Hi all, I am using Eclipse IDE for developing the PHP code. I saw a small mistake in the file:
components/com_phocagallery/views/category/tmpl/default_statistics.php

Can the developers apply this after approval to the next release?

Here's my small patch:

Code: Select all

Index: default_statistics.php
===================================================================
--- default_statistics.php	(revision 2)
+++ default_statistics.php	(working copy)
@@ -50,7 +50,7 @@
 									echo JHTML::_( 'image.site', $value->linkthumbnailpath, '', '', '', $value->altvalue, array('class' => 'pg-image'));
 								}
 
-								?></a>
+								?>></a>
 								
 							</div>
 						</div>
@@ -129,7 +129,7 @@
 								} else {
 									echo JHTML::_( 'image', $value->linkthumbnailpath, $value->altvalue, array('class' => 'pg-image') );
 								}
-								?></a>
+								?>></a>
 								
 							</div>
 						</div>

Also some divs were not closed, but I couldn't check how they should be closed, so I didn't fix that.
Thanks all! Keep up the good work :)

Re: Small code fix patch

Posted: 07 Mar 2012, 02:32
by Jan
Hi, which version is this?

Re: Small code fix patch

Posted: 18 Mar 2012, 15:07
by jacobjob
Version 3.1.5 of Phoca Gallery. Thanks for fixing this.

Re: Small code fix patch

Posted: 19 Mar 2012, 22:42
by Jan
Hi, I don't understand your changes.

A tag is closed on line 46:

echo ' >';

why to close it again and in fact close the image tag as attribute into a tag on line 50?

Re: Small code fix patch

Posted: 20 Mar 2012, 10:42
by jacobjob
You're right. The tag is opened in HTML but closed in the echo command. So my patch doesn't fix/repair it.
But the PHP-file itself is harder to validate for IDEs, because the HTML itself is not valid, because of the missing closing tag, which is added by code.

Re: Small code fix patch

Posted: 21 Mar 2012, 23:52
by Jan
Hmm, I don't see there any closed tag? :idea: