Resources

My Agape try

Your Agape try


Support Forum

You must be logged in to post Login Register

Search 
Search Forums:


 




Role Scoping for NextGen Gallery Problem

UserPost

4:48 pm
August 27, 2009


karimun

Member

posts 3

1

I use your extension for the NextGen Gallery plugin to restrict the edit/upload rights of galleries.

For certain combinations I get double (triple .. ) entries of the same pictures in the Nextgen Gallery listing inside the admin area.

I have following setup:
- I create a NextGen gallery as administrator.
- I create a RoleScoper group (users of this group are all default authors).
- This group has rights to manage the NextGen gallery (defined through your NGG extension plugin)

A user now sees two (cloned) entries of each picture in the picture list of his gallery.
Me as admin I see only one as it should be.

Further test:
In your NGG extension plugin I not only assign a user group to a gallery but I explicitly add a user to a gallery who already is defined through the user group (this usually doesnt make sense, of course)
Result: This user sees now each picture as cloned triple entries!

Version numbers:
WP 2.8.2 | RoleScoper 1.0.8 | NGG Extension Plugin 0.9.1

Any suggestions?

9:31 pm
August 28, 2009


Kevin

Admin

posts 2402

2

karimun said:

I use your extension for the NextGen Gallery plugin to restrict the edit/upload rights of galleries.

For certain combinations I get double (triple .. ) entries of the same pictures in the Nextgen Gallery listing inside the admin area.


I am already midway through developing some improvements to Role Scoper's query filtering which will make this kind of error impossible.

But since that change will not be ready until some time next week, can you confirm that this updated development version of the NextGen Gallery Extension corrects your symptom? There are no other changes to the code.

11:10 am
August 29, 2009


karimun

Member

posts 3

3

With the development version installed everything stays the same.

Another thing I realized during this process: the gallery names in the NGG gallery overview are not linked anymore with the NGG extension deactivated or removed means it is impossible for users to access the picture listings.

2:48 am
September 5, 2009


karimun

Member

posts 3

4

I think I solved my problem.

The function "rs_ngg_query_hardway" in /rs-ngg_functions.php produces the double entries.

Adding following line returns only unique results:

$query = str_replace( 'SQL_CALC_FOUND_ROWS', 'SQL_CALC_FOUND_ROWS DISTINCT', $query );

I have not tested for side effects but it seems to play nice.

8:32 am
September 5, 2009


Kevin

Admin

posts 2402

5

karimun said:

I think I solved my problem.

The function "rs_ngg_query_hardway" in /rs-ngg_functions.php produces the double entries.

Adding following line returns only unique results:

$query = str_replace( 'SQL_CALC_FOUND_ROWS', 'SQL_CALC_FOUND_ROWS DISTINCT', $query );

I have not tested for side effects but it seems to play nice.


Thanks. Sorry I wasn't able to give that more attention yet.


About the Agapetry forum

Currently Online:

13 Guests

Maximum Online: 150

Forums:

Groups: 2

Forums: 7

Topics: 1186

Posts: 5409

Members:

There are 1176 members

There are 1 guests


Kevin has made 2402 posts

Top Posters:

metal450 - 159

Ragnar - 105

YikYak - 70

whiteorb - 44

Daisy - 35

Administrator: Kevin | Moderators: Kevin