Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
c657d3e7
Commit
c657d3e7
authored
8 years ago
by
eileen
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #8343 from coldrunKacper/skip-components-in-disabled-extensions
'Components inside disabled Extensions' issue fix.
parents
4ff2526e
ca1e39b1
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CRM/Core/Component.php
+5
-1
5 additions, 1 deletion
CRM/Core/Component.php
CRM/Core/OptionValue.php
+11
-1
11 additions, 1 deletion
CRM/Core/OptionValue.php
with
16 additions
and
2 deletions
CRM/Core/Component.php
+
5
−
1
View file @
c657d3e7
...
...
@@ -99,7 +99,11 @@ class CRM_Core_Component {
$cr
->
find
(
FALSE
);
while
(
$cr
->
fetch
())
{
$infoClass
=
$cr
->
namespace
.
'_'
.
self
::
COMPONENT_INFO_CLASS
;
require_once
(
str_replace
(
'_'
,
DIRECTORY_SEPARATOR
,
$infoClass
)
.
'.php'
);
$infoClassFile
=
str_replace
(
'_'
,
DIRECTORY_SEPARATOR
,
$infoClass
)
.
'.php'
;
if
(
!
CRM_Utils_File
::
isIncludable
(
$infoClassFile
))
{
continue
;
}
require_once
$infoClassFile
;
$infoObject
=
new
$infoClass
(
$cr
->
name
,
$cr
->
namespace
,
$cr
->
id
);
if
(
$infoObject
->
info
[
'name'
]
!==
$cr
->
name
)
{
CRM_Core_Error
::
fatal
(
"There is a discrepancy between name in component registry and in info file (
{
$cr
->
name
}
)."
);
...
...
This diff is collapsed.
Click to expand it.
CRM/Core/OptionValue.php
+
11
−
1
View file @
c657d3e7
...
...
@@ -64,13 +64,16 @@ class CRM_Core_OptionValue {
* @param array $groupParams Array containing group fields whose option-values is to retrieved.
* @param string $orderBy for orderBy clause
* @param array $links has links like edit, delete, disable ..etc
* @param bool $skipEmptyComponents
* whether to skip OptionValue rows with empty Component name
* (i.e. when Extension providing the Component is disabled)
*
* @return array of option-values
*
* @access public
* @static
*/
static
function
getRows
(
$groupParams
,
$links
,
$orderBy
=
'weight'
)
{
static
function
getRows
(
$groupParams
,
$links
,
$orderBy
=
'weight'
,
$skipEmptyComponents
=
TRUE
)
{
$optionValue
=
array
();
$optionGroupID
=
NULL
;
...
...
@@ -118,6 +121,13 @@ class CRM_Core_OptionValue {
while
(
$dao
->
fetch
())
{
$optionValue
[
$dao
->
id
]
=
array
();
CRM_Core_DAO
::
storeValues
(
$dao
,
$optionValue
[
$dao
->
id
]);
if
(
!
empty
(
$optionValue
[
$dao
->
id
][
'component_id'
])
&&
empty
(
$componentNames
[
$optionValue
[
$dao
->
id
][
'component_id'
]])
&&
$skipEmptyComponents
)
{
unset
(
$optionValue
[
$dao
->
id
]);
continue
;
}
// form all action links
$action
=
array_sum
(
array_keys
(
$links
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment