Mercurial > hg > extraction-interface
diff models/extractapp.php @ 57:5cf9720a2e25 extractapp
New: add reloadText to load the latest version
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Mon, 30 Mar 2015 17:23:47 +0200 |
parents | 95f929d7b318 |
children | a11f9103b8db |
line wrap: on
line diff
--- a/models/extractapp.php Mon Mar 30 15:54:04 2015 +0200 +++ b/models/extractapp.php Mon Mar 30 17:23:47 2015 +0200 @@ -348,13 +348,15 @@ $status = (string)$response["status"]; if ($status == "ok") { - $this->messages .= "saving success."; + $this->messages .= "Saving success."; $this->file_id = (string)$response_file["id"]; $this->branch_id = (string)$response_branch["id"]; } else if ($status == "error") { // saving not success - $this->messages .= "saving does not success! ".(string)$response["message"]; + $this->messages .= "Saving Failed! ".(string)$response["message"]."<br>"; + $this->messages .= "Please check branch ".$this->branch_id." in LGService, and modify from the latest version. <br>"; + $response_currentFile = $response["currentFile"]; //$this->current_fileId = $response["currentFileId"]; $this->current_fileId = (string)$response_currentFile["id"]; @@ -363,6 +365,14 @@ } + + public function ReloadSetting() { + if ($this->current_fileId != 0) { + $this->file_id = $this->current_fileId; + $this->current_fileId = 0; + } + } + private function AppendMetaData($text_content) { $text = '<?xml version="1.0" encoding="UTF-8"?>'; $text .= "\n<text>\n";