glFusion

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000844Plugin - Media GalleryPluginpublic2012-06-08 12:212012-09-11 11:40
Reporterwalter rowe 
Assigned Tomark 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version2.0.0Fixed in Version2.0.0 
Summary0000844: GLF 1.3 MediaGallery 2.0.0 membergallery
Description$_MG_USERPREFS['member_gallery'] isn't always getting set. This causes the phpblock_mg_maenroll() block to be displayed sporadically after the member already has created a member album.

See Additional Information for a modified phpblock_mg_maenroll() that displays the values of all the variables that determine whether the block is displayed.
Steps To Reproduce0) Enable mediagallery, member galleries, and the member album enroll block
1) Create a new user ID.
2) Log in as the new user.
3) Click the link in the member album enroll block and create a new member album.
4) Visit mediagallery. The member album enroll block correctly does not display.
5) Visit forum. The member album enroll block incorrectly is displayed.
6) Visit a static page. The member album enroll block sometimes displays, other times not.
7) Visit an article. The member album enroll block incorrectly is displayed.

There isn't a specific pattern.
Additional Informationfunction phpblock_mg_maenroll(){
    global $_CONF, $_MG_CONF, $_MG_USERPREFS, $_TABLES, $_USER, $LANG_MG03;

    $url = '';

    if ( COM_isAnonUser() ) {
        return;
    }

    $url .= sprintf("Member Albums: %d
Member Gallery: %d
User UID: %d
",$_MG_CONF['member_albums'],$_MG_USERPREFS['member_gallery'],$_USER['uid']);
    $url .= sprintf("Remote Users: %d
Allow Remote: %d
",SEC_inGroup("Remote Users"),$_MG_CONF['allow_remote']);

    if ( $_MG_CONF['member_albums'] != 1 || $_MG_USERPREFS['member_gallery'] == 1 || $_USER['uid'] < 3) {
        return $url;
        return;
    }

    if ( SEC_inGroup("Remote Users") && $_MG_CONF['allow_remote'] != 1 ) {
        return $url;
        return;
    }

    $url .= sprintf("
" . $LANG_MG03['member_album_signup'], $_MG_CONF['site_url'] . '/enroll.php');
    return $url;
}
TagsNo tags attached.
Attached Filespng file icon Screen Shot 2012-06-08 at 12.47.17 PM.png [^] (267,972 bytes) 2012-06-08 12:21
png file icon Screen Shot 2012-06-08 at 12.47.46 PM.png [^] (307,439 bytes) 2012-06-08 12:22

- Relationships

-  Notes
(0001172)
mark (administrator)
2012-09-11 11:40

Modified the code to ensure the variable is always set.

- Issue History
Date Modified Username Field Change
2012-06-08 12:21 walter rowe New Issue
2012-06-08 12:21 walter rowe File Added: Screen Shot 2012-06-08 at 12.47.17 PM.png
2012-06-08 12:22 walter rowe File Added: Screen Shot 2012-06-08 at 12.47.46 PM.png
2012-09-11 11:40 mark Note Added: 0001172
2012-09-11 11:40 mark Assigned To => mark
2012-09-11 11:40 mark Status new => resolved
2012-09-11 11:40 mark Resolution open => fixed
2012-09-11 11:40 mark Fixed in Version => 2.0.0
2012-09-11 11:40 mark Target Version => 2.0.0


Copyright © 2000 - 2013 MantisBT Team
Powered by Mantis Bugtracker