Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Languages/en_US/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@
$txt['notifications'] = 'Notifications';
$txt['notify_settings'] = 'Notification Settings';
$txt['notifications_desc'] = 'This page allows you to set the default notification options for users.';
// The GDPR page of the EU exists in several languages; change the language code at the end of the url
// The GDPR page of the EU exists in several languages; change the language code at the end of the url
$txt['notify_announcements_desc'] = 'Enabling this default option violates the rules of the <a href="https://ec.europa.eu/info/law/law-topic/data-protection/eu-data-protection-rules_en" target="_blank" rel="noopener" class="bbc_link">GDPR</a> and many other countries’ privacy and anti-spam laws.';

$txt['enable_sm_stats'] = 'Allow Stat Collection';
8 changes: 4 additions & 4 deletions Sources/Actions/Moderation/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,10 +432,10 @@ protected function setModerationAreas(): void
$this->moderation_areas,
function (&$value, $key) {
if (\is_string($value)) {
$value = strtr($value, [
'{scripturl}' => Config::$scripturl,
'{boardurl}' => Config::$boardurl,
]);
$value = strtr($value, [
'{scripturl}' => Config::$scripturl,
'{boardurl}' => Config::$boardurl,
]);
}
},
);
Expand Down
2 changes: 1 addition & 1 deletion Sources/BBCode/GenericBBCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function ($v, $k) {
},
ARRAY_FILTER_USE_BOTH,
);
}
}
}

if (\is_string($definition['test'] ?? null)) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Calendar/RecurrenceIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ private function limit(\DateTime $current): bool
}
}
break;
}
}

$valid &= \in_array($current_value, $allowed_values);
}
Expand Down
42 changes: 21 additions & 21 deletions Sources/Db/APIs/MySQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,13 +444,13 @@ public function insert(string $method, string $table, array $columns, array $dat

foreach ($data as $dataRow) {
if (\count($indexed_columns) !== \count($dataRow)) {
$this->error_backtrace(
'Invalid insert query. Requested column count does not match the number of keys on inserted data.',
'',
E_USER_ERROR,
__FILE__,
__LINE__,
);
$this->error_backtrace(
'Invalid insert query. Requested column count does not match the number of keys on inserted data.',
'',
E_USER_ERROR,
__FILE__,
__LINE__,
);
}
$insertRows[] = $this->quote($insertData, array_combine($indexed_columns, $dataRow), $connection);
}
Expand Down Expand Up @@ -1237,24 +1237,24 @@ public function table_sql(string $table_name): string
default:
$line .= 'KEY `' . $index['name'] . '`';
break;
}
}

$index_columns = [];
$index_columns = [];

foreach ($index['columns'] as $index_column) {
// A column can be indexed by its first so many characters.
// The count belongs after the name rather than inside it,
// so it has to be left outside the quoting.
if (preg_match('~^(.+)\((\d+)\)$~', $index_column, $matches) === 1) {
$index_columns[] = '`' . $matches[1] . '`(' . $matches[2] . ')';
} else {
$index_columns[] = '`' . $index_column . '`';
}
}
foreach ($index['columns'] as $index_column) {
// A column can be indexed by its first so many characters.
// The count belongs after the name rather than inside it,
// so it has to be left outside the quoting.
if (preg_match('~^(.+)\((\d+)\)$~', $index_column, $matches) === 1) {
$index_columns[] = '`' . $matches[1] . '`(' . $matches[2] . ')';
} else {
$index_columns[] = '`' . $index_column . '`';
}
}

$line .= ' (' . implode(', ', $index_columns) . ')';
$line .= ' (' . implode(', ', $index_columns) . ')';

$inner_lines[] = $line;
$inner_lines[] = $line;
}

$schema_create .= implode(",\n", $inner_lines) . "\n";
Expand Down
14 changes: 7 additions & 7 deletions Sources/Db/APIs/PostgreSQL.php
Original file line number Diff line number Diff line change
Expand Up @@ -545,13 +545,13 @@ public function insert(string $method, string $table, array $columns, array $dat

foreach ($data as $dataRow) {
if (\count($indexed_columns) !== \count($dataRow)) {
$this->error_backtrace(
'Invalid insert query. Requested column count does not match the number of keys on inserted data.',
'',
E_USER_ERROR,
__FILE__,
__LINE__,
);
$this->error_backtrace(
'Invalid insert query. Requested column count does not match the number of keys on inserted data.',
'',
E_USER_ERROR,
__FILE__,
__LINE__,
);
}

$insertRows[] = $this->quote($insertData, array_combine($indexed_columns, $dataRow), $connection);
Expand Down
42 changes: 21 additions & 21 deletions Sources/Maintenance/Migration/v2_1/MysqlModFixes.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public function execute(): bool
);

while ($row = Db::$db->fetch_assoc($request)) {
$this->query(
'ALTER TABLE {db_prefix}members
$this->query(
'ALTER TABLE {db_prefix}members
MODIFY {raw:col_name} {raw:col_type} NULL',
[
'col_name' => $row['COLUMN_NAME'],
'col_type' => $row['COLUMN_TYPE'],
],
);
[
'col_name' => $row['COLUMN_NAME'],
'col_type' => $row['COLUMN_TYPE'],
],
);
}

$this->handleTimeout(++$start);
Expand All @@ -101,14 +101,14 @@ public function execute(): bool
);

while ($row = Db::$db->fetch_assoc($request)) {
$this->query(
'ALTER TABLE {db_prefix}boards
$this->query(
'ALTER TABLE {db_prefix}boards
MODIFY {raw:col_name} {raw:col_type} NULL',
[
'col_name' => $row['COLUMN_NAME'],
'col_type' => $row['COLUMN_TYPE'],
],
);
[
'col_name' => $row['COLUMN_NAME'],
'col_type' => $row['COLUMN_TYPE'],
],
);
}

$this->handleTimeout(++$start);
Expand All @@ -131,14 +131,14 @@ public function execute(): bool
);

while ($row = Db::$db->fetch_assoc($request)) {
$this->query(
'ALTER TABLE {db_prefix}topics
$this->query(
'ALTER TABLE {db_prefix}topics
MODIFY {raw:col_name} {raw:col_type} NULL',
[
'col_name' => $row['COLUMN_NAME'],
'col_type' => $row['COLUMN_TYPE'],
],
);
[
'col_name' => $row['COLUMN_NAME'],
'col_type' => $row['COLUMN_TYPE'],
],
);
}

$this->handleTimeout(++$start);
Expand Down
2 changes: 1 addition & 1 deletion Sources/Maintenance/Tools/ToolsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ final public function makeFilesWritable(array &$files): bool
if ($ftp->error === false) {
// Try it without /home/abc just in case they messed up.
if (!$ftp->chdir(Utils::$context['chmod']['path'])) {
Utils::$context['chmod']['ftp_error'] = $ftp->last_message;
Utils::$context['chmod']['ftp_error'] = $ftp->last_message;
$ftp->chdir(preg_replace('~^/home[2]?/[^/]+?~', '', Utils::$context['chmod']['path']));
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/Maintenance/Tools/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ public function welcomeLogin(): bool

// Next, check the custom avatar directory... Note this is optional in 2.0.
if (!empty(Config::$modSettings['custom_avatar_dir']) && !is_dir(Config::$modSettings['custom_avatar_dir'])) {
Maintenance::$warnings[] = Lang::getTxt('warning_custom_av_missing', file: 'Maintenance');
Maintenance::$warnings[] = Lang::getTxt('warning_custom_av_missing', file: 'Maintenance');
$this->logProgress(Lang::getTxt('warning_custom_av_missing', file: 'Maintenance'));
}

Expand Down
10 changes: 5 additions & 5 deletions Sources/PersonalMessage/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,12 @@ protected function setUserQuery(): void
if (Db::$db->num_rows($request) > $this->max_members_to_search) {
$this->user_query = '';
} else {
$clauses = [];
$clauses = [];

foreach ($possible_users as $k => $v) {
$this->searchq_parameters['name_' . $k] = $v;
$clauses[] = '{column_ci:pm.from_name} LIKE {string:name_' . $k . '}';
}
foreach ($possible_users as $k => $v) {
$this->searchq_parameters['name_' . $k] = $v;
$clauses[] = '{column_ci:pm.from_name} LIKE {string:name_' . $k . '}';
}

if (Db::$db->num_rows($request) == 0) {
$this->user_query = 'AND pm.id_member_from = 0 AND (' . implode(' OR ', $clauses) . ')';
Expand Down
2 changes: 1 addition & 1 deletion Sources/ServerSideIncludes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ public static function latestMember(string $output_method = 'echo'): ?array
return null;
}

return Utils::$context['common_stats']['latest_member'];
return Utils::$context['common_stats']['latest_member'];
}

/**
Expand Down
Loading