mirror of
https://github.com/e107inc/e107.git
synced 2025-08-23 14:44:29 +02:00
Updated failed-login message to include variable.
This commit is contained in:
@@ -2714,16 +2714,20 @@ class e_parser
|
||||
}
|
||||
|
||||
/**
|
||||
* Generic variable translator for LAN definitions.
|
||||
* Generic variable translator for LAN definitions.
|
||||
* @param $lan - string LAN
|
||||
* @param $vals - either a single value, which will replace '[x]' or an array with key=>value pairs.
|
||||
* @example $tp->lanVars("My name is [x] and I own a [y]", array('x'=>"John", 'y'=>"Cat"));
|
||||
* @param string | array $vals - either a single value, which will replace '[x]' or an array with key=>value pairs.
|
||||
* @example $tp->lanVars("My name is [x] and I own a [y]", array('x'=>"John", 'y'=>"Cat"));
|
||||
* @return string
|
||||
*/
|
||||
function lanVars($lan, $vals, $bold=false)
|
||||
{
|
||||
|
||||
$array = (!is_array($vals)) ? array('x'=>$vals) : $vals;
|
||||
|
||||
|
||||
$search = array();
|
||||
$replace = array();
|
||||
|
||||
foreach($array as $k=>$v)
|
||||
{
|
||||
$search[] = "[".$k."]";
|
||||
|
Reference in New Issue
Block a user