trigger_error("sugar_link: missing 'module' parameter"); return; } if(!empty($params['data']) && is_array($params['data'])){ $link_url = 'index.php?'; $link_url .= 'module=iFrames&action=index'; $link_url .= '&record='.$params['data']['0']; $link_url .= '&tab=true'; }else{ $action = (!empty($params['action']))?$params['action']:'index'; $link_url = 'index.php?'; $link_url .= 'module='.$params['module'].'&action='.$action; if (!empty($params['record'])) { $link_url .= "&record=".$params['record']; } if (!empty($params['extraparams'])) { $link_url .= '&'.$params['extraparams']; } } if (isset($params['link_only']) && $params['link_only'] == 1 ) { // Let them just get the url, they want to put it someplace return ajaxLink($link_url); } $id = (!empty($params['id']))?' id="'.$params['id'].'"':''; $class = (!empty($params['class']))?' class="'.$params['class'].'"':''; $style = (!empty($params['style']))?' style="'.$params['style'].'"':''; $title = (!empty($params['title']))?' title="'.$params['title'].'"':''; $module = ' module="'.$params['module'].'"'; $accesskey = (!empty($params['accesskey']))?' accesskey="'.$params['accesskey'].'" ':''; $options = (!empty($params['options']))?' '.$params['options'].'':''; if(!empty($params['data']) && is_array($params['data'])) $label =$params['data']['4']; elseif ( !empty($params['label']) ) $label = $params['label']; else $label = (!empty($GLOBALS['app_list_strings']['moduleList'][$params['module']]))?$GLOBALS['app_list_strings']['moduleList'][$params['module']]:$params['module']; $link = ''.$label.''; return $link; }