comparison controllers/extractapp.php @ 86:0141df465205 extractapp_dev

New: add chinese characters to pinyin
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 30 Apr 2015 10:52:05 +0200
parents f1f849d31272
children fb5049fc5dd7
comparison
equal deleted inserted replaced
85:966a36752c34 86:0141df465205
64 case 'SaveFullText': 64 case 'SaveFullText':
65 $viewmodel->SaveFullText($this->postdata); 65 $viewmodel->SaveFullText($this->postdata);
66 $this->ReturnView($viewmodel->StartTagging(), true); 66 $this->ReturnView($viewmodel->StartTagging(), true);
67 break; 67 break;
68 case 'SaveFullTextToLGService': 68 case 'SaveFullTextToLGService':
69 $viewmodel->messages['info'] .= "SaveFullTextToLGService! "; 69 global $AT_LOCAL;
70 $viewmodel->SetInfoFromPreviousPage($this->postdata); 70 if ($AT_LOCAL) {
71 $response = $viewmodel->SaveFullTextToLGService($this->postdata); 71 $viewmodel->messages['info'] .= "SaveFullTextToLGService! (local test) ";
72 $viewmodel->UpdateInfoResponsedFromLGService($response); // update file_id, branch_id, user_id 72 $viewmodel->SetInfoFromPreviousPage($this->postdata);
73 $viewmodel->SetTextFromFileId(); 73 $response = $viewmodel->SaveFullTextToLGService($this->postdata);
74
75 } else {
76
77 $viewmodel->messages['info'] .= "SaveFullTextToLGService! ";
78 $viewmodel->SetInfoFromPreviousPage($this->postdata);
79 $response = $viewmodel->SaveFullTextToLGService($this->postdata);
80 $viewmodel->UpdateInfoResponsedFromLGService($response); // update file_id, branch_id, user_id
81 $viewmodel->SetTextFromFileId();
82 }
74 $this->ReturnView($viewmodel->StartTagging(), true); 83 $this->ReturnView($viewmodel->StartTagging(), true);
75 break; 84 break;
76 85
77 case 'SmartRegexLoad': 86 case 'SmartRegexLoad':
78 $viewmodel->LoadSmartRegex($this->postdata['topic_id']); 87 $viewmodel->LoadSmartRegex($this->postdata['topic_id']);