Mercurial > hg > extraction-interface
comparison controllers/extractapp.php @ 96:ce7e933b18b0 extractapp
bug fixed: new section with no fileId in LGServices when creating/changing to another topic
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 23 Nov 2015 16:24:57 +0100 |
parents | 9a29e9d28ece |
children | 5bea390e7ca9 |
comparison
equal
deleted
inserted
replaced
95:9a29e9d28ece | 96:ce7e933b18b0 |
---|---|
100 break; | 100 break; |
101 | 101 |
102 case 'ContinueTagging': | 102 case 'ContinueTagging': |
103 $viewmodel->messages['info'] .= "(Countinue tagging) "; | 103 $viewmodel->messages['info'] .= "(Countinue tagging) "; |
104 $viewmodel->SetInfoFromPreviousPage($this->postdata); | 104 $viewmodel->SetInfoFromPreviousPage($this->postdata); |
105 $viewmodel->SetTextFromFileId(); // get text by fileId, from LGService | 105 |
106 // when new section hasn't been saved to LGServices, no fileId and no branchId | |
107 if ($this->postdata['fileId'] == 0) { | |
108 $viewmodel->SetTextFromSectionId(); | |
109 } else { | |
110 $viewmodel->SetTextFromFileId(); // get text by fileId, from LGService | |
111 } | |
112 | |
106 $viewmodel->SetTopic($this->postdata['topic']); | 113 $viewmodel->SetTopic($this->postdata['topic']); |
107 | 114 |
108 $this->ReturnView($viewmodel->StartTagging(), true); | 115 $this->ReturnView($viewmodel->StartTagging(), true); |
109 break; | 116 break; |
110 | 117 |
114 $viewmodel->messages['error'] .= "Fail to create the new topic <br> "; | 121 $viewmodel->messages['error'] .= "Fail to create the new topic <br> "; |
115 } else { | 122 } else { |
116 // then act like ContinueTagging | 123 // then act like ContinueTagging |
117 $viewmodel->messages['info'] .= "Created a new topic <br>"; | 124 $viewmodel->messages['info'] .= "Created a new topic <br>"; |
118 $viewmodel->SetInfoFromPreviousPage($result); | 125 $viewmodel->SetInfoFromPreviousPage($result); |
119 $viewmodel->SetTextFromFileId(); // get text by fileId, from LGService | 126 |
127 // when new section hasn't been saved to LGServices, no fileId and no branchId | |
128 if ($this->postdata['fileId'] == 0) { | |
129 $viewmodel->SetTextFromSectionId(); | |
130 } else { | |
131 $viewmodel->SetTextFromFileId(); // get text by fileId, from LGService | |
132 } | |
120 $viewmodel->SetTopic($result['topic']); | 133 $viewmodel->SetTopic($result['topic']); |
121 | 134 |
122 } | 135 } |
123 $this->ReturnView($viewmodel->StartTagging(), true); | 136 $this->ReturnView($viewmodel->StartTagging(), true); |
124 | 137 |