[FIXED] Favorite Album Link option: Bug fixed report [FIXED] Favorite Album Link option: Bug fixed report
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[FIXED] Favorite Album Link option: Bug fixed report

Started by ttn, November 14, 2003, 12:19:05 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ttn

Description: In Config set option Picinfo display fav album link to NO, the whole Picture information block under the picture disappears without a trace.
The fix is very simple, in coppermine/displayimage.php, around line 300, replace this

            if ($CONFIG['picinfo_display_favorites']) {
                if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
                    $info[$lang_picinfo['addFavPhrase']] = '<a href="' . $CPG_URL . '&file=addfav&pid=' . $CURRENT_PIC_DATA['pid'] . '" >' . $lang_picinfo['addFav'] . '</a>';
                } else {
                    $info[$lang_picinfo['addFavPhrase']] = '<a href="' . $CPG_URL . '&file=addfav&pid=' . $CURRENT_PIC_DATA['pid'] . '" >' . $lang_picinfo['remFav'] . '</a>';
                }
                if (USER_ID or $CONFIG['allow_anon_fullsize'] or USER_IS_ADMIN) {
                    return theme_html_picinfo($info);
                }
            }

with this

            if ($CONFIG['picinfo_display_favorites']) {
                if (!in_array($CURRENT_PIC_DATA['pid'], $FAVPICS)) {
                    $info[$lang_picinfo['addFavPhrase']] = '<a href="' . $CPG_URL . '&file=addfav&pid=' . $CURRENT_PIC_DATA['pid'] . '" >' . $lang_picinfo['addFav'] . '</a>';
                } else {
                    $info[$lang_picinfo['addFavPhrase']] = '<a href="' . $CPG_URL . '&file=addfav&pid=' . $CURRENT_PIC_DATA['pid'] . '" >' . $lang_picinfo['remFav'] . '</a>';
                }
            }
            if (USER_ID or $CONFIG['allow_anon_fullsize'] or USER_IS_ADMIN) {
                return theme_html_picinfo($info);
            }


Hardly see the difference? Well, just a tiny bracket got misplaced  :)
No need to copy/paste, just move the last bracket "}" at line 308 up 3 lines, that's it.

Coppermine is great. My warm regards to Nuke Dev Team: gtroll, DJMaze, kegobeer, ...

Cheers,
TTN
ThichTN

Tarique Sani

Hmmm.... I wonder  when was this implemented :?:  and who is to blame  :wink:
SANIsoft PHP applications for E Biz

ttn

No blaming, or I won't report any more issue :-)
Just kidding. You guys have done a great job, Tarique, GauGau et al, for supporting Coppermine community. Keep up the good work.

Best Regards,
TTN
ThichTN