@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | require_once("../inc/boinc_db.inc"); |
22 | 22 | require_once("../inc/util.inc"); |
23 | 23 | |
24 | -define('CONSENT_TYPE_ENROLL','ENROLL'); |
|
24 | +define('CONSENT_TYPE_ENROLL', 'ENROLL'); |
|
25 | 25 | |
26 | 26 | function check_termsofuse() { |
27 | 27 | return defined('TERMSOFUSE_FILE') and file_exists(TERMSOFUSE_FILE); |
@@ -32,13 +32,13 @@ discard block |
||
32 | 32 | $source, $ctime = 0 |
33 | 33 | ) { |
34 | 34 | $mys = BoincDb::escape_string($source); |
35 | - if ($ctime==0) { |
|
35 | + if ($ctime == 0) { |
|
36 | 36 | $mytime = $user->create_time; |
37 | 37 | } else { |
38 | 38 | $mytime = $ctime; |
39 | 39 | } |
40 | 40 | return BoincConsent::insert( |
41 | - "(userid, consent_type_id, consent_time, consent_flag, consent_not_required, source) " . |
|
41 | + "(userid, consent_type_id, consent_time, consent_flag, consent_not_required, source) ". |
|
42 | 42 | "values($user->id, $consent_type_id, $mytime, $consent_flag, $consent_not_required, '$mys')" |
43 | 43 | ); |
44 | 44 | |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | // The integer is the consent_type_id- the id from consent_type table. |
64 | 64 | // If the boolean is FALSE, the integer returned is -1. |
65 | 65 | // |
66 | -function check_consent_type($name, $checkenabled=TRUE) { |
|
66 | +function check_consent_type($name, $checkenabled = TRUE) { |
|
67 | 67 | $ct = BoincConsentType::lookup("shortname = '{$name}'"); |
68 | - if ($ct and ( !$checkenabled or ($ct->enabled)) ) { |
|
68 | + if ($ct and (!$checkenabled or ($ct->enabled))) { |
|
69 | 69 | return array(TRUE, $ct->id); |
70 | 70 | } |
71 | 71 | return array(FALSE, -1); |