@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | |
| 469 | 469 | // Figure out the filename we'll tell the browser. |
| 470 | 470 | $datatypes = file_exists($progressfile) ? array_keys($smcFunc['json_decode'](file_get_contents($progressfile), true)) : array('profile'); |
| 471 | - $included_desc = array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
| 471 | + $included_desc = array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, $datatypes); |
|
| 472 | 472 | |
| 473 | 473 | $dlfilename = array_merge(array($context['forum_name'], $context['member']['username']), $included_desc); |
| 474 | 474 | $dlfilename = preg_replace('/[^\p{L}\p{M}\p{N}_]+/u', '-', str_replace('"', '', un_htmlspecialchars(strip_tags(implode('_', $dlfilename))))); |
@@ -783,9 +783,9 @@ discard block |
||
| 783 | 783 | $xslt_variables = array(); |
| 784 | 784 | |
| 785 | 785 | // Do not change any of these to HTTPS URLs. For explanation, see comments in the buildXmlFeed() function. |
| 786 | - $smf_ns = 'htt'.'p:/'.'/ww'.'w.simple'.'machines.o'.'rg/xml/profile'; |
|
| 787 | - $xslt_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/XSL/Transform'; |
|
| 788 | - $html_ns = 'htt'.'p:/'.'/ww'.'w.w3.o'.'rg/1999/xhtml'; |
|
| 786 | + $smf_ns = 'htt' . 'p:/' . '/ww' . 'w.simple' . 'machines.o' . 'rg/xml/profile'; |
|
| 787 | + $xslt_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/XSL/Transform'; |
|
| 788 | + $html_ns = 'htt' . 'p:/' . '/ww' . 'w.w3.o' . 'rg/1999/xhtml'; |
|
| 789 | 789 | |
| 790 | 790 | require_once($sourcedir . DIRECTORY_SEPARATOR . 'News.php'); |
| 791 | 791 | |
@@ -1690,14 +1690,14 @@ discard block |
||
| 1690 | 1690 | |
| 1691 | 1691 | if (!empty($context['export_css_header'])) |
| 1692 | 1692 | { |
| 1693 | - $stylesheet['css_js'] .= ' |
|
| 1693 | + $stylesheet['css_js'] .= ' |
|
| 1694 | 1694 | <style><![CDATA[' . "\n" . implode("\n", $context['export_css_header']) . "\n" . ']]> |
| 1695 | 1695 | </style>'; |
| 1696 | 1696 | } |
| 1697 | 1697 | |
| 1698 | 1698 | if (!empty($context['export_javascript_vars'])) |
| 1699 | 1699 | { |
| 1700 | - $stylesheet['css_js'] .= ' |
|
| 1700 | + $stylesheet['css_js'] .= ' |
|
| 1701 | 1701 | <script><![CDATA['; |
| 1702 | 1702 | |
| 1703 | 1703 | foreach ($context['export_javascript_vars'] as $var => $val) |
@@ -1733,7 +1733,7 @@ discard block |
||
| 1733 | 1733 | |
| 1734 | 1734 | if (!empty($context['export_javascript_inline']['standard'])) |
| 1735 | 1735 | { |
| 1736 | - $stylesheet['css_js'] .= ' |
|
| 1736 | + $stylesheet['css_js'] .= ' |
|
| 1737 | 1737 | <script><![CDATA[' . "\n" . implode("\n", $context['export_javascript_inline']['standard']) . "\n" . ']]> |
| 1738 | 1738 | </script>'; |
| 1739 | 1739 | } |
@@ -1745,7 +1745,7 @@ discard block |
||
| 1745 | 1745 | |
| 1746 | 1746 | $stylesheet['css_js'] .= "\n\t" . str_replace("\n", "\n\t", implode("\n", $context['export_javascript_inline']['defer'])); |
| 1747 | 1747 | |
| 1748 | - $stylesheet['css_js'] .= "\n" . '});'. "\n" . ']]> |
|
| 1748 | + $stylesheet['css_js'] .= "\n" . '});' . "\n" . ']]> |
|
| 1749 | 1749 | </script>'; |
| 1750 | 1750 | } |
| 1751 | 1751 | |
@@ -1826,7 +1826,7 @@ discard block |
||
| 1826 | 1826 | $css_to_minify = array(); |
| 1827 | 1827 | $normal_css_files = array(); |
| 1828 | 1828 | |
| 1829 | - usort($context['css_files'], function ($a, $b) |
|
| 1829 | + usort($context['css_files'], function($a, $b) |
|
| 1830 | 1830 | { |
| 1831 | 1831 | return $a['options']['order_pos'] < $b['options']['order_pos'] ? -1 : ($a['options']['order_pos'] > $b['options']['order_pos'] ? 1 : 0); |
| 1832 | 1832 | }); |
@@ -644,13 +644,13 @@ discard block |
||
| 644 | 644 | 'quickbuttons' => array( |
| 645 | 645 | 'edit' => array( |
| 646 | 646 | 'label' => $txt['draft_edit'], |
| 647 | - 'href' => $scripturl.'?action=post;'.(empty($row['id_topic']) ? 'board='.$row['id_board'] : 'topic='.$row['id_topic']).'.0;id_draft='.$row['id_draft'], |
|
| 647 | + 'href' => $scripturl . '?action=post;' . (empty($row['id_topic']) ? 'board=' . $row['id_board'] : 'topic=' . $row['id_topic']) . '.0;id_draft=' . $row['id_draft'], |
|
| 648 | 648 | 'icon' => 'modify_button' |
| 649 | 649 | ), |
| 650 | 650 | 'delete' => array( |
| 651 | 651 | 'label' => $txt['draft_delete'], |
| 652 | - 'href' => $scripturl.'?action=profile;u='.$context['member']['id'].';area=showdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 653 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'"', |
|
| 652 | + 'href' => $scripturl . '?action=profile;u=' . $context['member']['id'] . ';area=showdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 653 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '"', |
|
| 654 | 654 | 'class' => 'you_sure', |
| 655 | 655 | 'icon' => 'remove_button' |
| 656 | 656 | ), |
@@ -837,13 +837,13 @@ discard block |
||
| 837 | 837 | 'quickbuttons' => array( |
| 838 | 838 | 'edit' => array( |
| 839 | 839 | 'label' => $txt['draft_edit'], |
| 840 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;id_draft='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 840 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;id_draft=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 841 | 841 | 'icon' => 'modify_button' |
| 842 | 842 | ), |
| 843 | 843 | 'delete' => array( |
| 844 | 844 | 'label' => $txt['draft_delete'], |
| 845 | - 'href' => $scripturl.'?action=pm;sa=showpmdrafts;delete='.$row['id_draft'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 846 | - 'javascript' => 'data-confirm="'.$txt['draft_remove'].'?"', |
|
| 845 | + 'href' => $scripturl . '?action=pm;sa=showpmdrafts;delete=' . $row['id_draft'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 846 | + 'javascript' => 'data-confirm="' . $txt['draft_remove'] . '?"', |
|
| 847 | 847 | 'class' => 'you_sure', |
| 848 | 848 | 'icon' => 'remove_button' |
| 849 | 849 | ), |
@@ -355,8 +355,8 @@ |
||
| 355 | 355 | elseif (isset($_POST['delall']) && isset($filter)) |
| 356 | 356 | { |
| 357 | 357 | // ip need a different placeholder type |
| 358 | - $filter_type = $filter['variable'] == 'ip'? 'inet' : 'string'; |
|
| 359 | - $filter_op = $filter['variable'] == 'ip'? '=' : 'LIKE'; |
|
| 358 | + $filter_type = $filter['variable'] == 'ip' ? 'inet' : 'string'; |
|
| 359 | + $filter_op = $filter['variable'] == 'ip' ? '=' : 'LIKE'; |
|
| 360 | 360 | $smcFunc['db_query']('', ' |
| 361 | 361 | DELETE FROM {db_prefix}log_errors |
| 362 | 362 | WHERE ' . $filter['variable'] . ' ' . $filter_op . ' {' . $filter_type . ':filter}', |
@@ -467,20 +467,20 @@ |
||
| 467 | 467 | $context['posts'][$key]['quickbuttons'] = array( |
| 468 | 468 | 'reply' => array( |
| 469 | 469 | 'label' => $txt['reply'], |
| 470 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 470 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 471 | 471 | 'icon' => 'reply_button', |
| 472 | 472 | 'show' => $post['can_reply'] |
| 473 | 473 | ), |
| 474 | 474 | 'quote' => array( |
| 475 | 475 | 'label' => $txt['quote_action'], |
| 476 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 476 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 477 | 477 | 'icon' => 'quote', |
| 478 | 478 | 'show' => $post['can_quote'] |
| 479 | 479 | ), |
| 480 | 480 | 'delete' => array( |
| 481 | 481 | 'label' => $txt['remove'], |
| 482 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';recent;'.$context['session_var'].'='.$context['session_id'], |
|
| 483 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
| 482 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';recent;' . $context['session_var'] . '=' . $context['session_id'], |
|
| 483 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
| 484 | 484 | 'class' => 'you_sure', |
| 485 | 485 | 'icon' => 'remove_button', |
| 486 | 486 | 'show' => $post['can_delete'] |
@@ -261,7 +261,7 @@ discard block |
||
| 261 | 261 | AND a.is_read = 0' : '') . (!empty($alertIDs) ? ' |
| 262 | 262 | AND a.id_alert IN ({array_int:alertIDs})' : '') . ' |
| 263 | 263 | ORDER BY id_alert DESC' . (!empty($limit) ? ' |
| 264 | - LIMIT {int:limit}' : '') . (!empty($offset) ?' |
|
| 264 | + LIMIT {int:limit}' : '') . (!empty($offset) ? ' |
|
| 265 | 265 | OFFSET {int:offset}' : ''), |
| 266 | 266 | array( |
| 267 | 267 | 'id_member' => $memID, |
@@ -1160,20 +1160,20 @@ discard block |
||
| 1160 | 1160 | $context['posts'][$key]['quickbuttons'] = array( |
| 1161 | 1161 | 'reply' => array( |
| 1162 | 1162 | 'label' => $txt['reply'], |
| 1163 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'], |
|
| 1163 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'], |
|
| 1164 | 1164 | 'icon' => 'reply_button', |
| 1165 | 1165 | 'show' => $post['can_reply'] |
| 1166 | 1166 | ), |
| 1167 | 1167 | 'quote' => array( |
| 1168 | 1168 | 'label' => $txt['quote_action'], |
| 1169 | - 'href' => $scripturl.'?action=post;topic='.$post['topic'].'.'.$post['start'].';quote='.$post['id'], |
|
| 1169 | + 'href' => $scripturl . '?action=post;topic=' . $post['topic'] . '.' . $post['start'] . ';quote=' . $post['id'], |
|
| 1170 | 1170 | 'icon' => 'quote', |
| 1171 | 1171 | 'show' => $post['can_quote'] |
| 1172 | 1172 | ), |
| 1173 | 1173 | 'remove' => array( |
| 1174 | 1174 | 'label' => $txt['remove'], |
| 1175 | - 'href' => $scripturl.'?action=deletemsg;msg='.$post['id'].';topic='.$post['topic'].';profile;u='.$context['member']['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 1176 | - 'javascript' => 'data-confirm="'.$txt['remove_message'].'"', |
|
| 1175 | + 'href' => $scripturl . '?action=deletemsg;msg=' . $post['id'] . ';topic=' . $post['topic'] . ';profile;u=' . $context['member']['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 1176 | + 'javascript' => 'data-confirm="' . $txt['remove_message'] . '"', |
|
| 1177 | 1177 | 'class' => 'you_sure', |
| 1178 | 1178 | 'icon' => 'remove_button', |
| 1179 | 1179 | 'show' => $post['can_delete'] |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | |
| 204 | 204 | $feed_meta = array( |
| 205 | 205 | 'title' => sprintf($txt['profile_of_username'], $user_profile[$uid]['real_name']), |
| 206 | - 'desc' => sentence_list(array_map(function ($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
| 206 | + 'desc' => sentence_list(array_map(function($datatype) use ($txt) { return $txt[$datatype]; }, array_keys($included))), |
|
| 207 | 207 | 'author' => $mbname, |
| 208 | 208 | 'source' => $scripturl . '?action=profile;u=' . $uid, |
| 209 | 209 | 'self' => '', // Unused, but can't be null. |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | 'src' => 'src="' . $currentAttachment['href'] . '" onerror="$(\'.dlattach_' . $currentAttachment['id'] . '\').show(); $(\'.dlattach_' . $currentAttachment['id'] . '\').css({\'position\': \'absolute\'});"', |
| 724 | 724 | ), |
| 725 | 725 | $returnContext |
| 726 | - ) . $hidden_orig_link . '</span>' ; |
|
| 726 | + ) . $hidden_orig_link . '</span>'; |
|
| 727 | 727 | } |
| 728 | 728 | elseif (strpos($currentAttachment['mime_type'], 'video/') === 0) |
| 729 | 729 | { |
@@ -393,17 +393,17 @@ discard block |
||
| 393 | 393 | $quickbuttons = array( |
| 394 | 394 | 'approve' => array( |
| 395 | 395 | 'label' => $txt['approve'], |
| 396 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';approve='.$item['id'], |
|
| 396 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';approve=' . $item['id'], |
|
| 397 | 397 | 'icon' => 'approve', |
| 398 | 398 | ), |
| 399 | 399 | 'delete' => array( |
| 400 | 400 | 'label' => $txt['remove'], |
| 401 | - 'href' => $scripturl.'?action=moderate;area=postmod;sa='.$context['current_view'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'].';delete='.$item['id'], |
|
| 401 | + 'href' => $scripturl . '?action=moderate;area=postmod;sa=' . $context['current_view'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'] . ';delete=' . $item['id'], |
|
| 402 | 402 | 'icon' => 'remove_button', |
| 403 | 403 | 'show' => $item['can_delete'] |
| 404 | 404 | ), |
| 405 | 405 | 'quickmod' => array( |
| 406 | - 'content' => '<input type="checkbox" name="item[]" value="'.$item['id'].'" checked>', |
|
| 406 | + 'content' => '<input type="checkbox" name="item[]" value="' . $item['id'] . '" checked>', |
|
| 407 | 407 | 'show' => !empty($options['display_quick_mod']) && $options['display_quick_mod'] == 1 |
| 408 | 408 | ), |
| 409 | 409 | ); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | $quickbuttons = array( |
| 469 | 469 | 'delete' => array( |
| 470 | 470 | 'label' => $txt['remove_message'], |
| 471 | - 'href' => $scripturl.'?action=moderate;area=userwatch;sa=post;delete='.$post['id'].';start='.$context['start'].';'.$context['session_var'].'='.$context['session_id'], |
|
| 471 | + 'href' => $scripturl . '?action=moderate;area=userwatch;sa=post;delete=' . $post['id'] . ';start=' . $context['start'] . ';' . $context['session_var'] . '=' . $context['session_id'], |
|
| 472 | 472 | 'javascript' => 'data-confirm="' . $txt['mc_watched_users_delete_post'] . '"', |
| 473 | 473 | 'class' => 'you_sure', |
| 474 | 474 | 'icon' => 'remove_button', |
@@ -1721,7 +1721,7 @@ discard block |
||
| 1721 | 1721 | { |
| 1722 | 1722 | // Avoid double separators and empty titled sections |
| 1723 | 1723 | $empty_section = true; |
| 1724 | - for ($j=$i+1; $j < count($context['theme_options']); $j++) |
|
| 1724 | + for ($j = $i + 1; $j < count($context['theme_options']); $j++) |
|
| 1725 | 1725 | { |
| 1726 | 1726 | // Found another separator, so we're done |
| 1727 | 1727 | if (!is_array($context['theme_options'][$j])) |
@@ -2700,8 +2700,7 @@ discard block |
||
| 2700 | 2700 | foreach ($context['post_errors'] as $error) |
| 2701 | 2701 | { |
| 2702 | 2702 | $text_key_error = $error == 'password_short' ? |
| 2703 | - sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : |
|
| 2704 | - $txt['profile_error_' . $error]; |
|
| 2703 | + sprintf($txt['profile_error_' . $error], (empty($modSettings['password_strength']) ? 4 : 8)) : $txt['profile_error_' . $error]; |
|
| 2705 | 2704 | |
| 2706 | 2705 | echo ' |
| 2707 | 2706 | <li>', isset($txt['profile_error_' . $error]) ? $text_key_error : $error, '</li>'; |
@@ -1860,25 +1860,25 @@ |
||
| 1860 | 1860 | $fields = array(); |
| 1861 | 1861 | $new_sort = array(); |
| 1862 | 1862 | |
| 1863 | - while($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 1863 | + while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 1864 | 1864 | $fields[] = $row['id_field']; |
| 1865 | 1865 | $smcFunc['db_free_result']($request); |
| 1866 | 1866 | |
| 1867 | 1867 | $idx = array_search($context['fid'], $fields); |
| 1868 | 1868 | |
| 1869 | - if ($_GET['move'] == 'down' && count($fields) - 1 > $idx ) |
|
| 1869 | + if ($_GET['move'] == 'down' && count($fields) - 1 > $idx) |
|
| 1870 | 1870 | { |
| 1871 | - $new_sort = array_slice($fields ,0 ,$idx ,true); |
|
| 1871 | + $new_sort = array_slice($fields, 0, $idx, true); |
|
| 1872 | 1872 | $new_sort[] = $fields[$idx + 1]; |
| 1873 | 1873 | $new_sort[] = $fields[$idx]; |
| 1874 | - $new_sort += array_slice($fields ,$idx + 2 ,count($fields) ,true); |
|
| 1874 | + $new_sort += array_slice($fields, $idx + 2, count($fields), true); |
|
| 1875 | 1875 | } |
| 1876 | 1876 | elseif ($context['fid'] > 0 and $idx < count($fields)) |
| 1877 | 1877 | { |
| 1878 | - $new_sort = array_slice($fields ,0 ,($idx - 1) ,true); |
|
| 1878 | + $new_sort = array_slice($fields, 0, ($idx - 1), true); |
|
| 1879 | 1879 | $new_sort[] = $fields[$idx]; |
| 1880 | 1880 | $new_sort[] = $fields[$idx - 1]; |
| 1881 | - $new_sort += array_slice($fields ,($idx + 1) ,count($fields) ,true); |
|
| 1881 | + $new_sort += array_slice($fields, ($idx + 1), count($fields), true); |
|
| 1882 | 1882 | } |
| 1883 | 1883 | else |
| 1884 | 1884 | redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler |