Skip to content

Commit 0feec63

Browse files
author
Saket Hatwar
committed
lint
1 parent f01c570 commit 0feec63

File tree

3 files changed

+23
-22
lines changed

3 files changed

+23
-22
lines changed

modules/my_preferences/locale/hi/LC_MESSAGES/my_preferences.po

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ msgstr "अमान्य ईमेल पता"
9393
msgid "The email address already exists"
9494
msgstr "ईमेल पता पहले से मौजूद है"
9595

96-
msgid "Your password cannot be your email."
96+
msgid "Your password can't be your email."
9797
msgstr "आपका पासवर्ड आपका ईमेल नहीं हो सकता।"
9898

99-
msgid "Your password cannot be your user name."
99+
msgid "Your password can't be your username."
100100
msgstr "आपका पासवर्ड आपका उपयोगकर्ता नाम नहीं हो सकता।"
101101

102102
msgid "The passwords do not match."

modules/my_preferences/locale/my_preferences.pot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ msgstr ""
9393
msgid "The email address already exists"
9494
msgstr ""
9595

96-
msgid "Your password cannot be your email."
96+
msgid "Your password can't be your email."
9797
msgstr ""
9898

99-
msgid "Your password cannot be your user name."
99+
msgid "Your password can't be your username."
100100
msgstr ""
101101

102102
msgid "The passwords do not match."

modules/my_preferences/php/my_preferences.class.inc

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ namespace LORIS\my_preferences;
1010
class My_Preferences extends \NDB_Form
1111
{
1212
// Use gettext for error messages
13-
private const PASSWORD_ERROR_IS_EMAIL = 'Your password cannot be your email.';
14-
private const PASSWORD_ERROR_IS_USER = 'Your password cannot be your user name.';
13+
private const PASSWORD_ERROR_IS_EMAIL = 'Your password can't be your email.';
14+
private const PASSWORD_ERROR_IS_USER = 'Your password can't be your username.';
1515
private const PASSWORD_ERROR_NO_MATCH = 'The passwords do not match.';
16-
private const PASSWORD_ERROR_NO_CHANGE
17-
= 'New and old passwords are identical: please choose another one';
16+
private const PASSWORD_ERROR_NO_CHANGE = 'New and old passwords are identical';
1817

1918
/**
2019
* Computes the initial values this page will be filled with.
@@ -58,22 +57,22 @@ class My_Preferences extends \NDB_Form
5857
}
5958
}
6059

61-
foreach ($defaults['examiner'] as $cid => $vals) {
60+
foreach ($defaults['examiner'] as $cid=>$vals) {
6261
//sets pending approval info
63-
if ($cid == 'pending') {
62+
if ($cid=='pending') {
6463
$defaults['examiner_pending'] = $vals;
6564
continue;
6665
}
6766
//gets radiologist Y/N from any of the active sites
68-
if ($vals[0] == 'Y') {
69-
if ($vals[1] === '1') {
67+
if ($vals[0]=='Y') {
68+
if ($vals[1]==='1') {
7069
$defaults['examiner_radiologist'] = 'Y';
7170
} else {
7271
$defaults['examiner_radiologist'] = 'N';
7372
}
7473
}
7574
if ($vals[0] == 'Y') {
76-
$defaults['ex_' . $cid] = 'on';
75+
$defaults['ex_'.$cid] = 'on';
7776
}
7877
}
7978

@@ -82,13 +81,14 @@ class My_Preferences extends \NDB_Form
8281
$curr_sub = \NDB_Notifier::getUserNotificationModuleServices(
8382
$user->getId()
8483
);
85-
foreach ($curr_sub as $module => $operations) {
84+
foreach ($curr_sub as $module=>$operations) {
8685
foreach ($operations as $operation => $services) {
8786
unset($services['desc']);
8887
foreach ($services as $service => $subscribed) {
89-
$var_name = "notif_" . $module . "_" . $operation . "_" . $service;
88+
$var_name
89+
= "notif_".$module."_".$operation."_".$service;
9090

91-
if ($subscribed === 'Y') {
91+
if ($subscribed==='Y') {
9292
$defaults[$var_name] = 'on';
9393
}
9494
}
@@ -342,8 +342,8 @@ class My_Preferences extends \NDB_Form
342342
unset($nGroup);
343343

344344
// Notification rows
345-
$notification_rows = [];
346-
foreach ($notifier_list as $module => $operation_services) {
345+
$notification_rows =[];
346+
foreach ($notifier_list as $module=>$operation_services) {
347347
foreach ($operation_services as $operation => $services) {
348348
$nGroup = [];
349349
$nGroup[] = $this->createLabel($module);
@@ -364,7 +364,7 @@ class My_Preferences extends \NDB_Form
364364
foreach ($services as $service => $avail) {
365365
if ($avail === 'Y' && $display) {
366366
$nGroup[] = $this->createCheckbox(
367-
"notif_" . $module . "_" . $operation . "_" . $service,
367+
"notif_".$module."_".$operation."_".$service,
368368
""
369369
);
370370
} else {
@@ -376,11 +376,11 @@ class My_Preferences extends \NDB_Form
376376

377377
$this->addGroup(
378378
$nGroup,
379-
"row_" . $module . "_" . $operation,
379+
"row_".$module."_".$operation,
380380
'',
381381
$this->_GUIDelimiter
382382
);
383-
$notification_rows[] = "row_" . $module . "_" . $operation;
383+
$notification_rows[] = "row_".$module."_".$operation;
384384
unset($nGroup);
385385
}
386386
}
@@ -461,7 +461,8 @@ class My_Preferences extends \NDB_Form
461461
$decoded = htmlspecialchars_decode($plaintext);
462462
new \Password($decoded);
463463
// New password must be different than current one
464-
if (! \User::factory($this->identifier)->isPasswordDifferent($decoded)) {
464+
if (!\User::factory($this->identifier)->isPasswordDifferent($decoded)
465+
) {
465466
$errors['Password_Group'] = dgettext(
466467
'my_preferences',
467468
self::PASSWORD_ERROR_NO_CHANGE

0 commit comments

Comments
 (0)