MDL-51242 messageinbound: Guess the port from hostspec
authorAndrew Nicols <andrew@nicols.co.uk>
Tue, 5 Jul 2016 06:50:25 +0000 (14:50 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Tue, 5 Jul 2016 06:52:53 +0000 (14:52 +0800)
commit275480a0dec96ae57f4af49643757131320530cd
tree5aa717464434896b42e1fc1fe84f1c4883c40536
parentac8d6cff54fd881b7c0a8b51dc8b5c70736ccf10
MDL-51242 messageinbound: Guess the port from hostspec

Existing language strings for the host component suggest that the host can
be provided in the format hostname:port, but we previously did not support
this.

This patch explodes the string based on the colon character and assumes
that if there are two parts, that they are in the format hostname:port.

Note: This does not attempt to deal with full host specifications (e.g.
protocol://hostname:port), as this is beyond the scope of this change.
admin/tool/messageinbound/classes/manager.php