Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gdpr.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ name = General Data Protection Regulation (GDPR)
description = Helps with making a site GDPR-compliant.
core = 7.x
dependencies[] = checklistapi
configure = admin/config/gdpr/checklist
configure = admin/gdpr/checklist
package = General Data Protection Regulation
files[] = gdpr.test
12 changes: 6 additions & 6 deletions gdpr.install
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
* Implements hook_requirements().
*/
function gdpr_requirements($phase) {
$requirements = [];
$requirements = array();
$t = get_t();

if ($phase === 'runtime' && $definitions = checklistapi_get_checklist_info()) {
$id = 'gdpr_checklist';
if (isset($definitions[$id]) && $checklist = checklistapi_checklist_load($id)) {

$percent = round($checklist->getPercentComplete());
$requirements['gdpr_status'] = [
$requirements['gdpr_status'] = array(
'title' => $t('GDPR Preparation'),
'value' => $t('Self assessment Checklist: <a href="@url">@percent% done</a>.', [
'value' => $t('Self assessment Checklist: <a href="@url">@percent% done</a>.', array(
'@percent' => $percent,
'@url' => '/admin/config/gdpr/checklist',
]),
'@url' => '/admin/gdpr/checklist',
)),
'severity' => REQUIREMENT_INFO,
];
);
}
}

Expand Down
Loading