Skip to content
Snippets Groups Projects
Commit adc13f86 authored by Kurund Jalmi's avatar Kurund Jalmi
Browse files

Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-11-03-17-29-16

parents fbd8ca69 efecdd6e
No related branches found
No related tags found
No related merge requests found
...@@ -217,6 +217,11 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic { ...@@ -217,6 +217,11 @@ class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
'key' => $row['key'], 'key' => $row['key'],
) )
); );
if (isset($localExtensionRows[$info->key])) {
if (version_compare($localExtensionRows[$info->key]['version'], $info->version, '<')) {
$row['is_upgradeable'] = TRUE;
}
}
$remoteExtensionRows[$row['id']] = $row; $remoteExtensionRows[$row['id']] = $row;
} }
$this->assign('remoteExtensionRows', $remoteExtensionRows); $this->assign('remoteExtensionRows', $remoteExtensionRows);
......
...@@ -22,7 +22,7 @@ Depends: CRM/common/enableDisable.tpl and CRM/common/jsortable.tpl ...@@ -22,7 +22,7 @@ Depends: CRM/common/enableDisable.tpl and CRM/common/jsortable.tpl
<tr id="row_{$row.id}" class="crm-extensions crm-extensions_{$row.id}{if $row.status eq 'disabled'} disabled{/if}{if $row.status eq 'installed-missing' or $row.status eq 'disabled-missing'} extension-missing{/if}{if $row.upgradable} extension-upgradable{elseif $row.status eq 'installed'} extension-installed{/if}"> <tr id="row_{$row.id}" class="crm-extensions crm-extensions_{$row.id}{if $row.status eq 'disabled'} disabled{/if}{if $row.status eq 'installed-missing' or $row.status eq 'disabled-missing'} extension-missing{/if}{if $row.upgradable} extension-upgradable{elseif $row.status eq 'installed'} extension-installed{/if}">
<td class="crm-extensions-label"> <td class="crm-extensions-label">
<a class="collapsed" href="#"></a>&nbsp;<strong>{$row.label}</strong><br/>({$row.key}) <a class="collapsed" href="#"></a>&nbsp;<strong>{$row.label}</strong><br/>({$row.key})
{if $extAddNewEnabled && $remoteExtensionRows[$extKey] && $row.version != $remoteExtensionRows[$extKey].version} {if $extAddNewEnabled && $remoteExtensionRows[$extKey] && $remoteExtensionRows[$extKey].is_upgradeable}
{capture assign='upgradeURL'}{crmURL p='civicrm/admin/extensions' q="action=update&id=$extKey&key=$extKey"}{/capture} {capture assign='upgradeURL'}{crmURL p='civicrm/admin/extensions' q="action=update&id=$extKey&key=$extKey"}{/capture}
<div class="crm-extensions-upgrade">{ts 1=$upgradeURL}Version {$remoteExtensionRows[$extKey].version} is available. <a href="%1">Upgrade</a>{/ts}</div> <div class="crm-extensions-upgrade">{ts 1=$upgradeURL}Version {$remoteExtensionRows[$extKey].version} is available. <a href="%1">Upgrade</a>{/ts}</div>
{/if} {/if}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment