Mercurial > hg > extraction-interface
diff develop/controllers/extractapp.php @ 13:cc36a20a68ab
automatically decide which rows (what data) should be shown in the exporting table based on the topic.
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Tue, 17 Feb 2015 15:25:11 +0100 |
parents | e82ca7375e93 |
children | ac77748bb813 |
line wrap: on
line diff
--- a/develop/controllers/extractapp.php Mon Feb 16 16:51:39 2015 +0100 +++ b/develop/controllers/extractapp.php Tue Feb 17 15:25:11 2015 +0100 @@ -27,7 +27,7 @@ $viewmodel->GetInfoFromPreviousPage($this->postdata); $response = $viewmodel->SaveFullTextToLGService($this->postdata); - $viewmodel->UpdateInfoByResonseFromLGService($response); // update file_id, branch_id, user_id + $viewmodel->UpdateInfoByResponseFromLGService($response); // update file_id, branch_id, user_id $this->ReturnView($viewmodel->StartTagging(), false); break; @@ -47,15 +47,19 @@ if ($this->postdata['fileId'] != 0) { // ($this->postdata['branchId'] != 0) { // get text from fileId, from LGService $viewmodel->GetTextFromFileId($this->postdata); - } else if ($this->postdata['sectionId'] != 0) { + } else if ($this->postdata['sectionId'] != 0 && $this->postdata['userId'] != 0) { // get text from sectionId from LGService $viewmodel->GetTextFromSectionId($this->postdata); + } else if ($this->postdata['sectionId'] != 0) { + $viewmodel->GetTextFromLocal($this->postdata['sectionId']); + } else if (is_numeric($this->urlvalues['id'])) { // get text from local file system (for development stage only) $viewmodel->GetTextFromLocal($this->urlvalues['id']); - // $this->ReturnView($viewmodel->StartTagging($this->urlvalues), false); } else { + var_dump($this->postdata); + echo "wrong url!!"; return; } @@ -71,7 +75,7 @@ protected function ExportTable() { //$viewmodel = new ExtractappModel(); $viewmodel = $this->viewmodel; - $this->ReturnView($viewmodel->ExportTable($this->urlvalues, $this->postdata), false); + $this->ReturnView($viewmodel->ExportTable($this->postdata), false); }