1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Issue #3463 - Alt-auth missing port field.

This commit is contained in:
Cameron
2018-10-02 12:15:58 -07:00
parent a78b44f48e
commit 3959c998c4
7 changed files with 16 additions and 5 deletions

View File

@@ -3202,7 +3202,7 @@ class e_parse extends e_parser
* "" (default) = URL's get relative path e.g. ../e107_plugins/etc
* @param mixed $all [optional] if TRUE, then when $mode is "full" or TRUE, USERID is also replaced...
* when $mode is "" (default), ALL other e107 constants are replaced
* @return string
* @return array|string
*/
public function replaceConstants($text, $mode = '', $all = FALSE)
{

View File

@@ -246,6 +246,8 @@ class alt_auth_admin extends alt_auth_base
*/
private $common_fields = array(
'server' => array('fieldname' => 'server', 'size' => 35, 'max_size' => 120, 'prompt' => LAN_ALT_32, 'help' => ''),
'port' => array('fieldname' => 'port', 'size' => 4, 'max_size' => 7, 'prompt' => LAN_ALT_80, 'help' => 'eg. 3306'),
'uname' => array('fieldname' => 'username', 'size' => 35, 'max_size' => 120, 'prompt' => LAN_ALT_33, 'help' => ''),
'pwd' => array('fieldname' => 'password', 'size' => 35, 'max_size' => 120, 'prompt' => LAN_ALT_34, 'help' => ''),
'db' => array('fieldname' => 'database', 'size' => 35, 'max_size' => 120, 'prompt' => LAN_ALT_35, 'help' => ''),

View File

@@ -97,7 +97,8 @@ class auth_login extends alt_auth_base
if ($connect_only) return AUTH_SUCCESS; // Test mode may just want to connect to the DB
*/
$dsn = 'mysql:dbname=' . $this->conf['e107db_database'] . ';host=' . $this->conf['e107db_server'];
// $dsn = 'mysql:dbname=' . $this->conf['e107db_database'] . ';host=' . $this->conf['e107db_server'];
$dsn = "mysql:host=".$this->conf['e107db_server'].";port=".varset($this->conf['e107db_port'],3306).";dbname=".$this->conf['e107db_database'];
try
{

View File

@@ -60,7 +60,7 @@ class alt_auth_e107db extends alt_auth_admin
$tab1 .= E107DB_LAN_1;
$tab1 .= "</td></tr>";
$tab1 .= $this->alt_auth_get_db_fields('e107db', $frm, $parm, 'server|uname|pwd|db|prefix|classfilt');
$tab1 .= $this->alt_auth_get_db_fields('e107db', $frm, $parm, 'server|port|uname|pwd|db|prefix|classfilt');
$tab1 .= "<tr><td>".E107DB_LAN_9."</td><td>";
$tab1 .= $this->altAuthGetPasswordSelector('e107db_password_method', $frm, $parm['e107db_password_method'], FALSE);

View File

@@ -103,6 +103,12 @@ define('LAN_ALT_76', 'User class restriction (a numeric value - zero or blank fo
define('LAN_ALT_77', 'Only users in this class (on the database set above) are permitted access');
define('LAN_ALT_78', 'Failed password action');
define('LAN_ALT_79', 'If user exists in primary DB, but enters an incorrect password, how should that be handled?');
define('LAN_ALT_80', "Port: ");
define('IMPORTDB_LAN_2', 'Plain Text');
define('IMPORTDB_LAN_3', 'Joomla salted');

View File

@@ -80,7 +80,9 @@ class auth_login extends alt_auth_base
public function login($uname, $pword, &$newvals, $connect_only = FALSE)
{
/* Begin - Deltik's PDO Workaround (part 1/2) */
$dsn = 'mysql:dbname=' . $this->conf['otherdb_database'] . ';host=' . $this->conf['otherdb_server'];
// $dsn = 'mysql:dbname=' . $this->conf['otherdb_database'] . ';host=' . $this->conf['otherdb_server'];
$dsn = "mysql:host=".$this->conf['otherdb_server'].";port=".varset($this->conf['otherdb_port'],3306).";dbname=".$this->conf['otherdb_database'];
try
{

View File

@@ -64,7 +64,7 @@ class alt_auth_otherdb extends alt_auth_admin
$tab1 .= OTHERDB_LAN_15;
$tab1 .= "</td></tr>";
$tab1 .= $this->alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|uname|pwd|db|table|ufield|pwfield|salt');
$tab1 .= $this->alt_auth_get_db_fields('otherdb', $frm, $parm, 'server|port|uname|pwd|db|table|ufield|pwfield|salt');
$tab1 .= "<tr><td>".OTHERDB_LAN_9."</td><td>";
$tab1 .= $this->altAuthGetPasswordSelector('otherdb_password_method', $frm, $parm['otherdb_password_method'], TRUE);