public function order_anno_list() { if ($this->order_anno_list == false) { $this->order_anno_list = Dbl::fetch_objects("select * from PaperTagAnno where tag=?", $this->tag); $this->order_anno_list[] = (object) ["tag" => $this->tag, "tagIndex" => TAG_INDEXBOUND, "heading" => "Untagged", "annoId" => null, "annoFormat" => 0]; usort($this->order_anno_list, function ($a, $b) { if ($a->tagIndex != $b->tagIndex) { return $a->tagIndex < $b->tagIndex ? -1 : 1; } else { if (($x = strcasecmp($a->heading, $b->heading)) != 0) { return $x; } else { return $a->annoId < $b->annoId ? -1 : 1; } } }); } return $this->order_anno_list; }
public function named_contacts() { $vals = Dbl::fetch_objects("select ContactInfo.contactId, conflictType, email, firstName, lastName, affiliation from PaperConflict join ContactInfo using (contactId) where paperId={$this->paperId} and conflictType>=" . CONFLICT_AUTHOR); foreach ($vals as $v) { $v->contactId = (int) $v->contactId; $v->conflictType = (int) $v->conflictType; } return $vals; }