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

Result as cards #528

Closed
Rikkirt opened this issue Apr 5, 2017 · 2 comments
Closed

Result as cards #528

Rikkirt opened this issue Apr 5, 2017 · 2 comments
Assignees
Labels
kind/fr Feature Request
Milestone

Comments

@Rikkirt
Copy link

Rikkirt commented Apr 5, 2017

Hello Rubén,

Great application, testing it for personal use right now.

When application admin sets the config parameter: Accounts -> results as cards -> true, a user still has the preference setting to view the account results as cards. In the code I saw that the config overrules the user-preference. If the user-preference has no effect, maybe it could be deactived, or perhaps not shown at all in the user preference?

Bug: version 2.1 (2.1.5.17040401)
Accountsearch.class.php line 652 Array is String
I get a Server error because in pickAccountColor(), accountColor is set as String, but the return value should be an array. I changed it in my local source to make it work.

Rikkirt

@nuxsmin nuxsmin added the kind/fr Feature Request label Apr 5, 2017
@nuxsmin nuxsmin self-assigned this Apr 5, 2017
@nuxsmin nuxsmin added this to the 2.1 milestone Apr 5, 2017
@nuxsmin
Copy link
Owner

nuxsmin commented Apr 5, 2017

Hello @Rikkirt

I'm glad that you liked it :)

You're right, some user prefs could be overridden by the global ones, so it would be fine to disable those set in the global config.

Regarding the color issue, I don't figure out what could be happening, because it doesn't occur on my testing environment, and analyzing the code it should never treat as string because there are some checks before:

        $accountColor = Session::getAccountColor();

        if (!is_array($accountColor)
            || !isset($accountColor, $accountColor[$id])
        ) {
            // Se asigna el color de forma aleatoria a cada id
            $color = array_rand(self::$colors);

            $accountColor[$id] = '#' . self::$colors[$color];
            Session::setAccountColor($accountColor);
        }

        return $accountColor[$id];

Are you running it on PHP 7.1?

Thanks for the feedback!

@Rikkirt
Copy link
Author

Rikkirt commented Apr 5, 2017

Hi Ruben,

Correct, for this test I'm running the latest PHP 7.1.3 with Apache2.4
(I have disabeld/hacked your version check 5.6> & <7.0.... to make it run on 7.1.3)

I've tested it today also with nginx/PHP 5.6. This gives no error.

Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/fr Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants