Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit for code review - contains the latest code from d.o. #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

graber-1
Copy link
Contributor

No description provided.

$form['user_button_text'] = array(
'#type' => 'textfield',
'#title' => t('User account anonymization button text'),
'#default_value' => variable_get('commerce_gdpr_user_button_text', 'I want to be forgotten'),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lack of t()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a default variable value, I thought it should be constant :)

* Admin form validate handler.
*/
function commerce_gdpr_admin_form_validate($form, &$form_state) {
if (!is_numeric($form_state['values']['data_retention'])) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to use by ctype_digit()
This will return TRUE for values like: -5 or 5.98

if (!empty($to_anonymize)) {
$form['to_anonymize'] = array(
'#theme' => 'item_list',
'#title' => t("Accounts subject to anonymization"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

single quotes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!empty($already_done)) {
$form['already_done'] = array(
'#theme' => 'item_list',
'#title' => t("Accounts already anonymized"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants