Guest User

Untitled

a guest
Jun 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.83 KB | None | 0 0
  1. function hasABoddle ( array fizzit_ids ) {
  2.     /***
  3.      * fizzits have two properties: foo and bar
  4.      *  
  5.      * a fizzit is a boddle if both foo and bar are true
  6.      *  
  7.      * the data is structured such that foo_havers and bar_havers
  8.      * are tables that maintain the history of those properties
  9.      * for our fizzits ( eg we need to know when an admin or
  10.      * support person changed that status of the property )
  11.      *  
  12.      * so, we need to do a couple of queries to find the boddles
  13.      *  
  14.      * we don't need to identify the boddles, though. this function
  15.      * only returns true if *any* of the input fizzit_ids refer
  16.      * to a boddle
  17.      ***/
  18.  
  19.     foo_havers = getFooHavers( fizzit_ids )
  20.     bar_havers = getBarHavers( fizzit_ids )
  21.  
  22.     return ( foo_havers.count > 0 ) && ( bar_havers.count > 0 )
  23. }
Add Comment
Please, Sign In to add comment