<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.3 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* This is a part of CiviCRM extension management functionality.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
CRM_Utils_System::setTitle(ts('CiviCRM Extensions'));
$destination = CRM_Utils_System::url( 'civicrm/admin/extensions',
'reset=1' );
-
+
$destination = urlencode( $destination );
$this->assign( 'destination', $destination );
}
'name' => ts('Disable'),
'url' => 'civicrm/admin/extensions',
'qs' => 'action=disable&id=%%id%%&key=%%key%%',
- 'ref' => 'disable-action',
'title' => ts('Disable'),
),
CRM_Core_Action::DELETE => array(
array(
'id' => $row['id'],
'key' => $obj->key,
- )
+ ),
+ ts('more'),
+ FALSE,
+ 'extension.local.action',
+ 'Extension',
+ $row['id']
);
+ // Key would be better to send, but it's not an integer. Moreover, sending the
+ // values to hook_civicrm_links means that you can still get at the key
$localExtensionRows[$row['id']] = $row;
}
array(
'id' => $row['id'],
'key' => $row['key'],
- )
+ ),
+ ts('more'),
+ FALSE,
+ 'extension.remote.action',
+ 'Extension',
+ $row['id']
);
+ if (isset($localExtensionRows[$info->key])) {
+ if (version_compare($localExtensionRows[$info->key]['version'], $info->version, '<')) {
+ $row['is_upgradeable'] = TRUE;
+ }
+ }
$remoteExtensionRows[$row['id']] = $row;
}
$this->assign('remoteExtensionRows', $remoteExtensionRows);
/**
* Get user context.
*
+ * @param null $mode
+ *
* @return string user context.
*/
function userContext($mode = NULL) {
*
* The result format resembles the old CRM_Core_Extensions_Extension.
*
+ * @param CRM_Extension_Info $obj
+ *
* @return array
*/
public static function createExtendedInfo(CRM_Extension_Info $obj) {