Hi!
Even if there is an comment, waiting vor approval within comments-section, it isn't shown in dashboard
serendipity_event_dashboard version 0.6.2
Serendipity 1.6
bug within serendipity_event_dashboard...maybe
Re: bug within serendipity_event_dashboard...maybe
First of all, please check the "Number of pending comments to show" in your plugin settings and make sure it's greater than 0.
I've been looking at the plugin source code and maybe found the problem. But I need to ask other developers for help: What are the possible values for the status field in the comments table? Or, the other way round: What does a status = 'confirm' mean? And are there any more values besides 'approved', 'pending', and 'confirm'?
Garvin?
I've been looking at the plugin source code and maybe found the problem. But I need to ask other developers for help: What are the possible values for the status field in the comments table? Or, the other way round: What does a status = 'confirm' mean? And are there any more values besides 'approved', 'pending', and 'confirm'?
Garvin?
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: bug within serendipity_event_dashboard...maybe
Hi!
I believe approved, pending and confirm are the only ones. Approved comments are shown; pending are hidden and waiting for moderation. "confirm" is similar to pending, but means not the admin/owner of the blog needs to confirm, but the comment author himself.
Regards,
Garvin
I believe approved, pending and confirm are the only ones. Approved comments are shown; pending are hidden and waiting for moderation. "confirm" is similar to pending, but means not the admin/owner of the blog needs to confirm, but the comment author himself.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: bug within serendipity_event_dashboard...maybe
Ok, thanks Garvin, this could be the problem here. I will commit a fix later (or next year ).
Oh, and one more thing: Looking at serendipity_fetchComments I found the following code
$order and $where are both passend to the function as parameters. However: If $order is an empty string, but $where isn't, the resulting SQL will be invalid, right?
Oh, and one more thing: Looking at serendipity_fetchComments I found the following code
Code: Select all
ORDER BY
" . ($where != '' ? '' : 'co.id') . " " . ($order != '' ? $order : '') . "
Code: Select all
SELECT ... FROM ... WHERE ... ORDER BY;
Re: bug within serendipity_event_dashboard...maybe
Thank you for your answers So i'll wait for an update of dashboard.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: bug within serendipity_event_dashboard...maybe
Hi!
I believe the code currently suggest that order can only be used, if where is also used...
Regard,s
Garvin
I believe the code currently suggest that order can only be used, if where is also used...
Regard,s
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: bug within serendipity_event_dashboard...maybe
Ok, I committed the update, it should be available via Spartacus tomorrow. If it doesn't fix your problem, please do tellbernd_d wrote:Thank you for your answers So i'll wait for an update of dashboard.
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Re: bug within serendipity_event_dashboard...maybe
I stumbled on the same part of code. It is in fact the case, that $order is ignored if no $where is given, what seemed wrong to me, as you may want to order by date ASC or DESC in example but don't need no $where.. (well I wanted this.. )garvinhicking wrote: believe the code currently suggest that order can only be used, if where is also used...
-
- Regular
- Posts: 695
- Joined: Tue Jul 03, 2007 3:34 am
- Location: Berlin, Germany
- Contact:
Re: bug within serendipity_event_dashboard...maybe
Code: Select all
ORDER BY
" . ($where != '' ? '' : 'co.id') . " " . ($order != '' ? $order : '') . "
If $where and $limit is set, but $order not, this produces:
ORDER BY LIMIT ..
That is wrong (and not understandable) code. I guess it should be
Code: Select all
ORDER BY
" . (empty($order) ? 'co.id' : $order) . "
Code: Select all
ORDER BY
" . ($order != '' ? '' : 'co.id') . " " . ($order != '' ? $order : '') . "
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: bug within serendipity_event_dashboard...maybe
Hi!
That sounds about right, thanks for looking. %-)
That sounds about right, thanks for looking. %-)
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/