| @@ 202-211 (lines=10) @@ | ||
| 199 | } else { |
|
| 200 | $tmpstory = $permstory; |
|
| 201 | } |
|
| 202 | } else { // Use the most recent news |
|
| 203 | $stories = array(); |
|
| 204 | $stories = NewsStory::getAllPublished(1, 0, $restricted, 0, 1, true, $options[0]); |
|
| 205 | if (count($stories) > 0) { |
|
| 206 | $firststory = $stories[0]; |
|
| 207 | $tmpstory->NewsStory($firststory->storyid()); |
|
| 208 | } else { |
|
| 209 | $block['use_spotlight'] = false; |
|
| 210 | } |
|
| 211 | } |
|
| 212 | $spotlight = array(); |
|
| 213 | $spotlight['title'] = $tmpstory->title(); |
|
| 214 | if ($options[7] !== '') { |
|
| @@ 535-544 (lines=10) @@ | ||
| 532 | } else { |
|
| 533 | $block['use_spotlight'] = false; |
|
| 534 | } |
|
| 535 | } else { // Use the most recent news |
|
| 536 | $stories = array(); |
|
| 537 | $stories = NewsStory::getAllPublished(1, 0, $restricted, 0, 1, true, $options[0]); |
|
| 538 | if (count($stories) > 0) { |
|
| 539 | $firststory = $stories[0]; |
|
| 540 | $spotlightArticle = new NewsStory($firststory->storyid()); |
|
| 541 | } else { |
|
| 542 | $block['use_spotlight'] = false; |
|
| 543 | } |
|
| 544 | } |
|
| 545 | if ($block['use_spotlight'] == true) { |
|
| 546 | $spotlight = array(); |
|
| 547 | $spotlight['title'] = xoops_substr($spotlightArticle->title(), 0, $options[2] - 1); |
|