1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 13:41:52 +02:00

Improved error message and docs.

This commit is contained in:
Cameron 2018-12-19 11:21:38 -08:00
parent 1648a6abac
commit 38a08376cd
2 changed files with 14 additions and 6 deletions
e107_admin
e107_handlers

@ -987,6 +987,7 @@ class mailout_main_ui extends e_admin_ui
require_once(e_HANDLER. 'phpmailer/PHPMailerAutoload.php');
/** @var SMTP $smtp */
$smtp = new SMTP;
$smtp->do_debug = SMTP::DEBUG_CONNECTION;
@ -996,6 +997,11 @@ class mailout_main_ui extends e_admin_ui
$username = $pref['smtp_username'];
$pwd = $pref['smtp_password'];
$port = ($pref['smtp_port'] != 465) ? $pref['smtp_port'] : 25;
// $port = vartrue($pref['smtp_port'], 25);
// var_dump($pref['smtp_port']);
// return null;
// var_dump($pref['smtp_password']);
// print_a($pref['smtp_password']);
@ -1007,7 +1013,7 @@ class mailout_main_ui extends e_admin_ui
//Connect to an SMTP server
if(!$smtp->connect($pref['smtp_server'], $port))
{
$mes->addError('Connect failed');
$mes->addError('Connect failed using '.$pref['smtp_server'] .' on port '.$port);
}
//Say hello
if(!$smtp->hello(gethostname()))

@ -1055,16 +1055,18 @@ class comment
}
/**
* Displays existing comments, and a comment entry form
*
* @param string $table - the source table for the associated item
* @param string $action - usually 'comment' or 'reply'
* @param string $table - the source table for the associated item
* @param string $action - usually 'comment' or 'reply'
* @param integer $id - ID of item associated with comments (e.g. news ID)
* @param int $width - appears to not be used
* @param string $subject
* @param int $width - appears to not be used
* @param string $subject
* @param boolean $rate
* @param boolean|string $return true, false or 'html'
* @param boolean $tablerender
* @return array|null|string|void
*/
function compose_comment($table, $action, $id, $width, $subject, $rate = FALSE, $return = FALSE, $tablerender = TRUE)
{