| @@ 84-103 (lines=20) @@ | ||
| 81 | } |
|
| 82 | ||
| 83 | $toptenParams = $faq->getTopTen($param); |
|
| 84 | if (!isset($toptenParams['error'])) { |
|
| 85 | $template->parseBlock( |
|
| 86 | 'writeContent', |
|
| 87 | 'toptenList', |
|
| 88 | array( |
|
| 89 | 'toptenUrl' => $toptenParams['url'], |
|
| 90 | 'toptenTitle' => $toptenParams['title'], |
|
| 91 | 'toptenPreview' => $toptenParams['preview'], |
|
| 92 | 'toptenVisits' => $toptenParams[$param], |
|
| 93 | ) |
|
| 94 | ); |
|
| 95 | } else { |
|
| 96 | $template->parseBlock( |
|
| 97 | 'writeContent', |
|
| 98 | 'toptenListError', |
|
| 99 | array( |
|
| 100 | 'errorMsgTopTen' => $toptenParams['error'], |
|
| 101 | ) |
|
| 102 | ); |
|
| 103 | } |
|
| 104 | ||
| 105 | $latestEntriesParams = $faq->getLatest(); |
|
| 106 | if (!isset($latestEntriesParams['error'])) { |
|
| @@ 106-125 (lines=20) @@ | ||
| 103 | } |
|
| 104 | ||
| 105 | $latestEntriesParams = $faq->getLatest(); |
|
| 106 | if (!isset($latestEntriesParams['error'])) { |
|
| 107 | $template->parseBlock( |
|
| 108 | 'writeContent', |
|
| 109 | 'latestEntriesList', |
|
| 110 | array( |
|
| 111 | 'latestEntriesUrl' => $latestEntriesParams['url'], |
|
| 112 | 'latestEntriesTitle' => $latestEntriesParams['title'], |
|
| 113 | 'latestEntriesPreview' => $latestEntriesParams['preview'], |
|
| 114 | 'latestEntriesDate' => $latestEntriesParams['date'], |
|
| 115 | ) |
|
| 116 | ); |
|
| 117 | } else { |
|
| 118 | $template->parseBlock( |
|
| 119 | 'writeContent', |
|
| 120 | 'latestEntriesListError', |
|
| 121 | [ |
|
| 122 | 'errorMsgLatest' => $latestEntriesParams['error'] |
|
| 123 | ] |
|
| 124 | ); |
|
| 125 | } |
|
| 126 | ||
| 127 | $template->parseBlock( |
|
| 128 | 'writeContent', |
|