summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-07-22 06:28:11 +0200
committerBenny Baumann <BenBE@geshi.org>2013-07-22 06:28:11 +0200
commite32654f68998e66ac537bdbb438e5e3bc74bb8cb (patch)
tree8a769f2c5c9d48708bae1f661382a1bf5dcffddb /includes
parentc8882f1d05028782c0c3d24b48d349a7308c9042 (diff)
downloadcacert-devel-e32654f68998e66ac537bdbb438e5e3bc74bb8cb.tar.gz
cacert-devel-e32654f68998e66ac537bdbb438e5e3bc74bb8cb.tar.xz
cacert-devel-e32654f68998e66ac537bdbb438e5e3bc74bb8cb.zip
bug 1137: Remove duplicated code causing a blnk page
Diffstat (limited to 'includes')
-rw-r--r--includes/notary.inc.php36
1 files changed, 14 insertions, 22 deletions
diff --git a/includes/notary.inc.php b/includes/notary.inc.php
index 54c9690..508b6ad 100644
--- a/includes/notary.inc.php
+++ b/includes/notary.inc.php
@@ -620,10 +620,22 @@
}
//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);
}
@@ -784,26 +796,6 @@
<?
}
- // 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