diff models/extractapp.php @ 104:e542b161d907 extractapp

bug fixed: for only lowercase accepted in html tag.
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Fri, 05 Aug 2016 13:34:55 +0200
parents 6ba742b712b0
children 025530e37dcd
line wrap: on
line diff
--- a/models/extractapp.php	Mon Jul 25 17:10:16 2016 +0200
+++ b/models/extractapp.php	Fri Aug 05 13:34:55 2016 +0200
@@ -408,6 +408,7 @@
 
     }
 
+
     public function UpdateInfoResponsedFromLGService($response) {
         /**
          * 
@@ -431,9 +432,11 @@
             $this->messages['error'] .= "[Error] Saving Failed! ".(string)$response["message"]."<br>";
             $this->messages['warning'] .= "[Warning] Please check branch ".$this->branch_id." in LGService, and modify from the latest version.";
 
+            // TODO shouldnt reload latest file from the LGService...
+            // pass the orignal text?
+
             $response_currentFile = $response["currentFile"];
             $this->current_fileId = (string)$response_currentFile["id"];
-
         }
         
 
@@ -1295,7 +1298,14 @@
         $result = $this->GetTopicById($topic_id);
         $row = mysql_fetch_assoc($result);
         $tag = $row['tag'];
-        return $tag;
+
+        // TODO need to reconstruct the structure for topic tag considering user may use Uppercase but only lowercase accpetable in html tag that why we store only lowercase in Taglist.tag field in database table.
+        // Temporate solution is we replace " " with "_" and .lowercase(), which are as the same as we do in LGServices when create a topic and also create the correpsonding topic tag
+        
+        $tag = str_replace(' ', '_', $tag);
+        return strtolower($tag);
+
+        //return $tag;
     }
     private function GetTopicName($topic_id) {
         $result = $this->GetTopicById($topic_id);