changeset 52:94064f625650 extractapp

assign book_meta to NULL if it's empty
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 26 Mar 2015 16:23:33 +0100
parents 840cdb52f476
children f9594c240826
files models/extractapp.php
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/models/extractapp.php	Thu Mar 26 15:42:50 2015 +0100
+++ b/models/extractapp.php	Thu Mar 26 16:23:33 2015 +0100
@@ -65,7 +65,7 @@
 
         // TODO: get book_meta from $_postdata and set $this->book_meta: book_id,book_name,author,year,pagenumber
         $book_meta = array();
-        array_push($book_meta, array($this->book_id,$this->book_name,"","",""));    // missing author,year,pagenumber
+        array_push($book_meta, array($this->book_id,$this->book_name,"NULL","NULL","NULL"));    // missing author,year,pagenumber
         
         $this->book_meta = $book_meta;
 
@@ -398,7 +398,7 @@
             if ( file_exists("data/parsing_files/".$_postdata['sectionId'].".txt") ) {
                 $oldFile = file_get_contents("data/parsing_files/".$_postdata['sectionId'].".txt");
                 //saving in my local machine in developing phrase
-                file_put_contents("data/parsing_files/".$_postdata['sectionId']."_".$date.".txt", $oldFile);
+                //file_put_contents("data/parsing_files/".$_postdata['sectionId']."_".$date.".txt", $oldFile);
             }
             
             if (get_magic_quotes_gpc()) {
@@ -420,7 +420,7 @@
             $require = $this->AppendMetaData($require);
                 
             //saving in my local machine in developing phrase
-            file_put_contents("data/parsing_files/".$_postdata['sectionId'].".txt", $require);
+            //file_put_contents("data/parsing_files/".$_postdata['sectionId'].".txt", $require);
         } 
 
         // ------