Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-7051: Preview button with siteaccess #995

Merged
merged 7 commits into from
Nov 22, 2023

Conversation

tischsoic
Copy link
Contributor

@tischsoic tischsoic commented Nov 18, 2023

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-7051
Bug fix? no
New feature? yes
BC breaks? no
Tests pass? yes
Doc needed? yes/no
License GPL-2.0

Related PRs:

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@tischsoic tischsoic self-assigned this Nov 18, 2023
@tischsoic tischsoic marked this pull request as ready for review November 20, 2023 09:18
src/lib/UI/Module/ContentTree/NodeFactory.php Outdated Show resolved Hide resolved
src/lib/UI/Module/ContentTree/NodeFactory.php Outdated Show resolved Hide resolved
src/lib/UI/Module/ContentTree/NodeFactory.php Outdated Show resolved Hide resolved
@konradoboza konradoboza requested a review from a team November 20, 2023 09:23
src/bundle/Controller/ContentController.php Outdated Show resolved Hide resolved
src/lib/UI/Module/ContentTree/NodeFactory.php Outdated Show resolved Hide resolved
src/lib/UI/Module/ContentTree/NodeFactory.php Outdated Show resolved Hide resolved
Copy link
Contributor

@konradoboza konradoboza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit safer, but it's optional.

@@ -340,7 +349,7 @@ private function buildNode(
$children = [];
if ($loadChildren && $depth < $this->getSetting('tree_max_depth')) {
$searchResult = $this->findSubitems($location, $limit, $offset, $sortClause, $sortOrder);
$totalChildrenCount = $searchResult->totalCount;
$totalChildrenCount = (int) $searchResult->totalCount;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$totalChildrenCount = (int) $searchResult->totalCount;
$totalChildrenCount = $searchResult->totalCount === null ? 0 : (int)$searchResult->totalCount;

@konradoboza konradoboza requested a review from a team November 20, 2023 14:07
@tischsoic tischsoic force-pushed the IBX-7051-preview-btn-with-siteaccess branch from 450e330 to f962ad1 Compare November 21, 2023 12:01
Copy link

sonarcloud bot commented Nov 21, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug B 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@webhdx
Copy link
Contributor

webhdx commented Nov 21, 2023

@tischsoic have you evaluated Sonar Cloud bug report?

@tischsoic
Copy link
Contributor Author

I run regressions in: ibexa/headless#31
Currently waiting for the results.

@tischsoic tischsoic merged commit 44a14fa into main Nov 22, 2023
20 of 23 checks passed
@tischsoic tischsoic deleted the IBX-7051-preview-btn-with-siteaccess branch November 22, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants