Forgot Heredoc syntax
In php no more required to use heredoc and done some linter headache
This commit is contained in:
parent
6e1a021ced
commit
cf949cf245
|
@ -690,8 +690,8 @@ class m_admin {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($db->next_record()) {
|
if ($db->next_record()) {
|
||||||
// TODO: put that string into gettext !
|
// TODO: put that string into gettext !
|
||||||
$mail = <<<EOF
|
$mail = '
|
||||||
A new AlternC account was created on %fqdn by %creator.
|
A new AlternC account was created on %fqdn by %creator.
|
||||||
|
|
||||||
Account details
|
Account details
|
||||||
|
@ -703,7 +703,7 @@ class m_admin {
|
||||||
can change password: %canpass
|
can change password: %canpass
|
||||||
type: %type
|
type: %type
|
||||||
notes: %notes
|
notes: %notes
|
||||||
EOF;
|
';
|
||||||
$mail = strtr($mail, array('%fqdn' => $L_FQDN,
|
$mail = strtr($mail, array('%fqdn' => $L_FQDN,
|
||||||
'%creator' => $db->Record['parentlogin'],
|
'%creator' => $db->Record['parentlogin'],
|
||||||
'%uid' => $db->Record['uid'],
|
'%uid' => $db->Record['uid'],
|
||||||
|
|
|
@ -30,13 +30,13 @@ function usage() {
|
||||||
global $argv;
|
global $argv;
|
||||||
// putting {$argv[0]} or $argv[0] in the heredoc fails
|
// putting {$argv[0]} or $argv[0] in the heredoc fails
|
||||||
$wtfphp = $argv[0];
|
$wtfphp = $argv[0];
|
||||||
$u = <<<EOF
|
$u = '
|
||||||
Usage: $wtfphp <email> <alias> ...
|
Usage: $wtfphp <email> <alias> ...
|
||||||
|
|
||||||
email: full email adress, including domain, which must exist
|
email: full email adress, including domain, which must exist
|
||||||
alias: one or many aliases the email should forward to, space separated
|
alias: one or many aliases the email should forward to, space separated
|
||||||
|
|
||||||
EOF;
|
';
|
||||||
error_log($u);
|
error_log($u);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ if (is_null($password)) {
|
||||||
$quotas = $default_quotas;
|
$quotas = $default_quotas;
|
||||||
$r = join(", ", $recipients);
|
$r = join(", ", $recipients);
|
||||||
|
|
||||||
print <<<EOF
|
print '
|
||||||
user: $user
|
user: $user
|
||||||
domain: $domain
|
domain: $domain
|
||||||
compte: $compte
|
compte: $compte
|
||||||
|
@ -89,7 +89,7 @@ password: $password
|
||||||
quota: $default_quotas
|
quota: $default_quotas
|
||||||
recipients: $r
|
recipients: $r
|
||||||
|
|
||||||
EOF;
|
';
|
||||||
|
|
||||||
if ($dryrun) {
|
if ($dryrun) {
|
||||||
error_log('not creating email because of $dryrun is true');
|
error_log('not creating email because of $dryrun is true');
|
||||||
|
|
Loading…
Reference in New Issue