Skip to content

Commit

Permalink
Merge pull request #1 from rmcgirr83/develop
Browse files Browse the repository at this point in the history
Fix misspellings
  • Loading branch information
Mike-on-Tour committed Mar 6, 2021
2 parents b45a15d + c5f03d5 commit 26755c8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
17 changes: 15 additions & 2 deletions acp/settings_module.php
Expand Up @@ -15,7 +15,7 @@ class settings_module

public function main()
{
global $config, $phpbb_container, $request, $template, $phpbb_root_path;
global $config, $db, $phpbb_container, $phpbb_log, $request, $template, $user, $phpbb_root_path, $table_prefix;

$language = $phpbb_container->get('language');
$this->tpl_name = 'acp_hangman_settings';
Expand All @@ -40,13 +40,26 @@ public function main()
trigger_error($language->lang('ACP_HANGMAN_SETTING_SAVED') . adm_back_link($this->u_action));
}

if ($request->is_set_post('reset_highscore'))
{
define ('HANGMAN_SCORE_TABLE', $table_prefix . 'hangman_score');

$db->sql_query('TRUNCATE TABLE ' . HANGMAN_SCORE_TABLE);

This comment has been minimized.

Copy link
@3D-I

3D-I Mar 8, 2021

Contributor

TRUNCATE TABLE is not compatible with sqlite3

	switch ($db->get_sql_layer())
	{
		case 'sqlite3':
			$db->sql_query('DELETE FROM ' . HANGMAN_SCORE_TABLE);
		break;

		default:
			$db->sql_query('TRUNCATE TABLE ' . HANGMAN_SCORE_TABLE);
		break;
	}

$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_HANGMAN_HIGHSCORE_TABLE_CLEARED');

if ($request->is_ajax())
{
trigger_error('HIGHSCORE_TABLE_CLEARED');
}
}
$template->assign_vars(array(
'ACP_HANGMAN_LIVES' => $config['mot_hangman_lives'],
'ACP_HANGMAN_POINTS_LETTER' => $config['mot_hangman_points_letter'],
'ACP_HANGMAN_POINTS_LOOSE' => $config['mot_hangman_points_loose'],
'ACP_HANGMAN_POINTS_WIN' => $config['mot_hangman_points_win'],
'ACP_HANGMAN_POINTS_WORD' => $config['mot_hangman_points_word'],
'U_ACTION' => $this->u_action . '&action=submit',
'U_ACTION' => $this->u_action,
'HANGMAN_VERSION' => $config['mot_hangman_version'],
'HANGMAN_YEAR' => date('Y'),
'ICON_PAYPAL' => '<img src="' . $phpbb_root_path . 'ext/mot/hangman/adm/images/Paypal.svg" />',
Expand Down
9 changes: 9 additions & 0 deletions adm/style/acp_hangman_settings.html
Expand Up @@ -39,6 +39,15 @@ <h1>{{ lang('ACP_HANGMAN_SETTINGS') }}</h1>

</form>

<fieldset>
<form id="reset_highscore_action" method="post" action="{U_ACTION}" data-ajax="true">
<dl>
<dt><label for="reset_highscore">{{ lang('RESET_HIGHSCORE') }}</label><br /><span>&nbsp;</span></dt>
<dd><input type="hidden" name="reset_highscore" value="online" /><input class="button2" type="submit" id="reset_highscore" name="reset_highscore" value="{L_RUN}" /></dd>
</dl>
</form>
</fieldset>

<p class="centered_text">
Hangman ver {{ HANGMAN_VERSION }} &copy; 2021 - {{ HANGMAN_YEAR }} by Mike-on-Tour
</p>
Expand Down
4 changes: 2 additions & 2 deletions language/en/common.php
Expand Up @@ -61,7 +61,7 @@
you have won, losing will cost you %3$s points.<br>
ATTENTION: Terms used in a game turn will be deleted from the database after that turn. Please enter a term after you
concluded a game turn in order to enable others to play, too.',
// List all letters of this language as uppercase letters seperated by comma. If this language contains lowercase letters without an uppercase equivalent list them here, too. If your language uses special characters and you have put them in
// List all letters of this language as uppercase letters separated by comma. If this language contains lowercase letters without an uppercase equivalent list them here, too. If your language uses special characters and you have put them in
// the following variable please consider mentioning them in the 'HANGMAN_QUOTE_INPUT_EXPL' variable
'HANGMAN_LETTERS' => 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z',
'HANGMAN_LIVES' => 'You have %1$s lives to play with.',
Expand All @@ -79,7 +79,7 @@
// Term definition
'HANGMAN_QUOTE_INPUT_HEAD' => 'Enter a new term',
'HANGMAN_QUOTE_INPUT_EXPL' => 'You can enter a new term in this form. This term may contain spaces but must not contain punctuation marks, special
characters and digits. Therefore you are not limmited to single words and you can enter quotes as well.<br>
characters and digits. Therefore you are not limited to single words and you can enter quotes as well.<br>
Terms entered by yourself will not be displayed to you during game turns!<br>
According to the current settings your game account will be credited with %1$s points for entering a term.',
'HANGMAN_QUOTE_INPUT' => 'New term',
Expand Down
3 changes: 3 additions & 0 deletions language/en/info_acp_hangman.php
Expand Up @@ -54,4 +54,7 @@
(integer greater than or equal to zero)',
'ACP_HANGMAN_SETTING_SAVED' => 'Settings for the Hangman Game successfully saved.',
'SUPPORT_HANGMAN' => 'If you want to support Hangman´s development please use this link to donate:<br>',
'RESET_HIGHSCORE' => 'Reset Highscore',
'LOG_HANGMAN_HIGHSCORE_TABLE_CLEARED' => 'Hangman Highscore table cleared',
'HIGHSCORE_TABLE_CLEARED' => 'Highscore table cleared',
));

0 comments on commit 26755c8

Please sign in to comment.