Forgot Heredoc syntax

In php no more required to use heredoc and done some linter headache
This commit is contained in:
azerttyu 2017-10-07 12:19:43 +02:00
parent 6e1a021ced
commit cf949cf245
2 changed files with 7 additions and 7 deletions

View File

@ -690,8 +690,8 @@ class m_admin {
return false;
}
if ($db->next_record()) {
// TODO: put that string into gettext !
$mail = <<<EOF
// TODO: put that string into gettext !
$mail = '
A new AlternC account was created on %fqdn by %creator.
Account details
@ -703,7 +703,7 @@ class m_admin {
can change password: %canpass
type: %type
notes: %notes
EOF;
';
$mail = strtr($mail, array('%fqdn' => $L_FQDN,
'%creator' => $db->Record['parentlogin'],
'%uid' => $db->Record['uid'],

View File

@ -30,13 +30,13 @@ function usage() {
global $argv;
// putting {$argv[0]} or $argv[0] in the heredoc fails
$wtfphp = $argv[0];
$u = <<<EOF
$u = '
Usage: $wtfphp <email> <alias> ...
email: full email adress, including domain, which must exist
alias: one or many aliases the email should forward to, space separated
EOF;
';
error_log($u);
exit(1);
}
@ -81,7 +81,7 @@ if (is_null($password)) {
$quotas = $default_quotas;
$r = join(", ", $recipients);
print <<<EOF
print '
user: $user
domain: $domain
compte: $compte
@ -89,7 +89,7 @@ password: $password
quota: $default_quotas
recipients: $r
EOF;
';
if ($dryrun) {
error_log('not creating email because of $dryrun is true');