@@ -368,7 +368,7 @@ discard block |
||
368 | 368 | // Prepare the pagination vars. |
369 | 369 | $maxIndex = 10; |
370 | 370 | $start = (int) isset($_REQUEST['start']) ? $_REQUEST['start'] : 0; |
371 | - $count = alert_count($memID); |
|
371 | + $count = alert_count($memID); |
|
372 | 372 | |
373 | 373 | // Get the alerts. |
374 | 374 | $context['alerts'] = fetch_alerts($memID, true, false, array('start' => $start, 'maxIndex' => $maxIndex)); |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | ), |
834 | 834 | ), |
835 | 835 | 'data_check' => array( |
836 | - 'class' => function ($data) |
|
836 | + 'class' => function($data) |
|
837 | 837 | { |
838 | 838 | return $data['approved'] ? '' : 'approvebg'; |
839 | 839 | } |
@@ -1536,7 +1536,7 @@ discard block |
||
1536 | 1536 | ), |
1537 | 1537 | 'data' => array( |
1538 | 1538 | 'sprintf' => array( |
1539 | - 'format' => '<a href="' . $scripturl . '?action=profile;area=tracking;sa=ip;searchip=%1$s;u=' . $memID. '">%1$s</a>', |
|
1539 | + 'format' => '<a href="' . $scripturl . '?action=profile;area=tracking;sa=ip;searchip=%1$s;u=' . $memID . '">%1$s</a>', |
|
1540 | 1540 | 'params' => array( |
1541 | 1541 | 'ip' => false, |
1542 | 1542 | ), |
@@ -111,7 +111,7 @@ |
||
111 | 111 | require_once($sourcedir . '/Subs-Post.php'); |
112 | 112 | |
113 | 113 | $errors = array(); |
114 | - $news = !isset($_POST['news'])? '' : $smcFunc['htmlspecialchars']($_POST['news'], ENT_QUOTES); |
|
114 | + $news = !isset($_POST['news']) ? '' : $smcFunc['htmlspecialchars']($_POST['news'], ENT_QUOTES); |
|
115 | 115 | if (empty($news)) |
116 | 116 | $errors[] = array('value' => 'no_news'); |
117 | 117 | else |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | if (filemtime($boarddir . '/db_last_error.php') === $last_db_error_change) |
176 | 176 | { |
177 | 177 | // Write the change |
178 | - $write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>'; |
|
178 | + $write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>'; |
|
179 | 179 | $written_bytes = file_put_contents($boarddir . '/db_last_error.php', $write_db_change, LOCK_EX); |
180 | 180 | |
181 | 181 | // survey says ... |
@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | ', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br> |
249 | 249 | ', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br> |
250 | 250 | ', $txt['debug_hooks'], empty($context['debug']['hooks']) ? 0 : count($context['debug']['hooks']) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_hooks\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_hooks" style="display: none;"><em>' . implode('</em>, <em>', $context['debug']['hooks']), '</em></span>)', '<br> |
251 | - ',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">'. $txt['debug_show'] .'</a><span id="debug_instances" style="display: none;"><em>'. implode('</em>, <em>', array_keys($context['debug']['instances'])) .'</em></span>)'. '<br>') : ''),' |
|
251 | + ',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">' . $txt['debug_show'] . '</a><span id="debug_instances" style="display: none;"><em>' . implode('</em>, <em>', array_keys($context['debug']['instances'])) . '</em></span>)' . '<br>') : ''), ' |
|
252 | 252 | ', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br>'; |
253 | 253 | |
254 | 254 | if (function_exists('memory_get_peak_usage')) |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | if (!empty($db_options['persist'])) |
64 | 64 | $connection = @pg_pconnect('host=' . $db_server . ' dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\'' . (empty($db_options['port']) ? '' : ' port=\'' . $db_options['port'] . '\'')); |
65 | 65 | else |
66 | - $connection = @pg_connect( 'host=' . $db_server . ' dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\'' . (empty($db_options['port']) ? '' : ' port=\'' . $db_options['port'] . '\'')); |
|
66 | + $connection = @pg_connect('host=' . $db_server . ' dbname=' . $db_name . ' user=\'' . $db_user . '\' password=\'' . $db_passwd . '\'' . (empty($db_options['port']) ? '' : ' port=\'' . $db_options['port'] . '\'')); |
|
67 | 67 | |
68 | 68 | // Something's wrong, show an error if its fatal (which we assume it is) |
69 | 69 | if (!$connection) |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | * |
88 | 88 | * @param string $type Indicates which additional file to load. ('extra', 'packages') |
89 | 89 | */ |
90 | -function db_extend ($type = 'extra') |
|
90 | +function db_extend($type = 'extra') |
|
91 | 91 | { |
92 | 92 | global $sourcedir, $db_type; |
93 | 93 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @param string $db_prefix The database prefix |
104 | 104 | * @param string $db_name The database name |
105 | 105 | */ |
106 | -function db_fix_prefix (&$db_prefix, $db_name) |
|
106 | +function db_fix_prefix(&$db_prefix, $db_name) |
|
107 | 107 | { |
108 | 108 | return; |
109 | 109 | } |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | $replacement[$key] = 'null'; |
236 | 236 | if (!isValidIP($value)) |
237 | 237 | smf_db_error_backtrace('Wrong value type sent to the database. IPv4 or IPv6 expected.(' . $matches[2] . ')', '', E_USER_ERROR, __FILE__, __LINE__); |
238 | - $replacement[$key] = sprintf('\'%1$s\'::inet', pg_escape_string($value)); |
|
238 | + $replacement[$key] = sprintf('\'%1$s\'::inet', pg_escape_string($value)); |
|
239 | 239 | } |
240 | 240 | |
241 | 241 | return implode(', ', $replacement); |
@@ -548,7 +548,7 @@ discard block |
||
548 | 548 | |
549 | 549 | // Log the error. |
550 | 550 | if (function_exists('log_error')) |
551 | - log_error($txt['database_error'] . ': ' . $query_error . (!empty($modSettings['enableErrorQueryLogging']) ? "\n\n" .$db_string : ''), 'database', $file, $line); |
|
551 | + log_error($txt['database_error'] . ': ' . $query_error . (!empty($modSettings['enableErrorQueryLogging']) ? "\n\n" . $db_string : ''), 'database', $file, $line); |
|
552 | 552 | |
553 | 553 | // Nothing's defined yet... just die with it. |
554 | 554 | if (empty($context) || empty($txt)) |
@@ -684,31 +684,31 @@ discard block |
||
684 | 684 | static $pg_version; |
685 | 685 | static $replace_support; |
686 | 686 | |
687 | - if(empty($pg_version)) |
|
687 | + if (empty($pg_version)) |
|
688 | 688 | { |
689 | 689 | db_extend(); |
690 | 690 | //pg 9.5 got replace support |
691 | 691 | $pg_version = $smcFunc['db_get_version'](); |
692 | 692 | // if we got a Beta Version |
693 | 693 | if (stripos($pg_version, 'beta') !== false) |
694 | - $pg_version = substr($pg_version, 0, stripos($pg_version, 'beta')).'.0'; |
|
694 | + $pg_version = substr($pg_version, 0, stripos($pg_version, 'beta')) . '.0'; |
|
695 | 695 | // or RC |
696 | 696 | if (stripos($pg_version, 'rc') !== false) |
697 | - $pg_version = substr($pg_version, 0, stripos($pg_version, 'rc')).'.0'; |
|
697 | + $pg_version = substr($pg_version, 0, stripos($pg_version, 'rc')) . '.0'; |
|
698 | 698 | |
699 | - $replace_support = (version_compare($pg_version,'9.5.0','>=') ? true : false); |
|
699 | + $replace_support = (version_compare($pg_version, '9.5.0', '>=') ? true : false); |
|
700 | 700 | } |
701 | 701 | |
702 | 702 | $count = 0; |
703 | 703 | $where = ''; |
704 | 704 | $count_pk = 0; |
705 | 705 | |
706 | - If($replace_support) |
|
706 | + If ($replace_support) |
|
707 | 707 | { |
708 | 708 | foreach ($columns as $columnName => $type) |
709 | 709 | { |
710 | 710 | //check pk fiel |
711 | - IF(in_array($columnName, $keys)) |
|
711 | + IF (in_array($columnName, $keys)) |
|
712 | 712 | { |
713 | 713 | $key_str .= ($count_pk > 0 ? ',' : ''); |
714 | 714 | $key_str .= $columnName; |
@@ -717,11 +717,11 @@ discard block |
||
717 | 717 | else //normal field |
718 | 718 | { |
719 | 719 | $col_str .= ($count > 0 ? ',' : ''); |
720 | - $col_str .= $columnName.' = EXCLUDED.'.$columnName; |
|
720 | + $col_str .= $columnName . ' = EXCLUDED.' . $columnName; |
|
721 | 721 | $count++; |
722 | 722 | } |
723 | 723 | } |
724 | - $replace = ' ON CONFLICT ('.$key_str.') DO UPDATE SET '.$col_str; |
|
724 | + $replace = ' ON CONFLICT (' . $key_str . ') DO UPDATE SET ' . $col_str; |
|
725 | 725 | } |
726 | 726 | else |
727 | 727 | { |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | $smcFunc['db_query']('', ' |
782 | 782 | INSERT INTO ' . $table . '("' . implode('", "', $indexed_columns) . '") |
783 | 783 | VALUES |
784 | - ' . $entry.$replace, |
|
784 | + ' . $entry . $replace, |
|
785 | 785 | array( |
786 | 786 | 'security_override' => true, |
787 | 787 | 'db_error_skip' => $method == 'ignore' || $table === $db_prefix . 'log_errors', |
@@ -876,7 +876,7 @@ discard block |
||
876 | 876 | * @param bool $translate_human_wildcards If true, turns human readable wildcards into SQL wildcards. |
877 | 877 | * @return string The escaped string |
878 | 878 | */ |
879 | -function smf_db_escape_wildcard_string($string, $translate_human_wildcards=false) |
|
879 | +function smf_db_escape_wildcard_string($string, $translate_human_wildcards = false) |
|
880 | 880 | { |
881 | 881 | $replacements = array( |
882 | 882 | '%' => '\%', |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | else |
238 | 238 | { |
239 | 239 | $query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? ' |
240 | - AND b.id_board != {int:recycle_board}' : ''). ' |
|
240 | + AND b.id_board != {int:recycle_board}' : '') . ' |
|
241 | 241 | AND m.id_msg >= {int:max_id_msg}'; |
242 | 242 | $query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 100 - $_REQUEST['start'] * 6); |
243 | 243 | $query_parameters['recycle_board'] = $modSettings['recycle_board']; |
@@ -1124,7 +1124,7 @@ discard block |
||
1124 | 1124 | ); |
1125 | 1125 | else |
1126 | 1126 | $request = $smcFunc['db_query']('', ' |
1127 | - SELECT DISTINCT t.id_topic,'.$_REQUEST['sort'].' |
|
1127 | + SELECT DISTINCT t.id_topic,'.$_REQUEST['sort'] . ' |
|
1128 | 1128 | FROM {db_prefix}topics AS t |
1129 | 1129 | INNER JOIN {db_prefix}messages AS m ON (m.id_topic = t.id_topic AND m.id_member = {int:current_member})' . (strpos($_REQUEST['sort'], 'ms.') === false ? '' : ' |
1130 | 1130 | INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)') . (strpos($_REQUEST['sort'], 'mems.') === false ? '' : ' |
@@ -1391,7 +1391,7 @@ discard block |
||
1391 | 1391 | if ($is_topics) |
1392 | 1392 | { |
1393 | 1393 | $context['recent_buttons'] = array( |
1394 | - 'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.png', 'custom' => 'data-confirm="'. $txt['are_sure_mark_read'] .'"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']), |
|
1394 | + 'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.png', 'custom' => 'data-confirm="' . $txt['are_sure_mark_read'] . '"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']), |
|
1395 | 1395 | ); |
1396 | 1396 | |
1397 | 1397 | if ($context['showCheckboxes']) |
@@ -1407,7 +1407,7 @@ discard block |
||
1407 | 1407 | elseif (!$is_topics && isset($context['topics_to_mark'])) |
1408 | 1408 | { |
1409 | 1409 | $context['recent_buttons'] = array( |
1410 | - 'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'custom' => 'data-confirm="'. $txt['are_sure_mark_read'] .'"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']), |
|
1410 | + 'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'custom' => 'data-confirm="' . $txt['are_sure_mark_read'] . '"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']), |
|
1411 | 1411 | ); |
1412 | 1412 | |
1413 | 1413 | if ($context['showCheckboxes']) |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | 'class' => 'centercol', |
257 | 257 | ), |
258 | 258 | 'data' => array( |
259 | - 'function' => function ($entry) |
|
259 | + 'function' => function($entry) |
|
260 | 260 | { |
261 | 261 | return '<input type="checkbox" class="input_check" name="delete[]" value="' . $entry['id'] . '"' . ($entry['editable'] ? '' : ' disabled') . '>'; |
262 | 262 | }, |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | if (empty($entries[$k]['action_text'])) |
639 | 639 | $entries[$k]['action_text'] = isset($txt['modlog_ac_' . $entry['action']]) ? $txt['modlog_ac_' . $entry['action']] : $entry['action']; |
640 | 640 | $entries[$k]['action_text'] = preg_replace_callback('~\{([A-Za-z\d_]+)\}~i', |
641 | - function ($matches) use ($entries, $k) |
|
641 | + function($matches) use ($entries, $k) |
|
642 | 642 | { |
643 | 643 | return isset($entries[$k]['extra'][$matches[1]]) ? $entries[$k]['extra'][$matches[1]] : ''; |
644 | 644 | }, $entries[$k]['action_text']); |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | public function get($property = '') |
168 | 168 | { |
169 | 169 | // All properties inside Likes are protected, thus, an underscore is used. |
170 | - $property = '_'. $property; |
|
170 | + $property = '_' . $property; |
|
171 | 171 | return property_exists($this, $property) ? $this->$property : false; |
172 | 172 | } |
173 | 173 | |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | |
572 | 572 | // Nope? then just do a redirect to whatever URL was provided. |
573 | 573 | else |
574 | - redirectexit(!empty($this->_validLikes['redirect']) ? $this->_validLikes['redirect'] .';error='. $this->_error : ''); |
|
574 | + redirectexit(!empty($this->_validLikes['redirect']) ? $this->_validLikes['redirect'] . ';error=' . $this->_error : ''); |
|
575 | 575 | |
576 | 576 | return; |
577 | 577 | } |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | if (in_array($this->_sa, $generic)) |
589 | 589 | { |
590 | 590 | $context['sub_template'] = 'generic'; |
591 | - $context['data'] = isset($txt['like_'. $this->_data]) ? $txt['like_'. $this->_data] : $this->_data; |
|
591 | + $context['data'] = isset($txt['like_' . $this->_data]) ? $txt['like_' . $this->_data] : $this->_data; |
|
592 | 592 | } |
593 | 593 | |
594 | 594 | // Directly pass the current called sub-action and the data generated by its associated Method. |
@@ -837,7 +837,7 @@ discard block |
||
837 | 837 | remove_dir($theme_info['theme_dir']); |
838 | 838 | |
839 | 839 | // Go back to the list page. |
840 | - redirectexit('action=admin;area=theme;sa=list;' . $context['session_var'] . '=' . $context['session_id'] .';done=removing'); |
|
840 | + redirectexit('action=admin;area=theme;sa=list;' . $context['session_var'] . '=' . $context['session_id'] . ';done=removing'); |
|
841 | 841 | } |
842 | 842 | |
843 | 843 | /** |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | updateSettings(array('enableThemes' => $enableThemes)); |
872 | 872 | |
873 | 873 | // Done! |
874 | - redirectexit('action=admin;area=theme;sa=list;' . $context['session_var'] . '=' . $context['session_id'] .';done='. (isset($_GET['disabled']) ? 'disabling' : 'enabling')); |
|
874 | + redirectexit('action=admin;area=theme;sa=list;' . $context['session_var'] . '=' . $context['session_id'] . ';done=' . (isset($_GET['disabled']) ? 'disabling' : 'enabling')); |
|
875 | 875 | } |
876 | 876 | |
877 | 877 | /** |
@@ -1106,7 +1106,7 @@ discard block |
||
1106 | 1106 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
1107 | 1107 | { |
1108 | 1108 | // Figure out which theme it is they are REALLY using. |
1109 | - if (!empty($modSettings['knownThemes']) && !in_array($row['id_theme'], explode(',',$modSettings['knownThemes']))) |
|
1109 | + if (!empty($modSettings['knownThemes']) && !in_array($row['id_theme'], explode(',', $modSettings['knownThemes']))) |
|
1110 | 1110 | $row['id_theme'] = $guest_theme; |
1111 | 1111 | elseif (empty($modSettings['theme_allow'])) |
1112 | 1112 | $row['id_theme'] = $guest_theme; |
@@ -1254,10 +1254,10 @@ discard block |
||
1254 | 1254 | $action = $smcFunc['htmlspecialchars'](trim($_GET['do'])); |
1255 | 1255 | |
1256 | 1256 | // Got any info from the specific form? |
1257 | - if (!isset($_POST['save_'. $action])) |
|
1257 | + if (!isset($_POST['save_' . $action])) |
|
1258 | 1258 | fatal_lang_error('theme_install_no_action', false); |
1259 | 1259 | |
1260 | - validateToken('admin-t-'. $action); |
|
1260 | + validateToken('admin-t-' . $action); |
|
1261 | 1261 | |
1262 | 1262 | // Hopefully the themes directory is writable, or we might have a problem. |
1263 | 1263 | if (!is_writable($themedir)) |
@@ -1291,7 +1291,7 @@ discard block |
||
1291 | 1291 | global $themedir, $themeurl, $context; |
1292 | 1292 | |
1293 | 1293 | // Set a temp dir for dumping all required files on it. |
1294 | - $dirtemp = $themedir .'/temp'; |
|
1294 | + $dirtemp = $themedir . '/temp'; |
|
1295 | 1295 | |
1296 | 1296 | // Make sure the temp dir doesn't already exist |
1297 | 1297 | if (file_exists($dirtemp)) |
@@ -1317,7 +1317,7 @@ discard block |
||
1317 | 1317 | |
1318 | 1318 | // Another error check layer, something went wrong with the upload. |
1319 | 1319 | if (isset($_FILES['theme_gz']['error']) && $_FILES['theme_gz']['error'] != 0) |
1320 | - fatal_lang_error('theme_install_error_file_'. $_FILES['theme_gz']['error'], false); |
|
1320 | + fatal_lang_error('theme_install_error_file_' . $_FILES['theme_gz']['error'], false); |
|
1321 | 1321 | |
1322 | 1322 | // Get the theme's name. |
1323 | 1323 | $name = pathinfo($_FILES['theme_gz']['name'], PATHINFO_FILENAME); |
@@ -1373,7 +1373,7 @@ discard block |
||
1373 | 1373 | $name = preg_replace('~[^A-Za-z0-9_\- ]~', '', $_REQUEST['copy']); |
1374 | 1374 | |
1375 | 1375 | // Is there a theme already named like this? |
1376 | - if (file_exists($themedir .'/'. $name)) |
|
1376 | + if (file_exists($themedir . '/' . $name)) |
|
1377 | 1377 | fatal_lang_error('theme_install_already_dir', false); |
1378 | 1378 | |
1379 | 1379 | // This is a brand new theme so set all possible values. |
@@ -1383,7 +1383,7 @@ discard block |
||
1383 | 1383 | 'name' => $name, |
1384 | 1384 | 'images_url' => $themeurl . '/' . $name . '/images', |
1385 | 1385 | 'version' => '1.0', |
1386 | - 'install_for' => '2.1 - 2.1.99, '. strtr($forum_version, array('SMF ' => '')), |
|
1386 | + 'install_for' => '2.1 - 2.1.99, ' . strtr($forum_version, array('SMF ' => '')), |
|
1387 | 1387 | 'based_on' => '', |
1388 | 1388 | 'based_on_dir' => $themedir . '/default', |
1389 | 1389 | ); |
@@ -1454,7 +1454,7 @@ discard block |
||
1454 | 1454 | <!-- The theme\'s version, please try to use semantic versioning. --> |
1455 | 1455 | <version>1.0</version> |
1456 | 1456 | <!-- Install for, the SMF versions this theme was designed for. Uses the same wildcards used in the packager manager. This field is mandatory. --> |
1457 | -<install for="'. $context['to_install']['install_for'] .'" /> |
|
1457 | +<install for="'. $context['to_install']['install_for'] . '" /> |
|
1458 | 1458 | <!-- Theme name, used purely for aesthetics. --> |
1459 | 1459 | <name>' . $context['to_install']['name'] . '</name> |
1460 | 1460 | <!-- Author: your email address or contact information. The name attribute is optional. --> |
@@ -37,12 +37,12 @@ discard block |
||
37 | 37 | $version = $smcFunc['db_get_version'](); |
38 | 38 | // if we got a Beta Version |
39 | 39 | if (stripos($version, 'beta') !== false) |
40 | - $version = substr($version, 0, stripos($version, 'beta')).'.0'; |
|
40 | + $version = substr($version, 0, stripos($version, 'beta')) . '.0'; |
|
41 | 41 | // or RC |
42 | 42 | if (stripos($version, 'rc') !== false) |
43 | - $version = substr($version, 0, stripos($version, 'rc')).'.0'; |
|
43 | + $version = substr($version, 0, stripos($version, 'rc')) . '.0'; |
|
44 | 44 | |
45 | - if (version_compare($version,'9.5.0','>=')) |
|
45 | + if (version_compare($version, '9.5.0', '>=')) |
|
46 | 46 | $smcFunc['db_support_ignore'] = true; |
47 | 47 | } |
48 | 48 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | function smf_db_search_support($search_type) |
56 | 56 | { |
57 | - $supported_types = array('custom','fulltext'); |
|
57 | + $supported_types = array('custom', 'fulltext'); |
|
58 | 58 | |
59 | 59 | return in_array($search_type, $supported_types); |
60 | 60 | } |
@@ -108,9 +108,9 @@ discard block |
||
108 | 108 | if (preg_match('~^\s*INSERT\sIGNORE~i', $db_string) != 0) |
109 | 109 | { |
110 | 110 | $db_string = preg_replace('~^\s*INSERT\sIGNORE~i', 'INSERT', $db_string); |
111 | - if ($smcFunc['db_support_ignore']){ |
|
111 | + if ($smcFunc['db_support_ignore']) { |
|
112 | 112 | //pg style "INSERT INTO.... ON CONFLICT DO NOTHING" |
113 | - $db_string = $db_string.' ON CONFLICT DO NOTHING'; |
|
113 | + $db_string = $db_string . ' ON CONFLICT DO NOTHING'; |
|
114 | 114 | } |
115 | 115 | else |
116 | 116 | { |