Advertisement
Guest User

Ammendment to bp-cubepoint-templatetags.php

a guest
May 22nd, 2010
273
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. This adjustment will suppress php warning messages of 'division by zero' as per thekmens suggestion
  2.  
  3. find this block - starting around luine 54 in /includes/bp-cubepoint-templattags.php
  4.  
  5. $this->pag_links = paginate_links( array(
  6. 'base' => $bp->displayed_user->domain . $bp->cubepoint->slug .'/'. $bp->cubepoint->points_slug .'/%_%',
  7. 'format' => '%#%',
  8. 'total' => ceil( (int) $this->total_point_count / (int) $this->pag_per_page ),
  9. 'current' => (int) $this->pag_page,
  10. 'prev_text' => '←',
  11. 'next_text' => '→',
  12. 'mid_size' => 1
  13. ));
  14. $this->pag_table_links = paginate_links( array(
  15. 'base' => $bp->displayed_user->domain . $bp->cubepoint->slug .'/'. $bp->cubepoint->table_slug .'/%_%',
  16. 'format' => '%#%',
  17. 'total' => ceil( (int) $this->total_point_count / (int) $this->pag_per_page ),
  18. 'current' => (int) $this->pag_page,
  19. 'prev_text' => '←',
  20. 'next_text' => '→',
  21. 'mid_size' => 1
  22. ));
  23. Note the lines beginning 'total' and the word ceil, prepend @ to ceil
  24. The lines should now read as:
  25.  
  26. 'total' => @ceil( (int) $this->total_point_count / (int) $this->pag_per_page ),
  27.  
  28. simply suppresses the display of error/warning messages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement