diff --git a/biblat.sql b/biblat.sql index 1b6bde426..de2c04819 100644 --- a/biblat.sql +++ b/biblat.sql @@ -17,7 +17,7 @@ CREATE TABLE "logSolicitudDocumento" ( session_id character varying(40) ); -CREATE TABLE "advacedSearchHash" +CREATE TABLE "advancedSearchHash" ( hash character varying(32) NOT NULL, search character varying, @@ -25,7 +25,7 @@ CREATE TABLE "advacedSearchHash" CONSTRAINT "advacedSearchHash_pkey" PRIMARY KEY (hash) ); -CREATE OR REPLACE FUNCTION "advacedSearchHashInsert"(character varying(32), character varying, character varying) +CREATE OR REPLACE FUNCTION "advancedSearchHashInsert"(character varying(32), character varying, character varying) RETURNS text AS $$ DECLARE @@ -34,12 +34,12 @@ CREATE OR REPLACE FUNCTION "advacedSearchHashInsert"(character varying(32), char vquery ALIAS FOR $3; retval text; BEGIN - UPDATE "advacedSearchHash" SET search=vsearch, query=vquery + UPDATE "advancedSearchHash" SET search=vsearch, query=vquery WHERE hash=vhash; IF (FOUND) THEN retval := 'registro actualizado'; ELSE - INSERT INTO "advacedSearchHash" (hash, search, query) + INSERT INTO "advancedSearchHash" (hash, search, query) VALUES (vhash, vsearch, vquery); retval := 'registro insertado'; END IF; diff --git a/ci/application/controllers/revista.php b/ci/application/controllers/revista.php index 058be7103..69ce7bbf7 100644 --- a/ci/application/controllers/revista.php +++ b/ci/application/controllers/revista.php @@ -227,9 +227,9 @@ public function solicitudDocumento(){ $this->load->library('email'); $this->email->initialize($config); $this->email->from('solicitud@biblat.unam.mx', 'Solicitud Biblat'); - //$this->email->to('sinfo@dgb.unam.mx'); - $this->email->to('achwazer@gmail.com'); - //$this->email->cc('anoguez@dgb.unam.mx'); + $this->email->to('sinfo@dgb.unam.mx'); + //$this->email->to('achwazer@gmail.com'); + $this->email->cc('anoguez@dgb.unam.mx'); $this->email->subject('Solicitud de documento Biblat'); $data = $_POST; $data['fichaDocumento'] = $this->articulo($data['revista'], $data['articulo'], 'true');