Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add subscriber is an adult as a default attribute (#314)
Signed-off-by: Xheni Myrtaj <myrtajxheni@gmail.com>
  • Loading branch information
xh3n1 authored and Sam Tuke committed May 12, 2018
1 parent ba4ea2e commit d29e385
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions public_html/lists/admin/data/subscriberisanadult.txt
@@ -0,0 +1,5 @@
# list of attributes that may be useful
# format of this file: anything with a # symbol is ignored
# first line without # will be the name of this "attribute"
# anything else will be values to use
I am 16 years or older :Subscriber is an adult
2 changes: 1 addition & 1 deletion public_html/lists/admin/data/termsofservice.txt
Expand Up @@ -2,4 +2,4 @@
# format of this file: anything with a # symbol is ignored
# first line without # will be the name of this "attribute"
# anything else will be values to use
I agree to the terms of service of : Terms of Service
I agree to the terms of service of :Terms of Service
5 changes: 4 additions & 1 deletion public_html/lists/admin/defaults.php
Expand Up @@ -54,10 +54,13 @@ function readentry($file)
}

$typeValue = 'select';
if($lc_name ==='termsofservice'){
if($lc_name === 'termsofservice'){
$typeValue = 'checkbox';
$name.= getConfig('domain');
}
if($lc_name === 'subscriberisanadult'){
$typeValue= 'checkbox';
}

$query = sprintf('insert into %s (name,type,required,tablename) values("%s","%s",%d,"%s")',
$tables['attribute'], addslashes($name), $typeValue, 1, $lc_name);
Expand Down

0 comments on commit d29e385

Please sign in to comment.