Skip to:
Content
Pages
Categories
Search
Top
Bottom

Count/list of All sites is computed differently in different places

  • @sootsnoot

    Participant

    WordPress 4.0.1, BP 2.2. Access is firewalled only to developers.

    I have an unusual multisite installation where access to BuddyPress/WordPress is controlled by a Zend Framework application. That application controls what is accessible via BuddyPress/WordPress based on what user is logged in to the ZF application: there are no BuddyPress/WordPress signup or login pages accessible, signup and login/logout to WP are done through PHP APIs.

    I want a BuddyPress user to be able to list “all” sites (not just the ones in which they have capabilities), but exclude certain sites based on the ZF application’s database.

    I customized bp_blogs/bp_blogs_classes.php:get_all() to do exactly what I want. But having done that, I see that it only affects the little circled number of sites shown on the sites page within the “All Sites” button.

    The actual list of sites displayed shows the original unmodified number of sites in the “Viewing i-j of k sites” heading, and it contains entries for those sites that I excluded in bp_blogs/bp_blogs_classes.php:get_all(). Can anyone point me at the other piece of code that does this computation? I’ve been struggling stepping through code in xdebug and haven’t been able to find it…

Viewing 1 replies (of 1 total)
  • @sootsnoot

    Participant

    Well, it was in the same source file, but the regular expression I was using to find similar queries wasn’t good enough. I needed to tweak bp_blogs/bp_blogs_classes.php:get() to make the content displayed on the Sites page consistent with the total number of sites produced by bp_blogs/bp_blogs_classes.php:get_all() and displayed inside the “All Sites” button on that page. Sorry for wasting people’s time.

Viewing 1 replies (of 1 total)
  • The topic ‘Count/list of All sites is computed differently in different places’ is closed to new replies.
Skip to toolbar