Changeset 3180 in subversion
- Timestamp:
- Dec 14, 2009 2:37:32 AM (3 years ago)
- File:
-
- 1 edited
-
trunk/roundcubemail/program/include/rcmail.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcmail.php
r3177 r3180 637 637 638 638 $nr = is_numeric($attrib['nr']) ? $attrib['nr'] : 1; 639 $vars = isset($attrib['vars']) ? $attrib['vars'] : ''; 640 641 $command_name = !empty($attrib['command']) ? $attrib['command'] : NULL; 642 $alias = $attrib['name'] ? $attrib['name'] : ($command_name && $command_label_map[$command_name] ? $command_label_map[$command_name] : ''); 643 639 $name = $attrib['name'] ? $attrib['name'] : ''; 640 644 641 // check for text with domain 645 if ($domain && ($text_item = $this->texts[$domain.'.'.$ alias]))642 if ($domain && ($text_item = $this->texts[$domain.'.'.$name])) 646 643 ; 647 644 // text does not exist 648 else if (!($text_item = $this->texts[$alias])) { 649 /* 650 raise_error(array( 651 'code' => 500, 652 'type' => 'php', 653 'line' => __LINE__, 654 'file' => __FILE__, 655 'message' => "Missing localized text for '$alias' in '$sess_user_lang'"), TRUE, FALSE); 656 */ 657 return "[$alias]"; 645 else if (!($text_item = $this->texts[$name])) { 646 return "[$name]"; 658 647 } 659 648 … … 685 674 if (is_array($attrib['vars'])) { 686 675 foreach ($attrib['vars'] as $var_key => $var_value) 687 $a_replace_vars[$var_key{0}=='$' ? substr($var_key, 1) : $var_key] = $var_value; 688 } 689 690 if ($a_replace_vars) 691 $text = preg_replace('/\$\{?([_a-z]{1}[_a-z0-9]*)\}?/ei', '$a_replace_vars["\1"]', $text); 676 $text = str_replace($var_key[0]!='$' ? '$'.$var_key : $var_key, $var_value, $text); 677 } 692 678 693 679 // format output
Note: See TracChangeset
for help on using the changeset viewer.
