# HG changeset patch # User Zoe Hong # Date 1428586186 -7200 # Node ID 75233b09c580a2b57bd77dca62cda6c0b0d04042 # Parent 60b5a94163c370b7792ffb6a561bfbe7fa683c6e saving latest taglist from db according to topic (even when changing topic) diff -r 60b5a94163c3 -r 75233b09c580 models/extractapp.php --- a/models/extractapp.php Thu Apr 09 10:59:31 2015 +0200 +++ b/models/extractapp.php Thu Apr 09 15:29:46 2015 +0200 @@ -302,12 +302,13 @@ } } + // This is only called by SaveFullTextToLGService() private function AppendMetaData($text_content) { $text = ''; $text .= "\n\n"; - // topic + // --- topic --- $text .= "".$this->topic."\n"; - // book meta data + // --- book meta data --- $book = $this->book_meta; foreach ($book as $b) { $text .= "\n"; @@ -328,8 +329,12 @@ $text .= "\n"; } - // taglist - $taglist = $this->taglist_infile; + + // ---- taglist --- + // $taglist = $this->taglist_infile; + // obtain the latest taglist from db + $taglist = $this->GetTaglistByTopicID($this->GetTopic()); + foreach ($taglist as $tagitem) { $text .= "\n"; $text .= "".$tagitem[0]."\n"; @@ -338,10 +343,11 @@ $text .= "".$tagitem[3]."\n"; $text .= "\n"; } - - // text_content + // ---- + // --- text_content --- $text .= $text_content; $text .= ""; + // ---- return $text; }