I was trying to style my gallery and came across the following bug.
#pg-msnr-container id is always applied ONLY after changing the 'Phoca Gallery Center' parameter under 'General Settings' to anything.
The reason for this is because by default, the value of this parameter is equal to nothing upon first install. So it wont be applied after first install bu only once changing the 'Phoca Gallery Center' parameter to yes or no, it sets it to 1 or 0 for yes or no in the database. However, the code in the following files executes an if statement based on something or nothing which is wrong. The if statement needs to be based on 0 or 1 and the default value in the database should be set to 0 upon first install.
Files where the bug exists:
Code: Select all
components/com_phocagallery/views/category/view.html.php
components/com_phocagallery/views/categories/view.html.php
Code: Select all
if ($this->tmpl['phocagallery_center'] != '') {
$s = "\n" . '#pg-msnr-container {'."\n";
$s .= ' margin: 0 auto;'."\n";
$s .= '}'."\n";
}
Code: Select all
if ($this->tmpl['phocagallery_center'] != 0) {
$s = "\n" . '#pg-msnr-container {'."\n";
$s .= ' margin: 0 auto;'."\n";
$s .= '}'."\n";
}
Wolvy