Fixed bug related to how the eqpresppi district was being chosen.
authorAlan Jack Pippin <ajp@pippin.(none)>
Wed, 5 Apr 2006 04:18:34 +0000 (22:18 -0600)
committerAlan J. Pippin <ajp@pippins.net>
Wed, 5 Apr 2006 04:18:34 +0000 (22:18 -0600)
inc/class.eq.inc.php

index d9a58fac43b2c7ef277e69b4a2dd75a1ff20c71c..aab3ffd61d40b3792059fcc712c4cdb8d8e1d6e7 100644 (file)
@@ -875,10 +875,16 @@ class eq
       $i=0;
       while ($this->db->next_record())
        {
-         $districts[$i]['district'] = $this->db->f('district');
-         $districts[$i]['name'] = $this->db->f('name');
-         $districts[$i]['supervisor'] = $this->db->f('supervisor');
-         if($eqpresppi == 0) { $i++; }
+         if($eqpresppi == 1 && $this->db->f('district') == 1) {
+           $districts[$i]['district'] = $this->db->f('district');
+           $districts[$i]['name'] = $this->db->f('name');
+           $districts[$i]['supervisor'] = $this->db->f('supervisor');
+          } else if($eqpresppi == 0) {
+            $districts[$i]['district'] = $this->db->f('district');
+           $districts[$i]['name'] = $this->db->f('name');
+            $districts[$i]['supervisor'] = $this->db->f('supervisor');
+            $i++;
+         }
        }
 
       $sql = "SELECT * FROM eq_elder where valid=1 ORDER BY elder ASC";