From: pkiddie <pk...@us...> - 2005-10-20 10:32:41
|
Update of /cvsroot/stack/stack-1-0/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23804/scripts Modified Files: stackXML.php Log Message: Commented the lib.php file extensively Fixed bug where importing code implied 0 was empty, when in fact this is not always true! Index: stackXML.php =================================================================== RCS file: /cvsroot/stack/stack-1-0/scripts/stackXML.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** stackXML.php 30 Aug 2005 13:51:55 -0000 1.20 --- stackXML.php 20 Oct 2005 10:32:25 -0000 1.21 *************** *** 960,967 **** //Only import node if it does actually have any text behind it, in metadata this will assume defaults ! if (!empty($val)) { $array[$nodeName]=$val; } - } --- 960,967 ---- //Only import node if it does actually have any text behind it, in metadata this will assume defaults ! //Check that node is NOT empty but override it if that node is not actually empty and equal to 0 ! if (!empty($val) || $val==0) { $array[$nodeName]=$val; } } *************** *** 1062,1068 **** { $val = $node->getText(); //Do not write question field if there is no text behind it ! if (!empty($val)) { $array[$nodeName]=$val; } --- 1062,1070 ---- { $val = $node->getText(); + + show_array($val); //Do not write question field if there is no text behind it ! if (!empty($val) || $val==0) { $array[$nodeName]=$val; } |