Skip to content

Commit

Permalink
Various cleanups for scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed Mar 31, 2014
1 parent 801bab7 commit 79a090d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 32 deletions.
6 changes: 3 additions & 3 deletions class.pop3.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,11 @@ public function disconnect()
*/
private function getResponse($size = 128)
{
$r = fgets($this->pop_conn, $size);
$response = fgets($this->pop_conn, $size);
if ($this->do_debug >= 1) {
echo "Server -> Client: $r";
echo "Server -> Client: $response";
}
return $r;
return $response;
}

/**
Expand Down
22 changes: 11 additions & 11 deletions class.smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,13 @@ protected function hmac($data, $key)
// Eliminates the need to install mhash to compute a HMAC
// Hacked by Lance Rushing

$b = 64; // byte length for md5
if (strlen($key) > $b) {
$bytelen = 64; // byte length for md5
if (strlen($key) > $bytelen) {
$key = pack('H*', md5($key));
}
$key = str_pad($key, $b, chr(0x00));
$ipad = str_pad('', $b, chr(0x36));
$opad = str_pad('', $b, chr(0x5c));
$key = str_pad($key, $bytelen, chr(0x00));
$ipad = str_pad('', $bytelen, chr(0x36));
$opad = str_pad('', $bytelen, chr(0x5c));
$k_ipad = $key ^ $ipad;
$k_opad = $key ^ $opad;

Expand Down Expand Up @@ -622,28 +622,28 @@ public function mail($from)
public function quit($close_on_error = true)
{
$noerror = $this->sendCommand('QUIT', 'QUIT', 221);
$e = $this->error; //Save any error
$err = $this->error; //Save any error
if ($noerror or $close_on_error) {
$this->close();
$this->error = $e; //Restore any error from the quit command
$this->error = $err; //Restore any error from the quit command
}
return $noerror;
}

/**
* Send an SMTP RCPT command.
* Sets the TO argument to $to.
* Sets the TO argument to $toaddr.
* Returns true if the recipient was accepted false if it was rejected.
* Implements from rfc 821: RCPT <SP> TO:<forward-path> <CRLF>
* @param string $to The address the message is being sent to
* @param string $toaddr The address the message is being sent to
* @access public
* @return bool
*/
public function recipient($to)
public function recipient($toaddr)
{
return $this->sendCommand(
'RCPT TO',
'RCPT TO:<' . $to . '>',
'RCPT TO:<' . $toaddr . '>',
array(250, 251)
);
}
Expand Down
34 changes: 17 additions & 17 deletions language/phpmailer.lang-nl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@
* Dutch Version by Tuxion <[email protected]>
*/

$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';//SMTP Error: Could not authenticate.
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';//SMTP Error: Could not connect to SMTP host.
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';//SMTP Error: Data not accepted.
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';//Message body empty
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';//Unknown encoding:
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';//Could not execute:
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';//Could not access file:
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';//File Error: Could not open file:
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';//The following From address failed:
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';//Could not instantiate mail function.
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres';//Invalid address
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';// mailer is not supported.
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';//You must provide at least one recipient email address.
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';//SMTP Error: The following recipients failed:
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';//Signing Error:
$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.';
$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.';
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.';
$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg';
$PHPMAILER_LANG['encoding'] = 'Onbekende codering: ';
$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: ';
$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: ';
$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: ';
$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: ';
$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.';
$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres';
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.';
$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.';
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: ';
$PHPMAILER_LANG['signing'] = 'Signeerfout: ';
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.';
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';//SMTP server error:
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';//Cannot set or reset variable:
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: ';
$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: ';
3 changes: 2 additions & 1 deletion language/phpmailer.lang-pl.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
$PHPMAILER_LANG['file_open'] = 'Nie można otworzyć pliku: ';
$PHPMAILER_LANG['from_failed'] = 'Następujący adres Nadawcy jest nieprawidłowy: ';
$PHPMAILER_LANG['instantiate'] = 'Nie można wywołać funkcji mail(). Sprawdź konfigurację serwera.';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, następujący adres Odbiorcy jest nieprawidłowy: ';
$PHPMAILER_LANG['invalid_address'] = 'Nie można wysłać wiadomości, '.
'następujący adres Odbiorcy jest nieprawidłowy: ';
$PHPMAILER_LANG['provide_address'] = 'Należy podać prawidłowy adres email Odbiorcy.';
$PHPMAILER_LANG['mailer_not_supported'] = 'Wybrana metoda wysyłki wiadomości nie jest obsługiwana.';
$PHPMAILER_LANG['recipients_failed'] = 'Błąd SMTP: Następujący odbiorcy są nieprawidłowi: ';
Expand Down

0 comments on commit 79a090d

Please sign in to comment.