@@ -1,9 +1,10 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | 3 | // Try to handle it with the upper level index.php. (it should know what to do.) |
| 4 | -if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) |
|
| 4 | +if (file_exists(dirname(dirname(__FILE__)) . '/index.php')) { |
|
| 5 | 5 | include (dirname(dirname(__FILE__)) . '/index.php'); |
| 6 | -else |
|
| 6 | +} else { |
|
| 7 | 7 | exit; |
| 8 | +} |
|
| 8 | 9 | |
| 9 | 10 | ?> |
| 10 | 11 | \ No newline at end of file |
@@ -583,8 +583,7 @@ discard block |
||
| 583 | 583 | { |
| 584 | 584 | $header = '<?php require("' . ($user_info['is_admin'] ? addslashes(realpath($boarddir . '/SSI.php')) : 'SSI.php') . '"); ?>' . "\n" . $header; |
| 585 | 585 | return $header . template_homepage_sample1_html() . $footer; |
| 586 | - } |
|
| 587 | - else |
|
| 586 | + } else |
|
| 588 | 587 | { |
| 589 | 588 | echo $header; |
| 590 | 589 | template_homepage_sample1_php(); |
@@ -599,9 +598,10 @@ discard block |
||
| 599 | 598 | |
| 600 | 599 | $topics = ssi_recentTopics(8, null, null, 'array'); |
| 601 | 600 | |
| 602 | - foreach ($topics as $topic) |
|
| 603 | - echo ' |
|
| 601 | + foreach ($topics as $topic) { |
|
| 602 | + echo ' |
|
| 604 | 603 | <li><a href="', $topic['href'], '">', $topic['subject'], '</a> ', $txt['by'], ' ', $topic['poster']['link'], '</li>'; |
| 604 | + } |
|
| 605 | 605 | |
| 606 | 606 | unset($topics); |
| 607 | 607 | |
@@ -186,8 +186,9 @@ discard block |
||
| 186 | 186 | |
| 187 | 187 | ########## Error-Catching ########## |
| 188 | 188 | # Note: You shouldn't touch these settings. |
| 189 | -if (file_exists(dirname(__FILE__) . '/db_last_error.php')) |
|
| 189 | +if (file_exists(dirname(__FILE__) . '/db_last_error.php')) { |
|
| 190 | 190 | include(dirname(__FILE__) . '/db_last_error.php'); |
| 191 | +} |
|
| 191 | 192 | |
| 192 | 193 | if (!isset($db_last_error)) |
| 193 | 194 | { |
@@ -202,11 +203,14 @@ discard block |
||
| 202 | 203 | } |
| 203 | 204 | |
| 204 | 205 | # Make sure the paths are correct... at least try to fix them. |
| 205 | -if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt')) |
|
| 206 | +if (!file_exists($boarddir) && file_exists(dirname(__FILE__) . '/agreement.txt')) { |
|
| 206 | 207 | $boarddir = dirname(__FILE__); |
| 207 | -if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources')) |
|
| 208 | +} |
|
| 209 | +if (!file_exists($sourcedir) && file_exists($boarddir . '/Sources')) { |
|
| 208 | 210 | $sourcedir = $boarddir . '/Sources'; |
| 209 | -if (!file_exists($cachedir) && file_exists($boarddir . '/cache')) |
|
| 211 | +} |
|
| 212 | +if (!file_exists($cachedir) && file_exists($boarddir . '/cache')) { |
|
| 210 | 213 | $cachedir = $boarddir . '/cache'; |
| 214 | +} |
|
| 211 | 215 | |
| 212 | 216 | ?> |
| 213 | 217 | \ No newline at end of file |
@@ -36,11 +36,12 @@ discard block |
||
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | // An error? |
| 39 | - if (!empty($context['error_message'])) |
|
| 40 | - echo ' |
|
| 39 | + if (!empty($context['error_message'])) { |
|
| 40 | + echo ' |
|
| 41 | 41 | <div class="errorbox"> |
| 42 | 42 | ', $context['error_message'], ' |
| 43 | 43 | </div>'; |
| 44 | + } |
|
| 44 | 45 | |
| 45 | 46 | // Provide something of an introduction... |
| 46 | 47 | echo ' |
@@ -67,11 +68,12 @@ discard block |
||
| 67 | 68 | // If the files are not writable, we might! |
| 68 | 69 | if (!empty($context['still_not_writable'])) |
| 69 | 70 | { |
| 70 | - if (!empty($context['package_ftp']['error'])) |
|
| 71 | - echo ' |
|
| 71 | + if (!empty($context['package_ftp']['error'])) { |
|
| 72 | + echo ' |
|
| 72 | 73 | <div class="errorbox"> |
| 73 | 74 | ', $context['package_ftp']['error'], ' |
| 74 | 75 | </div>'; |
| 76 | + } |
|
| 75 | 77 | |
| 76 | 78 | echo ' |
| 77 | 79 | <div class="cat_bar"> |
@@ -243,11 +245,12 @@ discard block |
||
| 243 | 245 | |
| 244 | 246 | // Is it not writable? |
| 245 | 247 | // Show an error. |
| 246 | - if (!empty($context['entries_not_writable_message'])) |
|
| 247 | - echo ' |
|
| 248 | + if (!empty($context['entries_not_writable_message'])) { |
|
| 249 | + echo ' |
|
| 248 | 250 | <div class="errorbox"> |
| 249 | 251 | ', $context['entries_not_writable_message'], ' |
| 250 | 252 | </div>'; |
| 253 | + } |
|
| 251 | 254 | |
| 252 | 255 | // Already have some file entries? |
| 253 | 256 | if (!empty($context['file_entries'])) |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | |
| 40 | 40 | foreach ($category['boards'] as $board) |
| 41 | 41 | echo ' |
| 42 | - <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=> ' : '', $board['name'], '</option>'; |
|
| 42 | + <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level'] - 1) . '=> ' : '', $board['name'], '</option>'; |
|
| 43 | 43 | echo ' |
| 44 | 44 | </optgroup>'; |
| 45 | 45 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | // Stick our "create a redirection topic" template in here... |
| 64 | 64 | template_redirect_options('move'); |
| 65 | 65 | |
| 66 | - echo ' |
|
| 66 | + echo ' |
|
| 67 | 67 | <input type="submit" value="', $txt['move_topic'], '" onclick="return submitThisOnce(this);" accesskey="s" class="button"> |
| 68 | 68 | </div><!-- .move_topic --> |
| 69 | 69 | </div><!-- .windowbg -->'; |
@@ -86,9 +86,9 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | function template_redirect_options($type) |
| 88 | 88 | { |
| 89 | - global $txt, $context, $modSettings; |
|
| 89 | + global $txt, $context, $modSettings; |
|
| 90 | 90 | |
| 91 | - echo ' |
|
| 91 | + echo ' |
|
| 92 | 92 | <label for="postRedirect"> |
| 93 | 93 | <input type="checkbox" name="postRedirect" id="postRedirect"', $context['is_approved'] ? ' checked' : '', ' onclick="', $context['is_approved'] ? '' : 'if (this.checked && !confirm(\'' . $txt[$type . '_topic_unapproved_js'] . '\')) return false; ', 'document.getElementById(\'reasonArea\').style.display = this.checked ? \'block\' : \'none\';"> ', $txt['post_redirection'], '. |
| 94 | 94 | </label> |
@@ -37,9 +37,10 @@ discard block |
||
| 37 | 37 | echo ' |
| 38 | 38 | <optgroup label="', $category['name'], '">'; |
| 39 | 39 | |
| 40 | - foreach ($category['boards'] as $board) |
|
| 41 | - echo ' |
|
| 40 | + foreach ($category['boards'] as $board) { |
|
| 41 | + echo ' |
|
| 42 | 42 | <option value="', $board['id'], '"', $board['selected'] ? ' selected' : '', $board['id'] == $context['current_board'] ? ' disabled' : '', '>', $board['child_level'] > 0 ? str_repeat('==', $board['child_level']-1) . '=> ' : '', $board['name'], '</option>'; |
| 43 | + } |
|
| 43 | 44 | echo ' |
| 44 | 45 | </optgroup>'; |
| 45 | 46 | } |
@@ -68,9 +69,10 @@ discard block |
||
| 68 | 69 | </div><!-- .move_topic --> |
| 69 | 70 | </div><!-- .windowbg -->'; |
| 70 | 71 | |
| 71 | - if ($context['back_to_topic']) |
|
| 72 | - echo ' |
|
| 72 | + if ($context['back_to_topic']) { |
|
| 73 | + echo ' |
|
| 73 | 74 | <input type="hidden" name="goback" value="1">'; |
| 75 | + } |
|
| 74 | 76 | |
| 75 | 77 | echo ' |
| 76 | 78 | <input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '"> |
@@ -123,8 +125,7 @@ discard block |
||
| 123 | 125 | <option value="86400">', $txt['two_months'], '</option> |
| 124 | 126 | </select> |
| 125 | 127 | </dd>'; |
| 126 | - } |
|
| 127 | - else |
|
| 128 | + } else |
|
| 128 | 129 | { |
| 129 | 130 | echo ' |
| 130 | 131 | <input type="hidden" name="redirect_expires" value="0">'; |
@@ -221,9 +222,9 @@ discard block |
||
| 221 | 222 | <input type="submit" value="', $txt['go'], '" class="button"> |
| 222 | 223 | </form>'; |
| 223 | 224 | |
| 225 | + } else { |
|
| 226 | + echo $txt['target_below']; |
|
| 224 | 227 | } |
| 225 | - else |
|
| 226 | - echo $txt['target_below']; |
|
| 227 | 228 | |
| 228 | 229 | echo ' </h4> |
| 229 | 230 | </div><!-- .title_bar -->'; |
@@ -241,12 +242,13 @@ discard block |
||
| 241 | 242 | |
| 242 | 243 | $merge_button = create_button('merge', 'merge', ''); |
| 243 | 244 | |
| 244 | - foreach ($context['topics'] as $topic) |
|
| 245 | - echo ' |
|
| 245 | + foreach ($context['topics'] as $topic) { |
|
| 246 | + echo ' |
|
| 246 | 247 | <li> |
| 247 | 248 | <a href="', $scripturl, '?action=mergetopics;sa=options;board=', $context['current_board'], '.0;from=', $context['origin_topic'], ';to=', $topic['id'], ';', $context['session_var'], '=', $context['session_id'], '">', $merge_button, '</a> |
| 248 | 249 | <a href="', $scripturl, '?topic=', $topic['id'], '.0" target="_blank">', $topic['subject'], '</a> ', $txt['started_by'], ' ', $topic['poster']['link'], ' |
| 249 | 250 | </li>'; |
| 251 | + } |
|
| 250 | 252 | |
| 251 | 253 | echo ' |
| 252 | 254 | </ul> |
@@ -255,8 +257,7 @@ discard block |
||
| 255 | 257 | <div class="pagesection"> |
| 256 | 258 | ', $context['page_index'], ' |
| 257 | 259 | </div>'; |
| 258 | - } |
|
| 259 | - else |
|
| 260 | + } else |
|
| 260 | 261 | { |
| 261 | 262 | // Just a nice "There aren't any topics" message |
| 262 | 263 | echo ' |
@@ -311,8 +312,8 @@ discard block |
||
| 311 | 312 | </thead> |
| 312 | 313 | <tbody>'; |
| 313 | 314 | |
| 314 | - foreach ($context['topics'] as $topic) |
|
| 315 | - echo ' |
|
| 315 | + foreach ($context['topics'] as $topic) { |
|
| 316 | + echo ' |
|
| 316 | 317 | <tr class="windowbg"> |
| 317 | 318 | <td> |
| 318 | 319 | <input type="checkbox" name="topics[]" value="' . $topic['id'] . '" checked> |
@@ -332,6 +333,7 @@ discard block |
||
| 332 | 333 | <input type="checkbox" name="notifications[]" value="' . $topic['id'] . '" checked> |
| 333 | 334 | </td> |
| 334 | 335 | </tr>'; |
| 336 | + } |
|
| 335 | 337 | echo ' |
| 336 | 338 | </tbody> |
| 337 | 339 | </table> |
@@ -341,9 +343,10 @@ discard block |
||
| 341 | 343 | <legend>', $txt['merge_select_subject'], '</legend> |
| 342 | 344 | <select name="subject" onchange="this.form.custom_subject.style.display = (this.options[this.selectedIndex].value != 0) ? \'none\': \'\' ;">'; |
| 343 | 345 | |
| 344 | - foreach ($context['topics'] as $topic) |
|
| 345 | - echo ' |
|
| 346 | + foreach ($context['topics'] as $topic) { |
|
| 347 | + echo ' |
|
| 346 | 348 | <option value="', $topic['id'], '"' . ($topic['selected'] ? ' selected' : '') . '>', $topic['subject'], '</option>'; |
| 349 | + } |
|
| 347 | 350 | echo ' |
| 348 | 351 | <option value="0">', $txt['merge_custom_subject'], ':</option> |
| 349 | 352 | </select> |
@@ -362,11 +365,12 @@ discard block |
||
| 362 | 365 | <legend>', $txt['merge_select_target_board'], '</legend> |
| 363 | 366 | <ul>'; |
| 364 | 367 | |
| 365 | - foreach ($context['boards'] as $board) |
|
| 366 | - echo ' |
|
| 368 | + foreach ($context['boards'] as $board) { |
|
| 369 | + echo ' |
|
| 367 | 370 | <li> |
| 368 | 371 | <input type="radio" name="board" value="' . $board['id'] . '"' . ($board['selected'] ? ' checked' : '') . '> ' . $board['name'] . ' |
| 369 | 372 | </li>'; |
| 373 | + } |
|
| 370 | 374 | echo ' |
| 371 | 375 | </ul> |
| 372 | 376 | </fieldset>'; |
@@ -378,11 +382,12 @@ discard block |
||
| 378 | 382 | <legend>' . $txt['merge_select_poll'] . '</legend> |
| 379 | 383 | <ul>'; |
| 380 | 384 | |
| 381 | - foreach ($context['polls'] as $poll) |
|
| 382 | - echo ' |
|
| 385 | + foreach ($context['polls'] as $poll) { |
|
| 386 | + echo ' |
|
| 383 | 387 | <li> |
| 384 | 388 | <input type="radio" name="poll" value="' . $poll['id'] . '"' . ($poll['selected'] ? ' checked' : '') . '> ' . $poll['question'] . ' (' . $txt['topic'] . ': <a href="' . $scripturl . '?topic=' . $poll['topic']['id'] . '.0" target="_blank">' . $poll['topic']['subject'] . '</a>) |
| 385 | 389 | </li>'; |
| 390 | + } |
|
| 386 | 391 | echo ' |
| 387 | 392 | <li> |
| 388 | 393 | <input type="radio" name="poll" value="-1"> (' . $txt['merge_no_poll'] . ') |
@@ -220,7 +220,7 @@ |
||
| 220 | 220 | ), |
| 221 | 221 | ), |
| 222 | 222 | ); |
| 223 | - */ |
|
| 223 | + */ |
|
| 224 | 224 | |
| 225 | 225 | // Are we using right-to-left orientation? |
| 226 | 226 | $first = $context['right_to_left'] ? 'last' : 'first'; |
@@ -22,27 +22,31 @@ discard block |
||
| 22 | 22 | // Get a shortcut to the current list. |
| 23 | 23 | $list_id = $list_id === null ? (!empty($context['default_list']) ? $context['default_list'] : '') : $list_id; |
| 24 | 24 | |
| 25 | - if (empty($list_id) || empty($context[$list_id])) |
|
| 26 | - return; |
|
| 25 | + if (empty($list_id) || empty($context[$list_id])) { |
|
| 26 | + return; |
|
| 27 | + } |
|
| 27 | 28 | |
| 28 | 29 | $cur_list = &$context[$list_id]; |
| 29 | 30 | |
| 30 | 31 | // These are the main tabs that is used all around the template. |
| 31 | - if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) |
|
| 32 | - template_create_list_menu($cur_list['list_menu'], 'top'); |
|
| 32 | + if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'top')) { |
|
| 33 | + template_create_list_menu($cur_list['list_menu'], 'top'); |
|
| 34 | + } |
|
| 33 | 35 | |
| 34 | - if (isset($cur_list['form'])) |
|
| 35 | - echo ' |
|
| 36 | + if (isset($cur_list['form'])) { |
|
| 37 | + echo ' |
|
| 36 | 38 | <form action="', $cur_list['form']['href'], '" method="post"', empty($cur_list['form']['name']) ? '' : ' name="' . $cur_list['form']['name'] . '" id="' . $cur_list['form']['name'] . '"', ' accept-charset="', $context['character_set'], '">'; |
| 39 | + } |
|
| 37 | 40 | |
| 38 | 41 | // Show the title of the table (if any). |
| 39 | - if (!empty($cur_list['title'])) |
|
| 40 | - echo ' |
|
| 42 | + if (!empty($cur_list['title'])) { |
|
| 43 | + echo ' |
|
| 41 | 44 | <div class="cat_bar"> |
| 42 | 45 | <h3 class="catbg"> |
| 43 | 46 | ', $cur_list['title'], ' |
| 44 | 47 | </h3> |
| 45 | 48 | </div>'; |
| 49 | + } |
|
| 46 | 50 | |
| 47 | 51 | if (isset($cur_list['additional_rows']['after_title'])) |
| 48 | 52 | { |
@@ -55,20 +59,23 @@ discard block |
||
| 55 | 59 | </div>'; |
| 56 | 60 | } |
| 57 | 61 | |
| 58 | - if (isset($cur_list['additional_rows']['top_of_list'])) |
|
| 59 | - template_additional_rows('top_of_list', $cur_list); |
|
| 62 | + if (isset($cur_list['additional_rows']['top_of_list'])) { |
|
| 63 | + template_additional_rows('top_of_list', $cur_list); |
|
| 64 | + } |
|
| 60 | 65 | |
| 61 | 66 | if ((!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) || isset($cur_list['additional_rows']['above_column_headers'])) |
| 62 | 67 | { |
| 63 | 68 | // Show the page index (if this list doesn't intend to show all items). |
| 64 | - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) |
|
| 65 | - echo ' |
|
| 69 | + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { |
|
| 70 | + echo ' |
|
| 66 | 71 | <div class="floatleft"> |
| 67 | 72 | <div class="pagesection">', $cur_list['page_index'], '</div> |
| 68 | 73 | </div>'; |
| 74 | + } |
|
| 69 | 75 | |
| 70 | - if (isset($cur_list['additional_rows']['above_column_headers'])) |
|
| 71 | - template_additional_rows('above_column_headers', $cur_list); |
|
| 76 | + if (isset($cur_list['additional_rows']['above_column_headers'])) { |
|
| 77 | + template_additional_rows('above_column_headers', $cur_list); |
|
| 78 | + } |
|
| 72 | 79 | } |
| 73 | 80 | |
| 74 | 81 | echo ' |
@@ -100,13 +107,14 @@ discard block |
||
| 100 | 107 | <tbody>'; |
| 101 | 108 | |
| 102 | 109 | // Show a nice message informing there are no items in this list. |
| 103 | - if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) |
|
| 104 | - echo ' |
|
| 110 | + if (empty($cur_list['rows']) && !empty($cur_list['no_items_label'])) { |
|
| 111 | + echo ' |
|
| 105 | 112 | <tr class="windowbg"> |
| 106 | 113 | <td colspan="', $cur_list['num_columns'], '" class="', !empty($cur_list['no_items_align']) ? $cur_list['no_items_align'] : 'centertext', '"> |
| 107 | 114 | ', $cur_list['no_items_label'], ' |
| 108 | 115 | </td> |
| 109 | 116 | </tr>'; |
| 117 | + } |
|
| 110 | 118 | |
| 111 | 119 | // Show the list rows. |
| 112 | 120 | elseif (!empty($cur_list['rows'])) |
@@ -116,12 +124,13 @@ discard block |
||
| 116 | 124 | echo ' |
| 117 | 125 | <tr class="windowbg', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', ' id="list_', $list_id, '_', $id, '">'; |
| 118 | 126 | |
| 119 | - if (!empty($row['data'])) |
|
| 120 | - foreach ($row['data'] as $row_data) |
|
| 127 | + if (!empty($row['data'])) { |
|
| 128 | + foreach ($row['data'] as $row_data) |
|
| 121 | 129 | echo ' |
| 122 | 130 | <td', empty($row_data['class']) ? '' : ' class="' . $row_data['class'] . '"', empty($row_data['style']) ? '' : ' style="' . $row_data['style'] . '"', '> |
| 123 | 131 | ', $row_data['value'], ' |
| 124 | 132 | </td>'; |
| 133 | + } |
|
| 125 | 134 | |
| 126 | 135 | echo ' |
| 127 | 136 | </tr>'; |
@@ -138,46 +147,53 @@ discard block |
||
| 138 | 147 | <div class="flow_auto">'; |
| 139 | 148 | |
| 140 | 149 | // Show the page index (if this list doesn't intend to show all items). |
| 141 | - if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) |
|
| 142 | - echo ' |
|
| 150 | + if (!empty($cur_list['items_per_page']) && !empty($cur_list['page_index'])) { |
|
| 151 | + echo ' |
|
| 143 | 152 | <div class="floatleft"> |
| 144 | 153 | <div class="pagesection">', $cur_list['page_index'], '</div> |
| 145 | 154 | </div>'; |
| 155 | + } |
|
| 146 | 156 | |
| 147 | - if (isset($cur_list['additional_rows']['below_table_data'])) |
|
| 148 | - template_additional_rows('below_table_data', $cur_list); |
|
| 157 | + if (isset($cur_list['additional_rows']['below_table_data'])) { |
|
| 158 | + template_additional_rows('below_table_data', $cur_list); |
|
| 159 | + } |
|
| 149 | 160 | |
| 150 | 161 | echo ' |
| 151 | 162 | </div>'; |
| 152 | 163 | } |
| 153 | 164 | |
| 154 | - if (isset($cur_list['additional_rows']['bottom_of_list'])) |
|
| 155 | - template_additional_rows('bottom_of_list', $cur_list); |
|
| 165 | + if (isset($cur_list['additional_rows']['bottom_of_list'])) { |
|
| 166 | + template_additional_rows('bottom_of_list', $cur_list); |
|
| 167 | + } |
|
| 156 | 168 | |
| 157 | 169 | if (isset($cur_list['form'])) |
| 158 | 170 | { |
| 159 | - foreach ($cur_list['form']['hidden_fields'] as $name => $value) |
|
| 160 | - echo ' |
|
| 171 | + foreach ($cur_list['form']['hidden_fields'] as $name => $value) { |
|
| 172 | + echo ' |
|
| 161 | 173 | <input type="hidden" name="', $name, '" value="', $value, '">'; |
| 174 | + } |
|
| 162 | 175 | |
| 163 | - if (isset($cur_list['form']['token'])) |
|
| 164 | - echo ' |
|
| 176 | + if (isset($cur_list['form']['token'])) { |
|
| 177 | + echo ' |
|
| 165 | 178 | <input type="hidden" name="', $context[$cur_list['form']['token'] . '_token_var'], '" value="', $context[$cur_list['form']['token'] . '_token'], '">'; |
| 179 | + } |
|
| 166 | 180 | |
| 167 | 181 | echo ' |
| 168 | 182 | </form>'; |
| 169 | 183 | } |
| 170 | 184 | |
| 171 | 185 | // Tabs at the bottom. Usually bottom aligned. |
| 172 | - if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) |
|
| 173 | - template_create_list_menu($cur_list['list_menu'], 'bottom'); |
|
| 186 | + if (isset($cur_list['list_menu'], $cur_list['list_menu']['show_on']) && ($cur_list['list_menu']['show_on'] == 'both' || $cur_list['list_menu']['show_on'] == 'bottom')) { |
|
| 187 | + template_create_list_menu($cur_list['list_menu'], 'bottom'); |
|
| 188 | + } |
|
| 174 | 189 | |
| 175 | - if (isset($cur_list['javascript'])) |
|
| 176 | - echo ' |
|
| 190 | + if (isset($cur_list['javascript'])) { |
|
| 191 | + echo ' |
|
| 177 | 192 | <script> |
| 178 | 193 | ', $cur_list['javascript'], ' |
| 179 | 194 | </script>'; |
| 180 | -} |
|
| 195 | + } |
|
| 196 | + } |
|
| 181 | 197 | |
| 182 | 198 | /** |
| 183 | 199 | * This template displays additional rows above or below the list. |
@@ -187,12 +203,13 @@ discard block |
||
| 187 | 203 | */ |
| 188 | 204 | function template_additional_rows($row_position, $cur_list) |
| 189 | 205 | { |
| 190 | - foreach ($cur_list['additional_rows'][$row_position] as $row) |
|
| 191 | - echo ' |
|
| 206 | + foreach ($cur_list['additional_rows'][$row_position] as $row) { |
|
| 207 | + echo ' |
|
| 192 | 208 | <div class="additional_row', empty($row['class']) ? '' : ' ' . $row['class'], '"', empty($row['style']) ? '' : ' style="' . $row['style'] . '"', '> |
| 193 | 209 | ', $row['value'], ' |
| 194 | 210 | </div>'; |
| 195 | -} |
|
| 211 | + } |
|
| 212 | + } |
|
| 196 | 213 | |
| 197 | 214 | /** |
| 198 | 215 | * This function creates a menu |
@@ -251,18 +268,19 @@ discard block |
||
| 251 | 268 | |
| 252 | 269 | foreach ($list_menu['links'] as $link) |
| 253 | 270 | { |
| 254 | - if ($link['is_selected']) |
|
| 255 | - echo ' |
|
| 271 | + if ($link['is_selected']) { |
|
| 272 | + echo ' |
|
| 256 | 273 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $first, '"> </td> |
| 257 | 274 | <td class="', $direction == 'top' ? 'mirrortab' : 'maintab', '_active_back"> |
| 258 | 275 | <a href="', $link['href'], '">', $link['label'], '</a> |
| 259 | 276 | </td> |
| 260 | 277 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_active_', $last, '"> </td>'; |
| 261 | - else |
|
| 262 | - echo ' |
|
| 278 | + } else { |
|
| 279 | + echo ' |
|
| 263 | 280 | <td class="', $direction == 'top' ? 'mirror' : 'main', 'tab_back"> |
| 264 | 281 | <a href="', $link['href'], '">', $link['label'], '</a> |
| 265 | 282 | </td>'; |
| 283 | + } |
|
| 266 | 284 | } |
| 267 | 285 | |
| 268 | 286 | echo ' |
@@ -273,12 +291,12 @@ discard block |
||
| 273 | 291 | <td> </td>' : '', ' |
| 274 | 292 | </tr> |
| 275 | 293 | </table>'; |
| 276 | - } |
|
| 277 | - elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons') |
|
| 294 | + } elseif (isset($list_menu['style']) && $list_menu['style'] == 'buttons') |
|
| 278 | 295 | { |
| 279 | 296 | $links = array(); |
| 280 | - foreach ($list_menu['links'] as $link) |
|
| 281 | - $links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>'; |
|
| 297 | + foreach ($list_menu['links'] as $link) { |
|
| 298 | + $links[] = '<a href="' . $link['href'] . '">' . $link['label'] . '</a>'; |
|
| 299 | + } |
|
| 282 | 300 | |
| 283 | 301 | echo ' |
| 284 | 302 | <table style="margin-', $list_menu['position'], ': 10px; width: 100%;"> |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | <meta charset="', $context['character_set'], '"> |
| 25 | 25 | <meta name="robots" content="noindex"> |
| 26 | 26 | <title>', $context['page_title'], '</title> |
| 27 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
| 28 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 27 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
| 28 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 29 | 29 | </head> |
| 30 | 30 | <body id="help_popup"> |
| 31 | 31 | <div class="windowbg description"> |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | <title>', $txt['find_members'], '</title> |
| 51 | 51 | <meta charset="', $context['character_set'], '"> |
| 52 | 52 | <meta name="robots" content="noindex"> |
| 53 | - <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'] ,'"> |
|
| 54 | - <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'] ,'"></script> |
|
| 53 | + <link rel="stylesheet" href="', $settings['theme_url'], '/css/index', $context['theme_variant'], '.css', $modSettings['browser_cache'], '"> |
|
| 54 | + <script src="', $settings['default_theme_url'], '/scripts/script.js', $modSettings['browser_cache'], '"></script> |
|
| 55 | 55 | <script> |
| 56 | 56 | var membersAdded = []; |
| 57 | 57 | function addMember(name) |
@@ -86,9 +86,10 @@ discard block |
||
| 86 | 86 | <span class="smalltext"><em>', $txt['find_wildcards'], '</em></span><br>'; |
| 87 | 87 | |
| 88 | 88 | // Only offer to search for buddies if we have some! |
| 89 | - if (!empty($context['show_buddies'])) |
|
| 90 | - echo ' |
|
| 89 | + if (!empty($context['show_buddies'])) { |
|
| 90 | + echo ' |
|
| 91 | 91 | <span class="smalltext"><label for="buddies"><input type="checkbox" name="buddies" id="buddies"', !empty($context['buddy_search']) ? ' checked' : '', '> ', $txt['find_buddies'], '</label></span><br>'; |
| 92 | + } |
|
| 92 | 93 | |
| 93 | 94 | echo ' |
| 94 | 95 | <div class="padding righttext"> |
@@ -103,10 +104,10 @@ discard block |
||
| 103 | 104 | <h3 class="catbg">', $txt['find_results'], '</h3> |
| 104 | 105 | </div>'; |
| 105 | 106 | |
| 106 | - if (empty($context['results'])) |
|
| 107 | - echo ' |
|
| 107 | + if (empty($context['results'])) { |
|
| 108 | + echo ' |
|
| 108 | 109 | <p class="error">', $txt['find_no_results'], '</p>'; |
| 109 | - else |
|
| 110 | + } else |
|
| 110 | 111 | { |
| 111 | 112 | echo ' |
| 112 | 113 | <ul class="padding">'; |
@@ -135,11 +136,12 @@ discard block |
||
| 135 | 136 | <input type="hidden" name="quote" value="', $context['quote_results'] ? '1' : '0', '"> |
| 136 | 137 | </form>'; |
| 137 | 138 | |
| 138 | - if (empty($context['results'])) |
|
| 139 | - echo ' |
|
| 139 | + if (empty($context['results'])) { |
|
| 140 | + echo ' |
|
| 140 | 141 | <script> |
| 141 | 142 | document.getElementById("search").focus(); |
| 142 | 143 | </script>'; |
| 144 | + } |
|
| 143 | 145 | |
| 144 | 146 | echo ' |
| 145 | 147 | </body> |
@@ -183,8 +185,8 @@ discard block |
||
| 183 | 185 | { |
| 184 | 186 | global $txt, $context, $modSettings; |
| 185 | 187 | |
| 186 | - if (!empty($modSettings['requireAgreement'])) |
|
| 187 | - echo ' |
|
| 188 | + if (!empty($modSettings['requireAgreement'])) { |
|
| 189 | + echo ' |
|
| 188 | 190 | <div class="cat_bar"> |
| 189 | 191 | <h3 class="catbg"> |
| 190 | 192 | ', $txt['terms_and_rules'], ' - ', $context['forum_name_html_safe'], ' |
@@ -193,11 +195,12 @@ discard block |
||
| 193 | 195 | <div class="roundframe"> |
| 194 | 196 | ', $context['agreement'], ' |
| 195 | 197 | </div>'; |
| 196 | - else |
|
| 197 | - echo ' |
|
| 198 | + } else { |
|
| 199 | + echo ' |
|
| 198 | 200 | <div class="noticebox"> |
| 199 | 201 | ', $txt['agreement_disabled'], ' |
| 200 | 202 | </div>'; |
| 201 | -} |
|
| 203 | + } |
|
| 204 | + } |
|
| 202 | 205 | |
| 203 | 206 | ?> |
| 204 | 207 | \ No newline at end of file |
@@ -101,8 +101,8 @@ discard block |
||
| 101 | 101 | </div> |
| 102 | 102 | <ul id="messages_not_selected" class="split_messages smalltext">'; |
| 103 | 103 | |
| 104 | - foreach ($context['not_selected']['messages'] as $message) |
|
| 105 | - echo ' |
|
| 104 | + foreach ($context['not_selected']['messages'] as $message) { |
|
| 105 | + echo ' |
|
| 106 | 106 | <li class="windowbg" id="not_selected_', $message['id'], '"> |
| 107 | 107 | <div class="message_header"> |
| 108 | 108 | <a class="split_icon floatright" href="', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '.', $context['not_selected']['start'], ';start2=', $context['selected']['start'], ';move=down;msg=', $message['id'], '" onclick="return select(\'down\', ', $message['id'], ');"><span class="generic_icons split_sel" title="->"></span></a> |
@@ -111,6 +111,7 @@ discard block |
||
| 111 | 111 | </div> |
| 112 | 112 | <div class="post">', $message['body'], '</div> |
| 113 | 113 | </li>'; |
| 114 | + } |
|
| 114 | 115 | |
| 115 | 116 | echo ' |
| 116 | 117 | <li class="dummy"> |
@@ -130,8 +131,8 @@ discard block |
||
| 130 | 131 | </div> |
| 131 | 132 | <ul id="messages_selected" class="split_messages smalltext">'; |
| 132 | 133 | |
| 133 | - if (!empty($context['selected']['messages'])) |
|
| 134 | - foreach ($context['selected']['messages'] as $message) |
|
| 134 | + if (!empty($context['selected']['messages'])) { |
|
| 135 | + foreach ($context['selected']['messages'] as $message) |
|
| 135 | 136 | echo ' |
| 136 | 137 | <li class="windowbg" id="selected_', $message['id'], '"> |
| 137 | 138 | <div class="message_header"> |
@@ -141,6 +142,7 @@ discard block |
||
| 141 | 142 | </div> |
| 142 | 143 | <div class="post">', $message['body'], '</div> |
| 143 | 144 | </li>'; |
| 145 | + } |
|
| 144 | 146 | |
| 145 | 147 | echo ' |
| 146 | 148 | <li class="dummy"> |
@@ -74,10 +74,10 @@ discard block |
||
| 74 | 74 | <subject is_first="', $context['message']['first_in_topic'] ? '1' : '0', '"><![CDATA[', cleanXml($context['message']['subject']), ']]></subject> |
| 75 | 75 | <body><![CDATA[', $context['message']['body'], ']]></body> |
| 76 | 76 | <success><![CDATA[', $txt['quick_modify_message'], ']]></success>'; |
| 77 | - } |
|
| 78 | - else |
|
| 79 | - echo ' |
|
| 77 | + } else { |
|
| 78 | + echo ' |
|
| 80 | 79 | <error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '" in_body="', cleanXml($context['message']['error_in_body']) ? '1' : '0', '"><![CDATA[', implode('<br />', $context['message']['errors']), ']]></error>'; |
| 80 | + } |
|
| 81 | 81 | echo ' |
| 82 | 82 | </message> |
| 83 | 83 | </smf>'; |
@@ -101,13 +101,14 @@ discard block |
||
| 101 | 101 | |
| 102 | 102 | echo ' |
| 103 | 103 | <modified><![CDATA[', empty($modified) ? '' : cleanXml('« <em>' . $modified . '</em>»'), ']]></modified>'; |
| 104 | - if (!empty($context['message']['subject'])) |
|
| 105 | - echo ' |
|
| 104 | + if (!empty($context['message']['subject'])) { |
|
| 105 | + echo ' |
|
| 106 | 106 | <subject><![CDATA[', cleanXml($context['message']['subject']), ']]></subject>'; |
| 107 | - } |
|
| 108 | - else |
|
| 109 | - echo ' |
|
| 107 | + } |
|
| 108 | + } else { |
|
| 109 | + echo ' |
|
| 110 | 110 | <error in_subject="', $context['message']['error_in_subject'] ? '1' : '0', '"><![CDATA[', cleanXml(implode('<br />', $context['message']['errors'])), ']]></error>'; |
| 111 | + } |
|
| 111 | 112 | echo ' |
| 112 | 113 | </message> |
| 113 | 114 | </smf>'; |
@@ -127,10 +128,11 @@ discard block |
||
| 127 | 128 | <body><![CDATA[', $context['preview_message'], ']]></body> |
| 128 | 129 | </preview> |
| 129 | 130 | <errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '" topic_locked="', $context['locked'] ? '1' : '0', '">'; |
| 130 | - if (!empty($context['post_error'])) |
|
| 131 | - foreach ($context['post_error'] as $message) |
|
| 131 | + if (!empty($context['post_error'])) { |
|
| 132 | + foreach ($context['post_error'] as $message) |
|
| 132 | 133 | echo ' |
| 133 | 134 | <error><![CDATA[', cleanXml($message), ']]></error>'; |
| 135 | + } |
|
| 134 | 136 | echo ' |
| 135 | 137 | <caption name="guestname" class="', isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? 'error' : '', '" /> |
| 136 | 138 | <caption name="email" class="', isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? 'error' : '', '" /> |
@@ -145,14 +147,15 @@ discard block |
||
| 145 | 147 | { |
| 146 | 148 | echo ' |
| 147 | 149 | <new_posts>'; |
| 148 | - foreach ($context['previous_posts'] as $post) |
|
| 149 | - echo ' |
|
| 150 | + foreach ($context['previous_posts'] as $post) { |
|
| 151 | + echo ' |
|
| 150 | 152 | <post id="', $post['id'], '"> |
| 151 | 153 | <time><![CDATA[', $post['time'], ']]></time> |
| 152 | 154 | <poster><![CDATA[', cleanXml($post['poster']), ']]></poster> |
| 153 | 155 | <message><![CDATA[', cleanXml($post['message']), ']]></message> |
| 154 | 156 | <is_ignored>', $post['is_ignored'] ? '1' : '0', '</is_ignored> |
| 155 | 157 | </post>'; |
| 158 | + } |
|
| 156 | 159 | echo ' |
| 157 | 160 | </new_posts>'; |
| 158 | 161 | } |
@@ -176,10 +179,11 @@ discard block |
||
| 176 | 179 | <body><![CDATA[', $context['preview_message'], ']]></body> |
| 177 | 180 | </preview> |
| 178 | 181 | <errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '">'; |
| 179 | - if (!empty($context['post_error']['messages'])) |
|
| 180 | - foreach ($context['post_error']['messages'] as $message) |
|
| 182 | + if (!empty($context['post_error']['messages'])) { |
|
| 183 | + foreach ($context['post_error']['messages'] as $message) |
|
| 181 | 184 | echo ' |
| 182 | 185 | <error><![CDATA[', cleanXml($message), ']]></error>'; |
| 186 | + } |
|
| 183 | 187 | |
| 184 | 188 | echo ' |
| 185 | 189 | <caption name="to" class="', isset($context['post_error']['no_to']) ? 'error' : '', '" /> |
@@ -208,10 +212,11 @@ discard block |
||
| 208 | 212 | <body><![CDATA[', $context['preview_message'], ']]></body> |
| 209 | 213 | </preview> |
| 210 | 214 | <errors serious="', empty($context['error_type']) || $context['error_type'] != 'serious' ? '0' : '1', '">'; |
| 211 | - if (!empty($context['post_error']['messages'])) |
|
| 212 | - foreach ($context['post_error']['messages'] as $message) |
|
| 215 | + if (!empty($context['post_error']['messages'])) { |
|
| 216 | + foreach ($context['post_error']['messages'] as $message) |
|
| 213 | 217 | echo ' |
| 214 | 218 | <error><![CDATA[', cleanXml($message), ']]></error>'; |
| 219 | + } |
|
| 215 | 220 | |
| 216 | 221 | echo ' |
| 217 | 222 | </errors>'; |
@@ -227,19 +232,22 @@ discard block |
||
| 227 | 232 | { |
| 228 | 233 | global $context, $modSettings; |
| 229 | 234 | |
| 230 | - if (empty($context['yearly'])) |
|
| 231 | - return; |
|
| 235 | + if (empty($context['yearly'])) { |
|
| 236 | + return; |
|
| 237 | + } |
|
| 232 | 238 | |
| 233 | 239 | echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> |
| 234 | 240 | <smf>'; |
| 235 | - foreach ($context['yearly'] as $year) |
|
| 236 | - foreach ($year['months'] as $month) |
|
| 241 | + foreach ($context['yearly'] as $year) { |
|
| 242 | + foreach ($year['months'] as $month) |
|
| 237 | 243 | { |
| 238 | 244 | echo ' |
| 239 | 245 | <month id="', $month['date']['year'], $month['date']['month'], '">'; |
| 240 | - foreach ($month['days'] as $day) |
|
| 241 | - echo ' |
|
| 246 | + } |
|
| 247 | + foreach ($month['days'] as $day) { |
|
| 248 | + echo ' |
|
| 242 | 249 | <day date="', $day['year'], '-', $day['month'], '-', $day['day'], '" new_topics="', $day['new_topics'], '" new_posts="', $day['new_posts'], '" new_members="', $day['new_members'], '" most_members_online="', $day['most_members_online'], '"', empty($modSettings['hitStats']) ? '' : ' hits="' . $day['hits'] . '"', ' />'; |
| 250 | + } |
|
| 243 | 251 | echo ' |
| 244 | 252 | </month>'; |
| 245 | 253 | } |
@@ -260,17 +268,18 @@ discard block |
||
| 260 | 268 | <pageIndex section="selected" startFrom="', $context['selected']['start'], '"><![CDATA[', $context['selected']['page_index'], ']]></pageIndex>'; |
| 261 | 269 | foreach ($context['changes'] as $change) |
| 262 | 270 | { |
| 263 | - if ($change['type'] == 'remove') |
|
| 264 | - echo ' |
|
| 271 | + if ($change['type'] == 'remove') { |
|
| 272 | + echo ' |
|
| 265 | 273 | <change id="', $change['id'], '" curAction="remove" section="', $change['section'], '" />'; |
| 266 | - else |
|
| 267 | - echo ' |
|
| 274 | + } else { |
|
| 275 | + echo ' |
|
| 268 | 276 | <change id="', $change['id'], '" curAction="insert" section="', $change['section'], '"> |
| 269 | 277 | <subject><![CDATA[', cleanXml($change['insert_value']['subject']), ']]></subject> |
| 270 | 278 | <time><![CDATA[', cleanXml($change['insert_value']['time']), ']]></time> |
| 271 | 279 | <body><![CDATA[', cleanXml($change['insert_value']['body']), ']]></body> |
| 272 | 280 | <poster><![CDATA[', cleanXml($change['insert_value']['poster']), ']]></poster> |
| 273 | 281 | </change>'; |
| 282 | + } |
|
| 274 | 283 | } |
| 275 | 284 | echo ' |
| 276 | 285 | </smf>'; |
@@ -301,10 +310,10 @@ discard block |
||
| 301 | 310 | echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> |
| 302 | 311 | <smf>'; |
| 303 | 312 | |
| 304 | - if (empty($context['topics'])) |
|
| 305 | - echo ' |
|
| 313 | + if (empty($context['topics'])) { |
|
| 314 | + echo ' |
|
| 306 | 315 | <noresults>', $txt['search_no_results'], '</noresults>'; |
| 307 | - else |
|
| 316 | + } else |
|
| 308 | 317 | { |
| 309 | 318 | echo ' |
| 310 | 319 | <results>'; |
@@ -370,9 +379,10 @@ discard block |
||
| 370 | 379 | { |
| 371 | 380 | echo ' |
| 372 | 381 | <item type="category" id="', $category['id'], '"><![CDATA[', cleanXml($category['name']), ']]></item>'; |
| 373 | - foreach ($category['boards'] as $board) |
|
| 374 | - echo ' |
|
| 382 | + foreach ($category['boards'] as $board) { |
|
| 383 | + echo ' |
|
| 375 | 384 | <item type="board" id="', $board['id'], '" childlevel="', $board['child_level'], '"><![CDATA[', cleanXml($board['name']), ']]></item>'; |
| 385 | + } |
|
| 376 | 386 | } |
| 377 | 387 | echo ' |
| 378 | 388 | </smf>'; |
@@ -387,9 +397,10 @@ discard block |
||
| 387 | 397 | |
| 388 | 398 | echo '<', '?xml version="1.0" encoding="', $context['character_set'], '"?', '> |
| 389 | 399 | <smf>'; |
| 390 | - foreach ($context['icons'] as $icon) |
|
| 391 | - echo ' |
|
| 400 | + foreach ($context['icons'] as $icon) { |
|
| 401 | + echo ' |
|
| 392 | 402 | <icon value="', $icon['value'], '" url="', $icon['url'], '"><![CDATA[', cleanXml($icon['name']), ']]></icon>'; |
| 403 | + } |
|
| 393 | 404 | echo ' |
| 394 | 405 | </smf>'; |
| 395 | 406 | } |
@@ -438,16 +449,18 @@ discard block |
||
| 438 | 449 | foreach ($xml_data as $key => $data) |
| 439 | 450 | { |
| 440 | 451 | // A group? |
| 441 | - if (is_array($data) && isset($data['identifier'])) |
|
| 442 | - template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level); |
|
| 452 | + if (is_array($data) && isset($data['identifier'])) { |
|
| 453 | + template_generic_xml_recursive($data['children'], $key, $data['identifier'], $level); |
|
| 454 | + } |
|
| 443 | 455 | // An item... |
| 444 | 456 | elseif (is_array($data) && isset($data['value'])) |
| 445 | 457 | { |
| 446 | 458 | echo "\n", str_repeat("\t", $level), '<', $child_ident; |
| 447 | 459 | |
| 448 | - if (!empty($data['attributes'])) |
|
| 449 | - foreach ($data['attributes'] as $k => $v) |
|
| 460 | + if (!empty($data['attributes'])) { |
|
| 461 | + foreach ($data['attributes'] as $k => $v) |
|
| 450 | 462 | echo ' ' . $k . '="' . $v . '"'; |
| 463 | + } |
|
| 451 | 464 | echo '><![CDATA[', cleanXml($data['value']), ']]></', $child_ident, '>'; |
| 452 | 465 | } |
| 453 | 466 | |