projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #3649 from colemanw/totten-colemanw-validate
[civicrm-core.git]
/
CRM
/
Admin
/
Page
/
Extensions.php
diff --git
a/CRM/Admin/Page/Extensions.php
b/CRM/Admin/Page/Extensions.php
index 9b52e7bbb5ab5de48649eedd3bc67b9384311d89..e41486d0ded9e1d65d298742df26c3ed1de5cdba 100644
(file)
--- a/
CRM/Admin/Page/Extensions.php
+++ b/
CRM/Admin/Page/Extensions.php
@@
-1,9
+1,9
@@
<?php
/*
+--------------------------------------------------------------------+
<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.
3
|
+ | CiviCRM version 4.
5
|
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-201
3
|
+ | Copyright CiviCRM LLC (c) 2004-201
4
|
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
@@
-29,7
+29,7
@@
* This is a part of CiviCRM extension management functionality.
*
* @package CRM
* This is a part of CiviCRM extension management functionality.
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-201
3
+ * @copyright CiviCRM LLC (c) 2004-201
4
* $Id$
*
*/
* $Id$
*
*/
@@
-58,7
+58,7
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
CRM_Utils_System::setTitle(ts('CiviCRM Extensions'));
$destination = CRM_Utils_System::url( 'civicrm/admin/extensions',
'reset=1' );
CRM_Utils_System::setTitle(ts('CiviCRM Extensions'));
$destination = CRM_Utils_System::url( 'civicrm/admin/extensions',
'reset=1' );
-
+
$destination = urlencode( $destination );
$this->assign( 'destination', $destination );
}
$destination = urlencode( $destination );
$this->assign( 'destination', $destination );
}
@@
-97,7
+97,6
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
'name' => ts('Disable'),
'url' => 'civicrm/admin/extensions',
'qs' => 'action=disable&id=%%id%%&key=%%key%%',
'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(
'title' => ts('Disable'),
),
CRM_Core_Action::DELETE => array(
@@
-164,9
+163,7
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
try {
$obj = $mapper->keyToInfo($key);
} catch (CRM_Extension_Exception $ex) {
try {
$obj = $mapper->keyToInfo($key);
} catch (CRM_Extension_Exception $ex) {
- CRM_Core_Session::setStatus(ts('Failed to read extension (%1). Please refresh the extension list.', array(
- 1 => $key,
- )));
+ CRM_Core_Session::setStatus(ts('Failed to read extension (%1). Please refresh the extension list.', array(1 => $key)));
continue;
}
continue;
}
@@
-199,8
+196,15
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
array(
'id' => $row['id'],
'key' => $obj->key,
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;
}
$localExtensionRows[$row['id']] = $row;
}
@@
-217,8
+221,18
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
array(
'id' => $row['id'],
'key' => $row['key'],
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);
$remoteExtensionRows[$row['id']] = $row;
}
$this->assign('remoteExtensionRows', $remoteExtensionRows);
@@
-245,6
+259,8
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
/**
* Get user context.
*
/**
* Get user context.
*
+ * @param null $mode
+ *
* @return string user context.
*/
function userContext($mode = NULL) {
* @return string user context.
*/
function userContext($mode = NULL) {
@@
-269,6
+285,8
@@
class CRM_Admin_Page_Extensions extends CRM_Core_Page_Basic {
*
* The result format resembles the old CRM_Core_Extensions_Extension.
*
*
* 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) {
* @return array
*/
public static function createExtendedInfo(CRM_Extension_Info $obj) {