summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2013-05-20 18:10:01 +0200
committerBenny Baumann <BenBE@geshi.org>2013-05-20 18:10:01 +0200
commit16828d2f4ac5d9dffce26334d8c910a7b33ceb44 (patch)
treeb8fab76449d1020d9490dd1fb6161f198087fb53
parentaa02730dde00c341b2854109204b5cd0b1c497cf (diff)
parentb6057400206bd3c8c6c21bff9cd49d6dcd352e69 (diff)
downloadcacert-devel-16828d2f4ac5d9dffce26334d8c910a7b33ceb44.tar.gz
cacert-devel-16828d2f4ac5d9dffce26334d8c910a7b33ceb44.tar.xz
cacert-devel-16828d2f4ac5d9dffce26334d8c910a7b33ceb44.zip
Merge branch 'bug-1137' into testserver-stable
Conflicts: includes/wot.inc.php
-rw-r--r--includes/wot.inc.php27
1 files changed, 26 insertions, 1 deletions
diff --git a/includes/wot.inc.php b/includes/wot.inc.php
index f032307..edba64d 100644
--- a/includes/wot.inc.php
+++ b/includes/wot.inc.php
@@ -639,6 +639,17 @@ function AssureFoot($oldid,$confirm)
}
// double with notray.inc
+/**
+ * write_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.
@@ -646,6 +657,13 @@ function write_user_agreement($memid, $document, $method, $comment, $active=1, $
$res = mysql_query($query);
}
+/**
+ * check_date_format()
+ *
+ * @param mixed $date
+ * @param integer $year
+ * @return
+ */
function check_date_format($date, $year=2000){
//checks if the date is entered in the right date format YYYY-MM-DD and if
if (!strpos($date,'-')) {
@@ -659,7 +677,14 @@ function check_date_format($date, $year=2000){
}
+/**
+ * check_date_differnce()
+ *
+ * @param mixed $date
+ * @param integer $diff
+ * @return
+ */
function check_date_differnce($date, $diff=1){
//returns false if the date is larger then today + time diffrence
- return (strtotime($date)>=time+$diff*86400);
+ return (strtotime($date)>=time()+$diff*86400);
}