@@ -955,7 +955,7 @@ discard block |
||
| 955 | 955 | } |
| 956 | 956 | |
| 957 | 957 | echo isset($config_var['postinput']) ? ' |
| 958 | - ' . $config_var['postinput'] : '',' |
|
| 958 | + ' . $config_var['postinput'] : '', ' |
|
| 959 | 959 | </dd>'; |
| 960 | 960 | } |
| 961 | 961 | } |
@@ -1675,7 +1675,7 @@ discard block |
||
| 1675 | 1675 | </dl> |
| 1676 | 1676 | <input type="submit" name="save_setting" value="', $txt['save'], '" class="button"> |
| 1677 | 1677 | <div class="block"> |
| 1678 | - ',template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message') ,' |
|
| 1678 | + ',template_control_richedit($context['post_box_name'], 'smileyBox_message', 'bbcBox_message'), ' |
|
| 1679 | 1679 | </div> |
| 1680 | 1680 | <input type="submit" name="save_new_policy" value="', $txt['policy_save'], '" class="button"> |
| 1681 | 1681 | <input type="submit" name="update_policy" value="', $txt['policy_update'], '" class="button">'; |
@@ -1342,7 +1342,7 @@ discard block |
||
| 1342 | 1342 | 'class' => 'centercol', |
| 1343 | 1343 | ), |
| 1344 | 1344 | 'data' => array( |
| 1345 | - 'function' => function ($rowData) |
|
| 1345 | + 'function' => function($rowData) |
|
| 1346 | 1346 | { |
| 1347 | 1347 | $isChecked = $rowData['disabled'] ? '' : ' checked'; |
| 1348 | 1348 | $onClickHandler = $rowData['can_show_register'] ? sprintf(' onclick="document.getElementById(\'reg_%1$s\').disabled = !this.checked;"', $rowData['id']) : ''; |
@@ -1358,7 +1358,7 @@ discard block |
||
| 1358 | 1358 | 'class' => 'centercol', |
| 1359 | 1359 | ), |
| 1360 | 1360 | 'data' => array( |
| 1361 | - 'function' => function ($rowData) |
|
| 1361 | + 'function' => function($rowData) |
|
| 1362 | 1362 | { |
| 1363 | 1363 | $isChecked = $rowData['on_register'] && !$rowData['disabled'] ? ' checked' : ''; |
| 1364 | 1364 | $isDisabled = $rowData['can_show_register'] ? '' : ' disabled'; |
@@ -1405,15 +1405,15 @@ discard block |
||
| 1405 | 1405 | 'value' => $txt['custom_profile_fieldorder'], |
| 1406 | 1406 | ), |
| 1407 | 1407 | 'data' => array( |
| 1408 | - 'function' => function ($rowData) use ($context, $txt, $scripturl) |
|
| 1408 | + 'function' => function($rowData) use ($context, $txt, $scripturl) |
|
| 1409 | 1409 | { |
| 1410 | - $return = '<p class="centertext bold_text">'. $rowData['field_order'] .'<br>'; |
|
| 1410 | + $return = '<p class="centertext bold_text">' . $rowData['field_order'] . '<br>'; |
|
| 1411 | 1411 | |
| 1412 | 1412 | if ($rowData['field_order'] > 1) |
| 1413 | - $return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=up"><span class="toggle_up" title="'. $txt['custom_edit_order_move'] .' '. $txt['custom_edit_order_up'] .'"></span></a>'; |
|
| 1413 | + $return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=up"><span class="toggle_up" title="' . $txt['custom_edit_order_move'] . ' ' . $txt['custom_edit_order_up'] . '"></span></a>'; |
|
| 1414 | 1414 | |
| 1415 | 1415 | if ($rowData['field_order'] < $context['custFieldsMaxOrder']) |
| 1416 | - $return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=down"><span class="toggle_down" title="'. $txt['custom_edit_order_move'] .' '. $txt['custom_edit_order_down'] .'"></span></a>'; |
|
| 1416 | + $return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=down"><span class="toggle_down" title="' . $txt['custom_edit_order_move'] . ' ' . $txt['custom_edit_order_down'] . '"></span></a>'; |
|
| 1417 | 1417 | |
| 1418 | 1418 | $return .= '</p>'; |
| 1419 | 1419 | |
@@ -1431,7 +1431,7 @@ discard block |
||
| 1431 | 1431 | 'value' => $txt['custom_profile_fieldname'], |
| 1432 | 1432 | ), |
| 1433 | 1433 | 'data' => array( |
| 1434 | - 'function' => function ($rowData) use ($scripturl) |
|
| 1434 | + 'function' => function($rowData) use ($scripturl) |
|
| 1435 | 1435 | { |
| 1436 | 1436 | return sprintf('<a href="%1$s?action=admin;area=featuresettings;sa=profileedit;fid=%2$d">%3$s</a><div class="smalltext">%4$s</div>', $scripturl, $rowData['id_field'], $rowData['field_name'], $rowData['field_desc']); |
| 1437 | 1437 | }, |
@@ -1447,7 +1447,7 @@ discard block |
||
| 1447 | 1447 | 'value' => $txt['custom_profile_fieldtype'], |
| 1448 | 1448 | ), |
| 1449 | 1449 | 'data' => array( |
| 1450 | - 'function' => function ($rowData) use ($txt) |
|
| 1450 | + 'function' => function($rowData) use ($txt) |
|
| 1451 | 1451 | { |
| 1452 | 1452 | $textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']); |
| 1453 | 1453 | return isset($txt[$textKey]) ? $txt[$textKey] : $textKey; |
@@ -1465,7 +1465,7 @@ discard block |
||
| 1465 | 1465 | 'value' => $txt['custom_profile_active'], |
| 1466 | 1466 | ), |
| 1467 | 1467 | 'data' => array( |
| 1468 | - 'function' => function ($rowData) use ($txt) |
|
| 1468 | + 'function' => function($rowData) use ($txt) |
|
| 1469 | 1469 | { |
| 1470 | 1470 | return $rowData['active'] ? $txt['yes'] : $txt['no']; |
| 1471 | 1471 | }, |
@@ -1482,7 +1482,7 @@ discard block |
||
| 1482 | 1482 | 'value' => $txt['custom_profile_placement'], |
| 1483 | 1483 | ), |
| 1484 | 1484 | 'data' => array( |
| 1485 | - 'function' => function ($rowData) |
|
| 1485 | + 'function' => function($rowData) |
|
| 1486 | 1486 | { |
| 1487 | 1487 | global $txt, $context; |
| 1488 | 1488 | |
@@ -1717,7 +1717,7 @@ discard block |
||
| 1717 | 1717 | redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler |
| 1718 | 1718 | |
| 1719 | 1719 | // All good, proceed. |
| 1720 | - $smcFunc['db_query']('',' |
|
| 1720 | + $smcFunc['db_query']('', ' |
|
| 1721 | 1721 | UPDATE {db_prefix}custom_fields |
| 1722 | 1722 | SET field_order = {int:old_order} |
| 1723 | 1723 | WHERE field_order = {int:new_order}', |
@@ -1726,7 +1726,7 @@ discard block |
||
| 1726 | 1726 | 'old_order' => $context['field']['order'], |
| 1727 | 1727 | ) |
| 1728 | 1728 | ); |
| 1729 | - $smcFunc['db_query']('',' |
|
| 1729 | + $smcFunc['db_query']('', ' |
|
| 1730 | 1730 | UPDATE {db_prefix}custom_fields |
| 1731 | 1731 | SET field_order = {int:new_order} |
| 1732 | 1732 | WHERE id_field = {int:id_field}', |
@@ -1828,7 +1828,7 @@ discard block |
||
| 1828 | 1828 | $smcFunc['db_free_result']($request); |
| 1829 | 1829 | |
| 1830 | 1830 | $unique = false; |
| 1831 | - for ($i = 0; !$unique && $i < 9; $i ++) |
|
| 1831 | + for ($i = 0; !$unique && $i < 9; $i++) |
|
| 1832 | 1832 | { |
| 1833 | 1833 | if (!in_array($col_name, $current_fields)) |
| 1834 | 1834 | $unique = true; |
@@ -2001,7 +2001,7 @@ discard block |
||
| 2001 | 2001 | ); |
| 2002 | 2002 | |
| 2003 | 2003 | // Re-arrange the order. |
| 2004 | - $smcFunc['db_query']('',' |
|
| 2004 | + $smcFunc['db_query']('', ' |
|
| 2005 | 2005 | UPDATE {db_prefix}custom_fields |
| 2006 | 2006 | SET field_order = field_order - 1 |
| 2007 | 2007 | WHERE field_order > {int:current_order}', |
@@ -2266,7 +2266,7 @@ discard block |
||
| 2266 | 2266 | $context['token_check'] = 'noti-admin'; |
| 2267 | 2267 | |
| 2268 | 2268 | // Specify our action since we'll want to post back here instead of the profile |
| 2269 | - $context['action'] = 'action=admin;area=featuresettings;sa=alerts;'. $context['session_var'] .'='. $context['session_id']; |
|
| 2269 | + $context['action'] = 'action=admin;area=featuresettings;sa=alerts;' . $context['session_var'] . '=' . $context['session_id']; |
|
| 2270 | 2270 | |
| 2271 | 2271 | loadTemplate('Profile'); |
| 2272 | 2272 | loadLanguage('Profile'); |
@@ -2347,7 +2347,7 @@ discard block |
||
| 2347 | 2347 | // Now create the editor. |
| 2348 | 2348 | $editorOptions = array( |
| 2349 | 2349 | 'id' => 'policy_text', |
| 2350 | - 'value' => !empty($modSettings['policy_text'.$currentVersion]) ? $modSettings['policy_text'.$currentVersion] : '', |
|
| 2350 | + 'value' => !empty($modSettings['policy_text' . $currentVersion]) ? $modSettings['policy_text' . $currentVersion] : '', |
|
| 2351 | 2351 | 'height' => '250px', |
| 2352 | 2352 | 'width' => '100%', |
| 2353 | 2353 | 'labels' => array( |
@@ -2379,18 +2379,18 @@ discard block |
||
| 2379 | 2379 | if (!empty($_REQUEST['save_new_policy'])) |
| 2380 | 2380 | { |
| 2381 | 2381 | $currentVersion++; |
| 2382 | - $config_vars[] = array('text', 'policy_text'.$currentVersion); |
|
| 2383 | - $_POST['policy_text'.$currentVersion] = $_REQUEST['policy_text']; |
|
| 2382 | + $config_vars[] = array('text', 'policy_text' . $currentVersion); |
|
| 2383 | + $_POST['policy_text' . $currentVersion] = $_REQUEST['policy_text']; |
|
| 2384 | 2384 | $config_vars[] = array('text', 'policy_version'); |
| 2385 | - $_POST['policy_version'] = 'policy_text'.$currentVersion; |
|
| 2385 | + $_POST['policy_version'] = 'policy_text' . $currentVersion; |
|
| 2386 | 2386 | unset($config_vars[1]); |
| 2387 | 2387 | } |
| 2388 | 2388 | elseif (!empty($_REQUEST['update_policy'])) |
| 2389 | 2389 | { |
| 2390 | - $config_vars[] = array('text', 'policy_text'.$currentVersion); |
|
| 2391 | - $_POST['policy_text'.$currentVersion] = $_REQUEST['policy_text']; |
|
| 2390 | + $config_vars[] = array('text', 'policy_text' . $currentVersion); |
|
| 2391 | + $_POST['policy_text' . $currentVersion] = $_REQUEST['policy_text']; |
|
| 2392 | 2392 | $config_vars[] = array('text', 'policy_version'); |
| 2393 | - $_POST['policy_version'] = 'policy_text'.$currentVersion; |
|
| 2393 | + $_POST['policy_version'] = 'policy_text' . $currentVersion; |
|
| 2394 | 2394 | unset($config_vars[1]); |
| 2395 | 2395 | } |
| 2396 | 2396 | saveDBSettings($config_vars); |
@@ -996,12 +996,12 @@ discard block |
||
| 996 | 996 | { |
| 997 | 997 | loadMemberData($memID, false, 'profile'); |
| 998 | 998 | $profile = $user_profile[$memID]; |
| 999 | - $removeFields = array('secret_question','tfa_secret','password_salt'); |
|
| 999 | + $removeFields = array('secret_question', 'tfa_secret', 'password_salt'); |
|
| 1000 | 1000 | foreach ($removeFields as $value) |
| 1001 | 1001 | { |
| 1002 | 1002 | unset($profile[$value]); |
| 1003 | 1003 | } |
| 1004 | - foreach($profile as $key => &$value) |
|
| 1004 | + foreach ($profile as $key => &$value) |
|
| 1005 | 1005 | { |
| 1006 | 1006 | if (is_array($value)) |
| 1007 | 1007 | $value = $smcFunc['json_encode']($value); |
@@ -1013,7 +1013,7 @@ discard block |
||
| 1013 | 1013 | elseif ($mode == 'messages') // messages |
| 1014 | 1014 | { |
| 1015 | 1015 | |
| 1016 | - $request = $smcFunc['db_query']('',' |
|
| 1016 | + $request = $smcFunc['db_query']('', ' |
|
| 1017 | 1017 | SELECT id_msg, id_topic, poster_time, subject, modified_time, modified_name, modified_reason, body, likes, poster_ip |
| 1018 | 1018 | FROM {db_prefix}messages |
| 1019 | 1019 | WHERE id_member = {int:memID}', |
@@ -1031,7 +1031,7 @@ discard block |
||
| 1031 | 1031 | } |
| 1032 | 1032 | elseif ($mode == 'pmessages') |
| 1033 | 1033 | { |
| 1034 | - $request = $smcFunc['db_query']('',' |
|
| 1034 | + $request = $smcFunc['db_query']('', ' |
|
| 1035 | 1035 | SELECT pm.msgtime, pm.subject, pm.body |
| 1036 | 1036 | FROM {db_prefix}personal_messages pm |
| 1037 | 1037 | LEFT JOIN {db_prefix}pm_recipients pmr on (pm.id_pm = pmr.id_pm and pmr.id_member = {int:memID}) |
@@ -1049,14 +1049,14 @@ discard block |
||
| 1049 | 1049 | } |
| 1050 | 1050 | $count = count($profileData); |
| 1051 | 1051 | $csv_data = ''; |
| 1052 | - for($i = 0; $i < $count; $i++) |
|
| 1052 | + for ($i = 0; $i < $count; $i++) |
|
| 1053 | 1053 | { |
| 1054 | 1054 | $csv_data .= arrayToCsv($profileData[$i]) . "\r\n"; |
| 1055 | 1055 | } |
| 1056 | 1056 | |
| 1057 | 1057 | |
| 1058 | 1058 | header("Pragma: no-cache"); |
| 1059 | - header('Content-Disposition: attachment; filename="privacySMF'.$mode.'.csv";'); |
|
| 1059 | + header('Content-Disposition: attachment; filename="privacySMF' . $mode . '.csv";'); |
|
| 1060 | 1060 | header("Content-Length: " . strlen($csv_data)); |
| 1061 | 1061 | header("Content-Transfer-Encoding: binary"); |
| 1062 | 1062 | header("Content-Type: application/force-download"); |
@@ -1107,12 +1107,12 @@ discard block |
||
| 1107 | 1107 | exit; |
| 1108 | 1108 | loadMemberData($memID, false, 'profile'); |
| 1109 | 1109 | $profile = $user_profile[$memID]; |
| 1110 | - $removeFields = array('secret_question','tfa_secret','password_salt'); |
|
| 1110 | + $removeFields = array('secret_question', 'tfa_secret', 'password_salt'); |
|
| 1111 | 1111 | foreach ($removeFields as $value) |
| 1112 | 1112 | { |
| 1113 | 1113 | unset($profile[$value]); |
| 1114 | 1114 | } |
| 1115 | - foreach($profile as $key => &$value) |
|
| 1115 | + foreach ($profile as $key => &$value) |
|
| 1116 | 1116 | { |
| 1117 | 1117 | if (is_array($value)) |
| 1118 | 1118 | $value = $smcFunc['json_encode']($value); |
@@ -1133,12 +1133,12 @@ discard block |
||
| 1133 | 1133 | * @param boolean $encloseAll enclose all |
| 1134 | 1134 | * @param boolean $nullToMysqlNull |
| 1135 | 1135 | */ |
| 1136 | -function arrayToCsv( array $fields, $delimiter = ';', $enclosure = '"', $encloseAll = false, $nullToMysqlNull = false ) { |
|
| 1136 | +function arrayToCsv(array $fields, $delimiter = ';', $enclosure = '"', $encloseAll = false, $nullToMysqlNull = false) { |
|
| 1137 | 1137 | $delimiter_esc = preg_quote($delimiter, '/'); |
| 1138 | 1138 | $enclosure_esc = preg_quote($enclosure, '/'); |
| 1139 | 1139 | |
| 1140 | 1140 | $output = array(); |
| 1141 | - foreach ( $fields as $field ) |
|
| 1141 | + foreach ($fields as $field) |
|
| 1142 | 1142 | { |
| 1143 | 1143 | if ($field === null && $nullToMysqlNull) |
| 1144 | 1144 | { |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | } |
| 1148 | 1148 | |
| 1149 | 1149 | // Enclose fields containing $delimiter, $enclosure or whitespace |
| 1150 | - if ( $encloseAll || preg_match( "/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field ) ) |
|
| 1150 | + if ($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) |
|
| 1151 | 1151 | { |
| 1152 | 1152 | $output[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field) . $enclosure; |
| 1153 | 1153 | } |
@@ -1157,7 +1157,7 @@ discard block |
||
| 1157 | 1157 | } |
| 1158 | 1158 | } |
| 1159 | 1159 | |
| 1160 | - return implode( $delimiter, $output ); |
|
| 1160 | + return implode($delimiter, $output); |
|
| 1161 | 1161 | } |
| 1162 | 1162 | |
| 1163 | 1163 | ?> |
| 1164 | 1164 | \ No newline at end of file |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | $fields = ''; |
| 460 | 460 | foreach ($context['print_custom_fields']['below_signature'] as $field) |
| 461 | 461 | if (!empty($field['output_html'])) |
| 462 | - $fields .= ' |
|
| 462 | + $fields .= ' |
|
| 463 | 463 | <li>' . $field['output_html'] . '</li>'; |
| 464 | 464 | |
| 465 | 465 | if (!empty($fields)) |
@@ -3272,7 +3272,7 @@ discard block |
||
| 3272 | 3272 | ', $txt['profileDataCenter'], ' |
| 3273 | 3273 | </h3> |
| 3274 | 3274 | </div> |
| 3275 | - ',( !empty($context['pdc']['nofound']) ? '<p class="information">' . $txt['profileDataNotFound'] . '</p>' : ''),'<div class="windowbg"> |
|
| 3275 | + ',(!empty($context['pdc']['nofound']) ? '<p class="information">' . $txt['profileDataNotFound'] . '</p>' : ''), '<div class="windowbg"> |
|
| 3276 | 3276 | <div> |
| 3277 | 3277 | <form action="', $scripturl, '?action=profile;area=getprofiledata;activity=profile" method="post" accept-charset="', $context['character_set'], '" name="creator" id="creator"> |
| 3278 | 3278 | <p', '', '>', (!empty($context['pdc']['own']) ? $txt['profileDownloadProfile_own'] : sprintf($txt['profileDownloadProfile_any'], $context['pdc']['name'])), ': </p> |
@@ -3331,7 +3331,7 @@ discard block |
||
| 3331 | 3331 | <div class="title_bar"> |
| 3332 | 3332 | <h3 class="titlebg">', $txt['policy_approved'], '</h3> |
| 3333 | 3333 | </div> |
| 3334 | - <p>' ,$context['poc']['approved_text'] , '</p> |
|
| 3334 | + <p>' ,$context['poc']['approved_text'], '</p> |
|
| 3335 | 3335 | </div>'; |
| 3336 | 3336 | if (!empty($context['poc']['newVersionText'])) |
| 3337 | 3337 | echo ' |
@@ -3339,7 +3339,7 @@ discard block |
||
| 3339 | 3339 | <div class="title_bar"> |
| 3340 | 3340 | <h3 class="titlebg">', $txt['policy_new'], '</h3> |
| 3341 | 3341 | </div> |
| 3342 | - <p>' ,$context['poc']['newVersionText'] , '</p> |
|
| 3342 | + <p>' ,$context['poc']['newVersionText'], '</p> |
|
| 3343 | 3343 | </div>'; |
| 3344 | 3344 | |
| 3345 | 3345 | if (!empty($context['poc']['own']) && !empty($context['poc']['newVersionText'])) |