bug 1137: Remove duplicated code causing a blnk page
authorBenny Baumann <BenBE@geshi.org>
Mon, 22 Jul 2013 04:28:11 +0000 (06:28 +0200)
committerBenny Baumann <BenBE@geshi.org>
Mon, 22 Jul 2013 04:28:11 +0000 (06:28 +0200)
includes/notary.inc.php

index 54c9690..508b6ad 100644 (file)
        }
 
        //functions to do with recording user agreements
+       /**
+        * write_user_agreement()
+        * writes a new record to the table user_agreement
+        *
+        * @param mixed $memid
+        * @param mixed $document
+        * @param mixed $method
+        * @param mixed $comment
+        * @param integer $active
+        * @param integer $secmemid
+        * @return
+        */
        function write_user_agreement($memid, $document, $method, $comment, $active=1, $secmemid=0){
        // write a new record to the table user_agreement
-               $query="insert into `user_agreements` set `memid`=".$memid.", `secmemid`=".$secmemid.
-                       ",`document`='".$document."',`date`=NOW(), `active`=".$active.",`method`='".$method."',`comment`='".$comment."'" ;
+               $query="insert into `user_agreements` set `memid`=".intval($memid).", `secmemid`=".intval($secmemid).
+                       ",`document`='".$document."',`date`=NOW(), `active`=".intval($active).",`method`='".$method."',`comment`='".$comment."'" ;
                $res = mysql_query($query);
        }
 
 <?
        }
 
-       // double with notray.inc
-       /**
-        * write_user_agreement()
-        * writes a new record to the table user_agreement
-        *
-        * @param mixed $memid
-        * @param mixed $document
-        * @param mixed $method
-        * @param mixed $comment
-        * @param integer $active
-        * @param integer $secmemid
-        * @return
-        */
-       function write_user_agreement($memid, $document, $method, $comment, $active=1, $secmemid=0){
-               //
-               $query="insert into `user_agreements` set `memid`=".intval($memid).", `secmemid`=".intval($secmemid).
-                               ",`document`='".$document."',`date`=NOW(), `active`=".intval($active).",`method`='".$method."',`comment`='".$comment."'" ;
-               $res = mysql_query($query);
-       }
-
        /**
         * check_date_format()
         * checks if the date is entered in the right date format YYYY-MM-DD and