public function conflicts($email = false)
 {
     if ($email ? !$this->_conflicts_email : !isset($this->_conflicts)) {
         $this->_conflicts = array();
         if (!$email && isset($this->allConflictType)) {
             $vals = array();
             foreach (explode(",", $this->allConflictType) as $x) {
                 $vals[] = explode(" ", $x);
             }
         } else {
             if (!$email) {
                 $vals = Dbl::fetch_rows("select contactId, conflictType from PaperConflict where paperId={$this->paperId}");
             } else {
                 $vals = Dbl::fetch_rows("select ContactInfo.contactId, conflictType, email from PaperConflict join ContactInfo using (contactId) where paperId={$this->paperId}");
                 $this->_conflicts_email = true;
             }
         }
         foreach ($vals as $v) {
             if ($v[1] > 0) {
                 $row = (object) array("contactId" => (int) $v[0], "conflictType" => (int) $v[1]);
                 if (isset($v[2]) && $v[2]) {
                     $row->email = $v[2];
                 }
                 $this->_conflicts[$row->contactId] = $row;
             }
         }
     }
     return $this->_conflicts;
 }
Beispiel #2
0
 function fetch_rows()
 {
     return Dbl::fetch_rows(Dbl::do_query_on($this->dblink, func_get_args(), Dbl::F_ERROR));
 }