Mercurial > hg > extraction-interface
diff models/extractapp.php @ 53:f9594c240826 extractapp
get/update text after saving, for xml file consistency
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Thu, 26 Mar 2015 17:25:46 +0100 |
parents | 94064f625650 |
children | f9e7119339b2 |
line wrap: on
line diff
--- a/models/extractapp.php Thu Mar 26 16:23:33 2015 +0100 +++ b/models/extractapp.php Thu Mar 26 17:25:46 2015 +0100 @@ -17,7 +17,8 @@ } - public function GetTextFromFileId($_postdata) { + public function GetTextFromFileId() { // remove $_postdata as input + /* $this->file_id = $_postdata['fileId']; $branch_id = $_postdata['branchId']; $section_id = $_postdata['sectionId']; @@ -29,6 +30,7 @@ $this->section_name = $_postdata['sectionName']; $this->book_id = $_postdata['bookId']; $this->book_name = $_postdata['bookName']; + */ // get from URL with file_id $lg_text_url = $this->get_text_from_fileId_url.$this->file_id; @@ -50,7 +52,8 @@ } - public function GetTextFromSectionId($_postdata) { + public function GetTextFromSectionId() { // remove $_postdata as input + /* $section_id = $_postdata['sectionId']; $this->section_id = $section_id; $this->user_id = $_postdata['userId']; @@ -58,14 +61,16 @@ $this->section_name = $_postdata['sectionName']; $this->book_id = $_postdata['bookId']; $this->book_name = $_postdata['bookName']; + */ // get from URL with file_id - $lg_text_url = $this->get_text_from_sectionId_url.$section_id; + // $lg_text_url = $this->get_text_from_sectionId_url.$section_id; + $lg_text_url = $this->get_text_from_sectionId_url.$this->section_id; $lg_text = file_get_contents($lg_text_url); // TODO: get book_meta from $_postdata and set $this->book_meta: book_id,book_name,author,year,pagenumber $book_meta = array(); - array_push($book_meta, array($this->book_id,$this->book_name,"NULL","NULL","NULL")); // missing author,year,pagenumber + array_push($book_meta, array($this->book_id,$this->book_name,"no_data","no_data","no_data")); // missing author,year,pagenumber $this->book_meta = $book_meta;