RSGallery2 Forum Portal

RSGallery2 support forums => RSGallery2 4.x bugs & problems => Topic started by: giobag on July 17, 2017, 01:22:39 AM

Title: Fixed: Users can see other users galleries name when they try to add photos.
Post by: giobag on July 17, 2017, 01:22:39 AM
Hello,
i am new to rsgallery and i am having problems with rsgallery module 4.3.1.
I am trying to have users that can create their own galleries and add photos in them.So far so good.
When a user creates an album he can see the parent category of every other user.
Also when a user adds an image he can also see(not add) the name of the album of every other user.
When the user picks up from the dropbox the album that he wants to add the image to he can see every album...
I tried permissions but to no avail.
Thanks in advance
Title: Re: Users can see other users galleries name when they try to add photos.
Post by: whazzup on July 17, 2017, 10:15:37 PM
This is a tough one. Looks like a lot of work to debug this.
I will check it out but it will need "some" time
Regards whazzup
Title: Re: Users can see other users galleries name when they try to add photos.
Post by: giobag on July 21, 2017, 02:14:00 PM
Thank you whazzup.
I figured it out by editing file config.rsgallery2.php
I attach my changes with //giobag.
Thank you again.

$database      = JFactory::getDBO();
      $my       = JFactory::getUser();//giobag
      $my_id    = $my->id; //giobag

      $dropDown_html = "";

      //$query = 'SELECT * FROM `#__rsgallery2_galleries` WHERE `parent` = ' . (int) $galid . ' ORDER BY `ordering` ASC';
      $query = 'SELECT * FROM `#__rsgallery2_galleries` WHERE `uid` = ' . (int) $my_id . ' and `parent` = ' . (int) $galid . ' ORDER BY `ordering` ASC';//giobag
      
      
      $database->setQuery($query);
Title: Re: Users can see other users galleries name when they try to add photos.
Post by: whazzup on July 23, 2017, 03:56:35 PM
Thank you giobag,

It is marvelous when "our" users support the solutions to their own issues.  ;D ;-)
The inserts will be included in the next release
Regards whazzup