5 Modification information for LGPL compliance
7 r57851 - 2010-08-20 12:44:11 -0700 (Fri, 20 Aug 2010) - kjing - Author: Jenny Gonsalves <jenny@sugarcrm.com>
8 Merging with maint_6_0_1 revisions 57708:57838
10 r56990 - 2010-06-16 13:05:36 -0700 (Wed, 16 Jun 2010) - kjing - snapshot "Mango" svn branch to a new one for GitHub sync
12 r56989 - 2010-06-16 13:01:33 -0700 (Wed, 16 Jun 2010) - kjing - defunt "Mango" svn dev branch before github cutover
14 r56965 - 2010-06-15 10:57:35 -0700 (Tue, 15 Jun 2010) - jenny - Merging with Windex 56827:56958
16 r55980 - 2010-04-19 13:31:28 -0700 (Mon, 19 Apr 2010) - kjing - create Mango (6.1) based on windex
18 r52439 - 2009-11-12 17:05:52 -0800 (Thu, 12 Nov 2009) - clee - Updated to allow Rich Text Editor to resize and render HTML content on detailview.
20 r51719 - 2009-10-22 10:18:00 -0700 (Thu, 22 Oct 2009) - mitani - Converted to Build 3 tags and updated the build system
22 r51634 - 2009-10-19 13:32:22 -0700 (Mon, 19 Oct 2009) - mitani - Windex is the branch for Sugar Sales 1.0 development
24 r50375 - 2009-08-24 18:07:43 -0700 (Mon, 24 Aug 2009) - dwong - branch kobe2 from tokyo r50372
26 r42807 - 2008-12-29 11:16:59 -0800 (Mon, 29 Dec 2008) - dwong - Branch from trunk/sugarcrm r42806 to branches/tokyo/sugarcrm
28 r30629 - 2007-12-26 08:01:12 -0800 (Wed, 26 Dec 2007) - clee - Changed SugarFieldText.php to automatically set the smarty modifier url2html to be true for DetailViews. Changed function.sugarvar.php to check for this modifier and render the appropriate call to the smarty modifier.
30 include/SugarFields/Text/SugarFieldText.php
31 include/Smarty/plugins/function.sugarvar.php
33 r23083 - 2007-05-24 16:39:44 -0700 (Thu, 24 May 2007) - clee - Code cleanup.
35 r22459 - 2007-05-02 04:44:56 -0700 (Wed, 02 May 2007) - majed - adds new field types as well as improving meta data driven ui support
37 r22239 - 2007-04-24 17:22:11 -0700 (Tue, 24 Apr 2007) - clee - Support for nested memberName attribute value (for relate fields)
39 r22184 - 2007-04-23 17:47:51 -0700 (Mon, 23 Apr 2007) - clee - Latest updates as we continue 5.0 framework development.
41 r22175 - 2007-04-23 16:43:00 -0700 (Mon, 23 Apr 2007) - clee - Latest updates as we continue 5.0 framework development.
43 r22125 - 2007-04-20 17:02:26 -0700 (Fri, 20 Apr 2007) - majed - makes it so you don't need to pass in as many variables
45 r22124 - 2007-04-20 16:54:53 -0700 (Fri, 20 Apr 2007) - clee -
58 * Smarty {sugarvar} function plugin
62 * Purpose: creates a smarty variable from the parameters
64 * @author Wayne Pan {wayne at sugarcrm.com}
69 function smarty_function_sugarvar($params, &$smarty)
71 if(empty($params['key'])) {
72 $smarty->trigger_error("sugarvar: missing 'key' parameter");
76 $object = (empty($params['objectName']))?$smarty->get_template_vars('parentFieldArray'): $params['objectName'];
77 $displayParams = $smarty->get_template_vars('displayParams');
80 if(empty($params['memberName'])){
81 $member = $smarty->get_template_vars('vardef');
82 $member = $member['name'];
84 $members = explode('.', $params['memberName']);
85 $member = $smarty->get_template_vars($members[0]);
86 for($i = 1; $i < count($members); $i++){
87 $member = $member[$members[$i]];
91 $_contents = '$'. $object . '.' . $member . '.' . $params['key'];
92 if(empty($params['stringFormat']) && empty($params['string'])) {
93 $_contents = '{' . $_contents;
94 if(!empty($params['htmlentitydecode'])){
95 $_contents .= '|escape:\'htmlentitydecode\'';
97 if(!empty($displayParams['htmlescape'])){
98 $_contents .= '|escape:\'html\'';
100 if(!empty($displayParams['strip_tags'])){
101 $_contents .= '|strip_tags';
103 if(!empty($displayParams['url2html'])){
104 $_contents .= '|url2html';
106 if(!empty($displayParams['nl2br'])){
107 $_contents .= '|nl2br';