function newsHomeQueryArray() { $query = array('channel_id' => channelID()); if(seekStoryID()) { $query["seek_story_id"] = seekStoryID(); if(afterOrBefore()) { $query["next"] = '1'; } else { $query["next"] = '0'; } } return $query; }
if($search_results_count == 0) { $search_results_description = "No matches found."; } else if($search_results_count == 1) { $search_results_description = "1 match found."; } else { $search_results_description = "{$search_results_count} matches found."; } if($search_results_count <= 10) { $search_results_displayed_description = $search_results_description; } else { $search_results_displayed_description = ($seek_search_id+1) . '-' . ($seek_search_id+sizeof($stories)) . ' of ' . $search_results_description; } } else { $stories = $news_office->get_news($channel_id, $story_id, afterOrBefore()); $last_story = end($stories); if($news_office->get_last_story_id($channel_id) == $last_story['story_id']) { // no more stories exists $load_next_story_id = NULL; } else { $load_next_story_id = $last_story['story_id']; } $first_story = $stories[0]; if($news_office->get_first_story_id($channel_id) == $first_story['story_id']) { // no previous stories exists $load_previous_story_id = NULL; } else { $load_previous_story_id = $first_story['story_id'];