Diff for phpMyEdit/phpMyEdit.class.php between version 1.161 and 1.162
| version 1.161, 2005/01/09 01:22:12 |
version 1.162, 2005/01/09 01:26:21 |
|
|
| * http://platon.sk/projects/phpMyEdit/ |
* http://platon.sk/projects/phpMyEdit/ |
| */ |
*/ |
| |
|
| /* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.160 2005/01/04 09:59:54 nepto Exp $ */ |
/* $Platon: phpMyEdit/phpMyEdit.class.php,v 1.161 2005/01/09 01:22:12 nepto Exp $ */ |
| |
|
| /* This is a generic table editing program. The table and fields to be |
/* This is a generic table editing program. The table and fields to be |
| edited are defined in the calling program. |
edited are defined in the calling program. |
| Line 1182 function '.$this->js['prefix'].'filter_h |
|
| Line 1182 function '.$this->js['prefix'].'filter_h |
|
| */ |
*/ |
| function substituteVars($str, $subst_ar) /* {{{ */ |
function substituteVars($str, $subst_ar) /* {{{ */ |
| { |
{ |
| $array = preg_split('/\\$(\w+)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); |
$array = preg_split('/(\\$\w+)/', $str, -1, PREG_SPLIT_DELIM_CAPTURE); |
| for ($i = 1; $i < count($array); $i += 2) { |
for ($i = 1; $i < count($array); $i += 2) { |
| if (isset($subst_ar[$array[$i]])) |
$key = substr($array[$i], 1); |
| $array[$i] = $subst_ar[$array[$i]]; |
if (isset($subst_ar[$key])) { |
| |
$array[$i] = $subst_ar[$key]; |
| |
} |
| } |
} |
| return join('', $array); |
return join('', $array); |
| } /* }}} */ |
} /* }}} */ |
Platon Group <platon@platon.org> http://platon.org/
|
|