|
[F] [ACP] Weekdays select box in task manager [R] [C-Chris]
|
|
01-19-2009, 03:29 PM
Post: #1
|
|||
|
|||
|
[F] [ACP] Weekdays select box in task manager [R] [C-Chris]
If you add a task and select to run it every weekday the options "Every Weekday" and "Sunday" are shown as selected.
Steps to reproduce: 1. Add or edit a task and select to run it every day. Save the task. 2. Edit the task again. Now the options "Every Weekday" and "Sunday" are highlighted. Code: <option value="*" selected="selected">Every Weekday</option>Greets, Michael -------------
|
|||
|
01-29-2009, 07:04 PM
Post: #2
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
in admin/inc/class_form.php find:
PHP Code: if(!empty($selected) && ((string)$value == (string)$selected || (is_array($selected) && in_array($value, $selected))))replace with PHP Code: if(!empty($selected)) |
|||
|
01-29-2009, 10:33 PM
(This post was last modified: 01-29-2009 10:35 PM by Michael S..)
Post: #3
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
PHP Code: else if((is_string($value) || is_int($value)) && (string)$value == (string)$selected)) It seems to be an issue with * and 0. If I replace PHP Code: if(is_array($selected) && in_array($value, $selected)) PHP Code: if(is_array($selected) && in_array("{$value}", $selected)) Edit: http://www.php.net/manual/de/function.in....php#86695 http://www.php.net/manual/de/function.in....php#78524 http://www.php.net/manual/de/function.in....php#76857 Greets, Michael -------------
|
|||
|
01-29-2009, 10:43 PM
Post: #4
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
Ah. Just change in_array($value, $selected) to in_array($value, $selected, true) then
|
|||
|
01-29-2009, 11:48 PM
Post: #5
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
That's not working. It shows up fine if you selected "Every Weekday". If you select another day no day is selected if you edit the settings again. I see no problem if I change the code like I posted before.
Greets, Michael -------------
|
|||
|
01-30-2009, 01:37 AM
Post: #6
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
Ah that's right, nevermind. It's trying to compare a string to an integer. So instead we simply have to typecast it to a string. Try this, and this one should definately work: in_array((string)$value, $selected)
|
|||
|
01-30-2009, 01:55 AM
Post: #7
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
Yes, this is working.
Greets, Michael -------------
|
|||
|
01-30-2009, 01:56 AM
Post: #8
|
|||
|
|||
|
RE: [ACP] Weekdays select box in task manager
I can confirm it works as well
Elite-Area / Last.FM Profile / PSN Name: XDaciD / Minecraft Map Progress: Coming Soon! [Staff note - No referral links] |
|||
|
01-30-2009, 04:05 AM
Post: #9
|
|||
|
|||
|
[F] [ACP] Weekdays select box in task manager [R]
Thank you for your bug report.
This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated. With regards, MyBB Group |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help

![[Image: donation_drive_sig.png]](http://mybboard.net/assets/images/donation_drive_sig.png)

