Small code fix patch

Phoca Gallery - image gallery extension
jacobjob
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 04 Mar 2012, 18:00

Small code fix patch

Post 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 :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Small code fix patch

Post by Jan »

Hi, which version is this?
If you find Phoca extensions useful, please support the project
jacobjob
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 04 Mar 2012, 18:00

Re: Small code fix patch

Post by jacobjob »

Version 3.1.5 of Phoca Gallery. Thanks for fixing this.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Small code fix patch

Post 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?
If you find Phoca extensions useful, please support the project
jacobjob
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 04 Mar 2012, 18:00

Re: Small code fix patch

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49150
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Small code fix patch

Post by Jan »

Hmm, I don't see there any closed tag? :idea:
If you find Phoca extensions useful, please support the project
Post Reply