Skip to content

Commit

Permalink
changed: updated for Elgg 4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Jan 11, 2022
1 parent 1b7ff75 commit 0b4ca27
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Entity view counter

![Elgg 4.0](https://img.shields.io/badge/Elgg-4.0-green.svg)
![Elgg 4.1](https://img.shields.io/badge/Elgg-4.1-green.svg)
[![Build Status](https://scrutinizer-ci.com/g/ColdTrick/entity_view_counter/badges/build.png?b=master)](https://scrutinizer-ci.com/g/ColdTrick/entity_view_counter/build-status/master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ColdTrick/entity_view_counter/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ColdTrick/entity_view_counter/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/coldtrick/entity_view_counter/v/stable.svg)](https://packagist.org/packages/coldtrick/entity_view_counter)
Expand Down
2 changes: 1 addition & 1 deletion classes/ColdTrick/EntityViewCounter/Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function ready() {
*/
protected function addViewCounter() {
// extend views of configured entity types/subtypes
$registered_types = get_registered_entity_types();
$registered_types = elgg_entity_types_with_capability('searchable');
if (empty($registered_types)) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"coldtrick/sniffs": "dev-master"
},
"conflict": {
"elgg/elgg": "<4.0"
"elgg/elgg": "<4.1"
}
}
13 changes: 11 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion views/default/plugins/entity_view_counter/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Elgg\Database\Select;

$object_types = (array) get_registered_entity_types('object');
$object_types = elgg_extract('object', elgg_entity_types_with_capability('searchable'), []);

echo elgg_view('output/longtext', [
'value' => elgg_echo('entity_view_counter:settings:description'),
Expand Down

0 comments on commit 0b4ca27

Please sign in to comment.