public function doExecute() { // get all of the issns $arrIssn = $this->request->getData("//issn", null, "array"); if (count($arrIssn) > 0) { // execute this in a single query $objData = new Xerxes_DataMap(); $arrResults = $objData->getRefereed($arrIssn); // add the data back to the request $objXml = new DOMDocument(); $objXml->loadXML("<refereed />"); foreach ($arrResults as $objPeer) { $objIssn = $objXml->createElement("issn", $objPeer->issn); $objXml->documentElement->appendChild($objIssn); } $this->request->addDocument($objXml); } return 1; }
public function doExecute() { $bolRefereed = false; $issn = $this->request->getProperty("issn"); $configBaseUrl = $this->request->getConfig("BASE_URL"); if ($issn != null && $issn != "") { // run the query $objData = new Xerxes_DataMap(); $arrResults = $objData->getRefereed($issn); // if we got a hit, then we're good if (count($arrResults) > 0) { $bolRefereed = true; } } // redirect the browser to the correct image if ($bolRefereed == true) { $this->request->setRedirect($configBaseUrl . "/images/refereed.png"); } else { $this->request->setRedirect($configBaseUrl . "/images/empty.png"); } return 1; }