@@ -1009,8 +1009,9 @@ discard block |
||
| 1009 | 1009 | $blog_post_actions .= '</a>'; |
| 1010 | 1010 | } |
| 1011 | 1011 | |
| 1012 | - if (api_is_allowed('BLOG_' . $blog_id, 'article_rate')) |
|
| 1013 | - $rating_select = Blog::display_rating_form('post',$blog_id,$post_id); |
|
| 1012 | + if (api_is_allowed('BLOG_' . $blog_id, 'article_rate')) { |
|
| 1013 | + $rating_select = Blog::display_rating_form('post',$blog_id,$post_id); |
|
| 1014 | + } |
|
| 1014 | 1015 | |
| 1015 | 1016 | $blog_post_text=stripslashes($blog_post_text); |
| 1016 | 1017 | |
@@ -1654,8 +1655,9 @@ discard block |
||
| 1654 | 1655 | |
| 1655 | 1656 | $arrPermissions = array(); |
| 1656 | 1657 | |
| 1657 | - while ($row = Database::fetch_array($result)) |
|
| 1658 | - $arrPermissions[] = $row['action']; |
|
| 1658 | + while ($row = Database::fetch_array($result)) { |
|
| 1659 | + $arrPermissions[] = $row['action']; |
|
| 1660 | + } |
|
| 1659 | 1661 | |
| 1660 | 1662 | echo '<tr>'; |
| 1661 | 1663 | echo '<td style="text-align:right; vertical-align:top;">' . get_lang('TaskManager') . ': </td>'; |
@@ -2332,8 +2334,9 @@ discard block |
||
| 2332 | 2334 | //Handle leap year |
| 2333 | 2335 | $numberofdays = array (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); |
| 2334 | 2336 | |
| 2335 | - if(($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) |
|
| 2336 | - $numberofdays[2] = 29; |
|
| 2337 | + if(($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0)) { |
|
| 2338 | + $numberofdays[2] = 29; |
|
| 2339 | + } |
|
| 2337 | 2340 | |
| 2338 | 2341 | //Get the first day of the month |
| 2339 | 2342 | $dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); |
@@ -2363,8 +2366,9 @@ discard block |
||
| 2363 | 2366 | if( Database::num_rows($result) > 0) { |
| 2364 | 2367 | while($blog_post = Database::fetch_array($result)) { |
| 2365 | 2368 | // If the day of this post is not yet in the array, add it. |
| 2366 | - if (!in_array($blog_post['post_day'], $posts)) |
|
| 2367 | - $posts[] = $blog_post['post_day']; |
|
| 2369 | + if (!in_array($blog_post['post_day'], $posts)) { |
|
| 2370 | + $posts[] = $blog_post['post_day']; |
|
| 2371 | + } |
|
| 2368 | 2372 | } |
| 2369 | 2373 | } |
| 2370 | 2374 | |
@@ -2403,8 +2407,9 @@ discard block |
||
| 2403 | 2407 | |
| 2404 | 2408 | echo "<tr>\n"; |
| 2405 | 2409 | |
| 2406 | - for($ii = 1; $ii < 8; $ii ++) |
|
| 2407 | - echo "<td class=\"weekdays\">", $DaysShort[$ii % 7], "</td>"; |
|
| 2410 | + for($ii = 1; $ii < 8; $ii ++) { |
|
| 2411 | + echo "<td class=\"weekdays\">", $DaysShort[$ii % 7], "</td>"; |
|
| 2412 | + } |
|
| 2408 | 2413 | |
| 2409 | 2414 | echo "</tr>"; |
| 2410 | 2415 | |
@@ -2414,8 +2419,9 @@ discard block |
||
| 2414 | 2419 | while ($curday <= $numberofdays[$month]) { |
| 2415 | 2420 | echo "<tr>"; |
| 2416 | 2421 | for ($ii = 0; $ii < 7; $ii ++) { |
| 2417 | - if (($curday == -1) && ($ii == $startdayofweek)) |
|
| 2418 | - $curday = 1; |
|
| 2422 | + if (($curday == -1) && ($ii == $startdayofweek)) { |
|
| 2423 | + $curday = 1; |
|
| 2424 | + } |
|
| 2419 | 2425 | |
| 2420 | 2426 | if (($curday > 0) && ($curday <= $numberofdays[$month])) { |
| 2421 | 2427 | $bgcolor = $ii < 5 ? $class="class=\"days_week\"" : $class="class=\"days_weekend\""; |
@@ -2429,10 +2435,11 @@ discard block |
||
| 2429 | 2435 | echo "<td " . $class.">"; |
| 2430 | 2436 | |
| 2431 | 2437 | // If there are posts on this day, create a filter link. |
| 2432 | - if(in_array($curday, $posts)) |
|
| 2433 | - echo '<a href="blog.php?blog_id=' . $blog_id . '&filter=' . $year . '-' . $month . '-' . $curday . '&month=' . $month . '&year=' . $year . '" title="' . get_lang('ViewPostsOfThisDay') . '">' . $curday . '</a>'; |
|
| 2434 | - else |
|
| 2435 | - echo $dayheader; |
|
| 2438 | + if(in_array($curday, $posts)) { |
|
| 2439 | + echo '<a href="blog.php?blog_id=' . $blog_id . '&filter=' . $year . '-' . $month . '-' . $curday . '&month=' . $month . '&year=' . $year . '" title="' . get_lang('ViewPostsOfThisDay') . '">' . $curday . '</a>'; |
|
| 2440 | + } else { |
|
| 2441 | + echo $dayheader; |
|
| 2442 | + } |
|
| 2436 | 2443 | |
| 2437 | 2444 | if (count($tasks) > 0) { |
| 2438 | 2445 | if (isset($tasks[$curday]) && is_array($tasks[$curday])) { |
@@ -2446,8 +2453,9 @@ discard block |
||
| 2446 | 2453 | |
| 2447 | 2454 | echo "</td>"; |
| 2448 | 2455 | $curday ++; |
| 2449 | - } else |
|
| 2450 | - echo "<td> </td>"; |
|
| 2456 | + } else { |
|
| 2457 | + echo "<td> </td>"; |
|
| 2458 | + } |
|
| 2451 | 2459 | } |
| 2452 | 2460 | echo "</tr>"; |
| 2453 | 2461 | } |