Permalink
Browse files

Release 6.2.1

  • Loading branch information...
1 parent 86ce033 commit 68b9a688b93f7ebc3a76c11850bb809178ab0470 John Mertic committed Jul 15, 2011
Showing 302 changed files with 3,590 additions and 867 deletions.
View
@@ -5023,7 +5023,9 @@ function bean_implements($interface)
function ACLAccess($view,$is_owner='not_set')
{
global $current_user;
- if(is_admin($current_user)||is_admin_for_module($current_user,$this->getACLCategory()))return true;
+ if($current_user->isAdminForModule($this->getACLCategory())) {
+ return true;
+ }
$not_set = false;
if($is_owner == 'not_set')
{
View
258 files.md5

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -203,7 +203,11 @@ function processDisplayOptions() {
$currentSearchFields[$name] = array();
$widgetDef = $this->seedBean->field_defs[$name];
if($widgetDef['type'] == 'enum') $widgetDef['remove_blank'] = true; // remove the blank option for the dropdown
- if($widgetDef['name'] == 'assigned_user_name') $widgetDef['name'] = 'assigned_user_id';
+ if($widgetDef['name'] == 'assigned_user_name') $widgetDef['name'] = 'assigned_user_id';
+ //bug 39170 - begin
+ if($widgetDef['name'] == 'created_by_name') $name = $widgetDef['name'] = 'created_by';
+ if($widgetDef['name'] == 'modified_by_name') $name = $widgetDef['name'] = 'modified_user_id';
+ //bug 39170 - end
$widgetDef['input_name0'] = empty($this->filters[$name]) ? '' : $this->filters[$name];
$currentSearchFields[$name]['label'] = !empty($params['label']) ? translate($params['label'], $this->seedBean->module_dir) : translate($widgetDef['vname'], $this->seedBean->module_dir);
$currentSearchFields[$name]['input'] = $this->layoutManager->widgetDisplayInput($widgetDef, true, (empty($this->filters[$name]) ? '' : $this->filters[$name]));
@@ -235,7 +239,7 @@ function processDisplayOptions() {
$displayRowOptions = $GLOBALS['sugar_config']['dashlet_display_row_options'];
$this->configureSS->assign('displayRowOptions', $displayRowOptions);
$this->configureSS->assign('displayRowSelect', $this->displayRows);
-
+
if($this->isAutoRefreshable()) {
$this->configureSS->assign('isRefreshable', true);
$this->configureSS->assign('autoRefreshOptions', $this->getAutoRefreshOptions());
@@ -329,11 +333,11 @@ protected function loadCustomMetadata()
break;
}
}
-
+
$this->columns = $dashletData[$this->seedBean->module_dir.'Dashlet']['columns'];
}
}
-
+
/**
* Does all dashlet processing, here's your chance to modify the rows being displayed!
*/
@@ -350,7 +354,7 @@ function process($lvsParams = array()) {
if(isset($this->filters) || $this->myItemsOnly) {
$whereArray = $this->buildWhere();
}
-
+
$this->lvs->export = false;
$this->lvs->multiSelect = false;
// columns
@@ -359,9 +363,9 @@ function process($lvsParams = array()) {
foreach($this->displayColumns as $name => $val) {
$displayColumns[strtoupper($val)] = $this->columns[$val];
$displayColumns[strtoupper($val)]['label'] = trim($displayColumns[strtoupper($val)]['label'], ':');// strip : at the end of headers
- }
+ }
}
- else if (isset($this->columns)){
+ else if (isset($this->columns)){
// use the default
foreach($this->columns as $name => $val) {
if(!empty($val['default']) && $val['default']) {
@@ -377,18 +381,27 @@ function process($lvsParams = array()) {
$lvdOrderBy = $this->lvs->lvd->getOrderBy(); // has this list been ordered, if not use default
$nameRelatedFields = array();
- if(empty($lvdOrderBy['orderBy'])) {
- foreach($displayColumns as $colName => $colParams) {
- if(!empty($colParams['defaultOrderColumn'])) {
- $lvsParams['overrideOrder'] = true;
- $lvsParams['orderBy'] = $colName;
- $lvsParams['sortOrder'] = $colParams['defaultOrderColumn']['sortOrder'];
+
+ //bug: 44592 - dashlet sort order was not being preserved between logins
+ if(!empty($lvsParams['orderBy']) && !empty($lvsParams['sortOrder']))
+ {
+ $lvsParams['overrideOrder'] = true;
+ }
+ else
+ {
+ if(empty($lvdOrderBy['orderBy'])) {
+ foreach($displayColumns as $colName => $colParams) {
+ if(!empty($colParams['defaultOrderColumn'])) {
+ $lvsParams['overrideOrder'] = true;
+ $lvsParams['orderBy'] = $colName;
+ $lvsParams['sortOrder'] = $colParams['defaultOrderColumn']['sortOrder'];
+ }
}
}
}
// Check for 'last_name' column sorting with related fields (last_name, first_name)
// See ListViewData.php for actual sorting change.
- if ($lvdOrderBy['orderBy'] == 'last_name' && !empty($displayColumns['NAME']) && !empty($displayColumns['NAME']['related_fields']) &&
+ if ($lvdOrderBy['orderBy'] == 'last_name' && !empty($displayColumns['NAME']) && !empty($displayColumns['NAME']['related_fields']) &&
in_array('last_name', $displayColumns['NAME']['related_fields']) &&
in_array('first_name', $displayColumns['NAME']['related_fields'])) {
$lvsParams['overrideLastNameOrder'] = true;
@@ -445,6 +458,10 @@ function saveOptions($req) {
$options['filters'] = array();
foreach($this->searchFields as $name=>$params) {
$widgetDef = $this->seedBean->field_defs[$name];
+ //bug39170 - begin
+ if($widgetDef['name']=='created_by_name' && $req['created_by']) $widgetDef['name'] = 'created_by';
+ if($widgetDef['name']=='modified_by_name' && $req['modified_user_id']) $widgetDef['name'] = 'modified_user_id';
+ //bug39170 - end
if($widgetDef['type'] == 'datetimecombo' || $widgetDef['type'] == 'datetime' || $widgetDef['type'] == 'date') { // special case datetime types
$options['filters'][$widgetDef['name']] = array();
if(!empty($req['type_' . $widgetDef['name']])) { // save the type of date filter
@@ -497,7 +514,7 @@ function addCustomFields() {
$this->columns[$fieldName] = array('width' => '10',
'label' => $translated);
}
-
+
}
}
}
@@ -47,26 +47,26 @@
<table border='0' cellpadding='0' cellspacing='0' width='100%'>
<tr>
<td align='left'>&nbsp;</td>
- <td align='right' nowrap='nowrap'>
+ <td align='right' nowrap='nowrap'>
{if $pageData.urls.startPage}
<!--<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.startPage}")' ><img src='{sugar_getimagepath file="start.png"}' alt='{$navStrings.start}' align='absmiddle' border='0' width='14' height='13'>&nbsp;{$navStrings.start}</a>&nbsp;-->
<button title='{$navStrings.start}' class='button' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.startPage}")'>
<img src='{sugar_getimagepath file='start.png'}' alt='{$navStrings.start}' align='absmiddle' border='0'>
</button>
-
+
{else}
<!--<img src='{sugar_getimagepath file="start_off.png"}' alt='{$navStrings.start}' align='absmiddle' border='0'>&nbsp;{$navStrings.start}&nbsp;&nbsp;-->
<button title='{$navStrings.start}' class='button' disabled>
<img src='{sugar_getimagepath file='start_off.png'}' alt='{$navStrings.start}' align='absmiddle' border='0'>
</button>
-
+
{/if}
{if $pageData.urls.prevPage}
<!--<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.prevPage}")' ><img src='{sugar_getimagepath file="previous.png"}' alt='{$navStrings.previous}' align='absmiddle' border='0' width='8' height='13'>&nbsp;{$navStrings.previous}</a>&nbsp;-->
<button title='{$navStrings.previous}' class='button' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.prevPage}")'>
- <img src='{sugar_getimagepath file='previous.png'}' alt='{$navStrings.previous}' align='absmiddle' border='0'>
+ <img src='{sugar_getimagepath file='previous.png'}' alt='{$navStrings.previous}' align='absmiddle' border='0'>
</button>
-
+
{else}
<!--<img src='{sugar_getimagepath file="previous_off.png"}' alt='{$navStrings.previous}' align='absmiddle' border='0' width='8' height='13'>&nbsp;{$navStrings.previous}&nbsp;-->
<button class='button' disabled title='{$navStrings.previous}'>
@@ -79,7 +79,7 @@
<button title='{$navStrings.next}' class='button' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.nextPage}")'>
<img src='{sugar_getimagepath file='next.png'}' alt='{$navStrings.next}' align='absmiddle' border='0'>
</button>
-
+
{else}
<!-- &nbsp;{$navStrings.next}&nbsp;<img src='{sugar_getimagepath file="next_off.png"}' alt='{$navStrings.next}' align='absmiddle' border='0' width='8' height='13'>-->
<button class='button' title='{$navStrings.next}' disabled>
@@ -90,15 +90,15 @@
{if $pageData.urls.endPage && $pageData.offsets.total != $pageData.offsets.lastOffsetOnPage}
<!--<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.endPage}")' >{$navStrings.end}&nbsp;<img src='{sugar_getimagepath file="end.png"}' alt='{$navStrings.end}' align='absmiddle' border='0' width='14' height='13'></a></td>-->
<button title='{$navStrings.end}' class='button' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.endPage}")'>
- <img src='{sugar_getimagepath file='end.png'}' alt='{$navStrings.end}' align='absmiddle' border='0'>
+ <img src='{sugar_getimagepath file='end.png'}' alt='{$navStrings.end}' align='absmiddle' border='0'>
</button>
-
+
{elseif !$pageData.offsets.totalCounted || $pageData.offsets.total == $pageData.offsets.lastOffsetOnPage}
<!--&nbsp;{$navStrings.end}&nbsp;<img src='{sugar_getimagepath file="end_off.png"}' alt='{$navStrings.end}' align='absmiddle' border='0' width='14' height='13'>-->
<button class='button' disabled title='{$navStrings.end}'>
<img src='{sugar_getimagepath file='end_off.png'}' alt='{$navStrings.end}' align='absmiddle' border='0'>
</button>
-
+
{/if}
</td>
</tr>
@@ -109,7 +109,7 @@
{foreach from=$displayColumns key=colHeader item=params}
<th scope='col' width='{$params.width}%' nowrap="nowrap">
<div style='white-space: nowrap;'width='100%' align='{$params.align|default:'left'}'>
- {if $params.sortable|default:true}
+ {if $params.sortable|default:true}
<a href='#' onclick='return SUGAR.mySugar.retrieveDashlet("{$dashletId}", "{$pageData.urls.orderBy}{$params.orderBy|default:$colHeader|lower}&sugar_body_only=1&id={$dashletId}")' class='listViewThLinkS1'>{sugar_translate label=$params.label module=$pageData.bean.moduleDir}</a>&nbsp;&nbsp;
{if $params.orderBy|default:$colHeader|lower == $pageData.ordering.orderBy}
{if $pageData.ordering.sortOrder == 'ASC'}
@@ -124,7 +124,7 @@
<img border='0' src='{sugar_getimagepath file=$imageName}' width='{$arrowWidth}' height='{$arrowHeight}' align='absmiddle' alt='{$arrowAlt}'>
{/if}
{else}
- {if !isset($params.noHeader) || $params.noHeader == false}
+ {if !isset($params.noHeader) || $params.noHeader == false}
{sugar_translate label=$params.label module=$pageData.bean.moduleDir}
{/if}
{/if}
@@ -135,7 +135,7 @@
<th scope='col' nowrap="nowrap" width='1%'>&nbsp;</th>
{/if}
</tr>
-
+
{foreach name=rowIteration from=$data key=id item=rowData}
{if $smarty.foreach.rowIteration.iteration is odd}
{assign var='_rowColor' value=$rowColor[0]}
@@ -153,12 +153,12 @@
{strip}
<td scope='row' align='{$params.align|default:'left'}' valign="top" {if ($params.type == 'teamset')}class="nowrap"{/if}>
{if $col == 'NAME' || $params.bold}<b>{/if}
- {if $params.link && !$params.customCode}
+ {if $params.link && !$params.customCode}
<{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN} href='index.php?action={$params.action|default:'DetailView'}&module={if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}&record={$rowData[$params.id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}'>
{/if}
- {if $params.customCode}
+ {if $params.customCode}
{sugar_evalcolumn_old var=$params.customCode rowData=$rowData}
- {else}
+ {else}
{sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col}
{/if}
{if empty($rowData.$col) && empty($params.customCode)}&nbsp;{/if}
@@ -173,10 +173,10 @@
{if !empty($quickViewLinks)}
<td width='1%' class='{$_rowColor}S1' bgcolor='{$_bgColor}' nowrap>
{if $pageData.access.edit}
- <a title='{$editLinkString}' href='index.php?action=EditView&module={$params.module|default:$pageData.bean.moduleDir}&record={$rowData[$params.parent_id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module=Home&return_action=index'><img border="0" src="{sugar_getimagepath file="edit_inline.png"}"></a>
+ <a title='{$editLinkString}' href='index.php?action=EditView&module={$pageData.bean.moduleDir}&record={$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module=Home&return_action=index'><img border="0" src="{sugar_getimagepath file="edit_inline.png"}"></a>
{/if}
{if $pageData.access.view}
- <a title='{$viewLinkString}' href='index.php?action=DetailView&module={$params.module|default:$pageData.bean.moduleDir}&record={$rowData[$params.parent_id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module=Home&return_action=index'><img border="0" src="{sugar_getimagepath file="view_inline.png"}"></a>
+ <a title='{$viewLinkString}' href='index.php?action=DetailView&module={$pageData.bean.moduleDir}&record={$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module=Home&return_action=index'><img border="0" src="{sugar_getimagepath file="view_inline.png"}"></a>
{/if}
</td>
{/if}
@@ -79,7 +79,7 @@
{counter name="colCounter"}
{/foreach}
</tr>
-
+
{foreach name=rowIteration from=$data key=id item=rowData}
{if $smarty.foreach.rowIteration.iteration is odd}
{assign var='_rowColor' value=$rowColor[0]}
@@ -90,7 +90,7 @@
{if !empty($quickViewLinks)}
<td width='1%' nowrap>
{if $pageData.access.edit && $pageData.bean.moduleDir != "Employees"}
- <a title='{$editLinkString}' href='index.php?action=EditView&module={$params.module|default:$pageData.bean.moduleDir}&record={$rowData[$params.id]|default:$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module={$params.module|default:$pageData.bean.moduleDir}'><img border="0" src="{sugar_getimagepath file="edit_inline.gif"}"></a>
+ <a title='{$editLinkString}' href='index.php?action=EditView&module={$pageData.bean.moduleDir}&record={$rowData.ID}&offset={$pageData.offsets.current+$smarty.foreach.rowIteration.iteration}&stamp={$pageData.stamp}&return_module={$pageData.bean.moduleDir}'><img border="0" src="{sugar_getimagepath file="edit_inline.gif"}"></a>
{/if}
</td>
{/if}
@@ -101,9 +101,9 @@
{if $params.link && !$params.customCode}
<{$pageData.tag.$id[$params.ACLTag]|default:$pageData.tag.$id.MAIN} href="#" onMouseOver="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}', '{$rowData[$params.id]|default:$rowData.ID}', 'd', {$smarty.foreach.rowIteration.iteration}, this);" onFocus="javascript:lvg_nav('{if $params.dynamic_module}{$rowData[$params.dynamic_module]}{else}{$params.module|default:$pageData.bean.moduleDir}{/if}', '{$rowData[$params.id]|default:$rowData.ID}', 'd', {$smarty.foreach.rowIteration.iteration}, this);">
{/if}
- {if $params.customCode}
+ {if $params.customCode}
{sugar_evalcolumn_old var=$params.customCode rowData=$rowData}
- {else}
+ {else}
{sugar_field parentFieldArray=$rowData vardef=$params displayType=ListView field=$col}
{/if}
{if empty($rowData.$col)}&nbsp;{/if}
@@ -120,13 +120,13 @@
<td colspan="{$colCount}">
<em>{$APP.LBL_NO_DATA}</em>
</td>
- </tr>
+ </tr>
{/foreach}
{include file='include/ListView/ListViewPagination.tpl'}
</table>
<script type='text/javascript'>
{literal}function lvg_nav(m,id,act,offset,t){if(t.href.search(/#/) < 0){return;}else{if(act=='pte'){act='ProjectTemplatesEditView';}else if(act=='d'){ act='DetailView';}else if( act =='ReportsWizard'){act = 'ReportsWizard';}else{ act='EditView';}{/literal}url = 'index.php?module='+m+'&offset=' + offset + '&stamp={$pageData.stamp}&return_module='+m+'&action='+act+'&record='+id;t.href=url;{literal}}}{/literal}
-{literal}function lvg_dtails(id){{/literal}return SUGAR.util.getAdditionalDetails( '{$params.module|default:$pageData.bean.moduleDir}',id, 'adspan_'+id);{literal}}{/literal}
+{literal}function lvg_dtails(id){{/literal}return SUGAR.util.getAdditionalDetails( '{$pageData.bean.moduleDir}',id, 'adspan_'+id);{literal}}{/literal}
{if $contextMenus}
{$contextMenuScript}
{/if}
@@ -153,8 +153,8 @@ function process($file, $data, $htmlVar) {
$this->ss->assign('rowColor', array('oddListRow', 'evenListRow'));
$this->ss->assign('bgColor', array($odd_bg, $even_bg));
$this->ss->assign('contextMenus', $this->contextMenus);
- $this->ss->assign('is_admin_for_user', is_admin_for_module($GLOBALS['current_user'],'Users'));
- $this->ss->assign('is_admin', is_admin($GLOBALS['current_user']));
+ $this->ss->assign('is_admin_for_user', $GLOBALS['current_user']->isAdminForModule('Users'));
+ $this->ss->assign('is_admin', $GLOBALS['current_user']->isAdmin());
if($this->contextMenus && !empty($contextMenuObjectsTypes)) {
@@ -43,6 +43,7 @@
* Contributor(s): ______________________________________..
********************************************************************************/
$entry_point_registry = array(
+ 'emailImage' => array('file' => 'modules/EmailMan/EmailImage.php', 'auth' => false),
'download' => array('file' => 'download.php', 'auth' => true),
'export' => array('file' => 'export.php', 'auth' => true),
'export_dataset' => array('file' => 'export_dataset.php', 'auth' => true),
@@ -281,7 +281,7 @@ function handleOfflineClient(){
* Handles everything related to authorization.
*/
function handleAccessControl(){
- if(is_admin($GLOBALS['current_user']) || is_admin_for_any_module($GLOBALS['current_user']))
+ if($GLOBALS['current_user']->isDeveloperForAnyModule())
return;
if(!empty($_REQUEST['action']) && $_REQUEST['action']=="RetrieveEmail")
return;
Oops, something went wrong.

0 comments on commit 68b9a68

Please sign in to comment.