1 nate_02631 Mar 24, 2008 14:39
3 yabba Mar 24, 2008 14:59
You're possibly getting screwed by this piece of code /inc/collections/model/_blogcache.class.php approx 269
$for_User->get_Group();// ensure Group is set
$Group = $for_User->Group;
// First check if we have a global access perm:
if( $Group->check_perm( 'blogs', $permlevel ) )
{ // If group grants a global permission:
$this->load_all();
return $this->get_ID_array();
}
Try logging in as a non-admin user and seeing if the order changes
¥
4 nate_02631 Mar 24, 2008 15:19
Hmmph... good eye, ¥åßßå... that seems to be what's happening - the list is alphabetical if I change my group ID from the admin.
I'm not sure why that bit of code is there. Any suggestions for a workaround without bringing down the house?
5 yabba Mar 24, 2008 15:24
You could try deleting that section and seeing if your server melts :roll:
¥
6 nate_02631 Mar 24, 2008 15:39
¥åßßå wrote:
You could try deleting that section and seeing if your server melts
Hmmm. yeah - not the best way to go about it, and I'm pretty sure that would break the admin group's ability to edit all blogs (with explicitly adding them to the blog) :)
I'll take a look at it a little more deeply - thanks for pointing that section out. If anyone has done this already or has suggestions, I'm all ears ;)
7 yabba Mar 24, 2008 15:57
Just for giggles, change it to this and see what happens ;)
$for_User->get_Group();// ensure Group is set
$Group = $for_User->Group;
// First check if we have a global access perm:
if( $Group->check_perm( 'blogs', $permlevel ) )
{ // If group grants a global permission:
$this->order_by = $order;
$this->load_all();
return $this->get_ID_array();
}
¥
8 nate_02631 Mar 24, 2008 17:01
Thanks ¥åßßå. You were close - it was
// First check if we have a global access perm:
if( $Group->check_perm( 'blogs', $permlevel ) )
{ // If group grants a global permission:
// NJW MOD - Add orderby so blog drop lists are sorted by shortname order
$this->order_by = $this->dbprefix.$order_by;
$this->load_all();
return $this->get_ID_array();
}
In /inc/collections/model/_blogcache.class.php around line 269-270 ish... (in the load_user_blogs function)
And then for it to actually do something, from the first post, change
$blog_array = $BlogCache->load_user_blogs( $this->coll_list_permname, $this->coll_list_permlevel );
to
$blog_array = $BlogCache->load_user_blogs( $this->coll_list_permname, $this->coll_list_permlevel, NULL , 'shortname' );
...in /skins_adm/_adminUI_general.class.php to change the sort order from the default ID to shortname.
Not sure if the former should be filed as a bug - or is there some intended behaviour I am missing?
9 yabba Mar 24, 2008 18:08
*moved*, if only to remind me ;)
¥
Hi Nate,
What you do looks OK, and I haven 't got a clue why it doesn 't work. You can try set $debug to 1 in /conf/_advanced.php. That spits out all kind of data including the database queries. You may find information there.
Good luck