# HG changeset patch # User Zoe Hong # Date 1427383413 -3600 # Node ID 94064f625650a3f4ea0357c0241607d9c91afbed # Parent 840cdb52f476af2a167494d185569c1bf3913892 assign book_meta to NULL if it's empty diff -r 840cdb52f476 -r 94064f625650 models/extractapp.php --- 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); } // ------