Skip to content

Commit 5d23880

Browse files
committed
Merge branch 'release-1.2.1'
2 parents b9c9795 + cdb9e48 commit 5d23880

5 files changed

Lines changed: 41 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
# Changelog
22

3+
## 1.2.1 - 2025-06-04
4+
5+
- Modernized codebase, ensuring compatibility with future phpBB releases
6+
- Removed XHTML artifacts
7+
- Added Estonian translation
8+
39
## 1.2.0 - 2019-04-30
410

511
- Supports running from the command line interface using the command: `db:tool`
6-
- phpBB 3.2.0 or newer required. Support for phpBB 3.1 has ended.
12+
- phpBB 3.2.0 or newer is required. Support for phpBB 3.1 has ended.
713
- Added Dutch translation
814

915
## 1.1.3 - 2018-06-28
@@ -28,7 +34,7 @@
2834

2935
## 1.1.0 - 2014-11-26
3036

31-
- Added a confirm dialog prior to running a table operation
37+
- Added a confirmation dialog before running a table operation
3238
- Various code improvements and fixes
3339

3440
## 1.1.0-b2 - 2014-07-12

README.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
## ![alt text](https://imattpro.github.io/logo/database_check_1.png "DB Tool") Database Optimize & Repair Tool for phpBB
22

3-
A phpBB extension that will allow you to check, optimize and repair phpBB's MySQL database tables from a phpMyAdmin-like interface in the Administration Control Panel or from the CLI.
3+
A phpBB extension that will allow you to check, optimize and repair phpBB's MySQL database tables in the Administration Control Panel or from the Command Line Interface.
44

55
[![Build Status](https://github.com/iMattPro/dbtool/actions/workflows/tests.yml/badge.svg)](https://github.com/iMattPro/dbtool/actions)
66
[![codecov](https://codecov.io/gh/iMattPro/dbtool/branch/master/graph/badge.svg?token=hlMnGtSzhE)](https://codecov.io/gh/iMattPro/dbtool)
77
[![Maintainability](https://qlty.sh/badges/66a0a813-4834-4175-8efc-4b6b0461d035/maintainability.svg)](https://qlty.sh/gh/iMattPro/projects/dbtool)
88
[![Latest Stable Version](https://poser.pugx.org/vse/dbtool/v/stable)](https://www.phpbb.com/customise/db/extension/database_optimize_and_repair_tool/)
99

1010
## Features
11-
* Optimize, Repair and Check tables directly from the ACP or the CLI
11+
* Optimize, Repair, and Check tables directly from the ACP or the CLI
1212
* Select individual tables or all tables at once
1313
* Displays table size and table overhead values in the ACP
1414
* Option to safely disable board during the optimize/repair process
1515
* Results are logged to the Admin log
16-
* Enhanced javascript interactions
16+
* Enhanced JavaScript interactions
1717

1818
## Minimum Requirements
1919
* phpBB 3.2.0
@@ -31,7 +31,12 @@ After installation, you can find the Optimize & Repair Tool in:
3131

3232
`ACP -> Maintenance -> Database -> Optimize & Repair`.
3333

34-
> Use this extension at your own risk! There have been cases with certain shared web hosts where a database table could crash for a very large forum. This extension will perform the same functions on your database as phpMyAdmin, so if you have been using phpMyAdmin on your database with no problems, then it should be safe to use this extension. It is always safest to run a backup of your database before performing any Optimize or Repair functions just in case anything goes wrong.
34+
> Use this extension at your own risk! There have been cases with certain shared web
35+
> hosts where a database table could crash for a huge forum. This extension will perform
36+
> the same functions on your database as phpMyAdmin, so if you have been using phpMyAdmin
37+
> on your database with no problems, then it should be safe to use this extension. It is
38+
> always safest to run a backup of your database before performing any Optimize or Repair
39+
> functions just in case anything goes wrong.
3540
3641
> Note: InnoDB table types do not support the Repair option.
3742
@@ -40,21 +45,29 @@ The Optimize & Repair Tool can also be run from the command line interface in
4045
phpBB using the `db:tool` command. The tool will prompt you to choose an operation:
4146
Optimize, Repair, or Check.
4247

43-
To check, optimize or repair all tables:
48+
To check, optimize, or repair all tables:
4449

45-
`$ php bin/phpbbcli.php db:tool`
50+
```bash
51+
php bin/phpbbcli.php db:tool
52+
```
4653

47-
To check, optimize or repair a specific table:
54+
To check, optimize, or repair a specific table:
4855

49-
`$ php bin/phpbbcli.php db:tool table_name`
56+
```bash
57+
php bin/phpbbcli.php db:tool table_name
58+
```
5059

5160
To disable the board during an operation, use the `--disable-board` or `-D` option:
5261

53-
`$ php bin/phpbbcli.php db:tool --disable-board`
62+
```bash
63+
php bin/phpbbcli.php db:tool --disable-board
64+
```
5465

55-
For help with the Optimize & Repair Tool command:
66+
To see help for the Optimize & Repair Tool command:
5667

57-
`$ php bin/phpbbcli.php db:tool --help`
68+
```bash
69+
php bin/phpbbcli.php db:tool --help
70+
```
5871

5972
## Uninstall
6073
1. Navigate in the ACP to `Customise -> Manage extensions`.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "phpbb-extension",
44
"description": "A phpBB extension that allows you to check, optimize and repair phpBB's MySQL database tables from a phpMyAdmin-like interface in the Administration Control Panel or from the CLI.",
55
"homepage": "https://github.com/iMattPro/dbtool",
6-
"version": "1.2.1-dev",
6+
"version": "1.2.1",
77
"keywords": ["phpbb", "extension", "database", "mysql", "optimize", "repair", "phpmyadmin"],
88
"license": "GPL-2.0-only",
99
"authors": [

tool/tool.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function __construct(cache $cache, config $config, db $db, log $log, user
5555
/**
5656
* Perform table SQL query and return any messages
5757
*
58-
* @param string $operation OPTIMIZE, REPAIR, or CHECK
58+
* @param string $operation OPTIMIZE, REPAIR or CHECK
5959
* @param array $tables Array of all tables to be processed
6060
* @param int $disable_board The users option to disable the board during run time
6161
* @return array Any errors or status information, otherwise the array of tables processed
@@ -72,7 +72,7 @@ public function run($operation, $tables, $disable_board = 0)
7272
$result = $this->db->sql_query($operation . ' TABLE ' . $this->db->sql_escape($tablestr));
7373
while ($row = $this->db->sql_fetchrow($result))
7474
{
75-
// Build a message only for optimize/repair errors, or if check table is run
75+
// Build a message only for optimize/repair errors or if a check table is run
7676
if ($operation === ext::CHECK || in_array(strtolower($row['Msg_type']), ['error', 'info', 'note', 'warning']))
7777
{
7878
$output[] = substr($row['Table'], strpos($row['Table'], '.') + 1) . ' ... ' . $row['Msg_type'] . ': ' . $row['Msg_text'];
@@ -84,7 +84,7 @@ public function run($operation, $tables, $disable_board = 0)
8484

8585
$this->disable_board($disable_board, $disabled);
8686

87-
// Clear cache to ensure board is re-enabled for all users
87+
// Clear cache to ensure the board is re-enabled for all users
8888
$this->cache->purge();
8989

9090
return $output ?: $tables;
@@ -109,7 +109,7 @@ public function disable_board($disable, $disabled)
109109
}
110110

111111
/**
112-
* Is the database using MySQL
112+
* Is the database using MySQL?
113113
*
114114
* @return bool True if MySQL, false otherwise
115115
* @access public
@@ -120,7 +120,7 @@ public function is_mysql()
120120
}
121121

122122
/**
123-
* Is requested operation to optimize, repair or check tables
123+
* Is the requested operation to optimize, repair or check tables?
124124
*
125125
* @param string $operation The name of the operation
126126
* @return bool True if valid operation, false otherwise

tool/tool_interface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface tool_interface
1515
/**
1616
* Perform table SQL query and return any messages
1717
*
18-
* @param string $operation OPTIMIZE, REPAIR, or CHECK
18+
* @param string $operation OPTIMIZE, REPAIR or CHECK
1919
* @param array $tables Array of all tables to be processed
2020
* @param int $disable_board The users option to disable the board during run time
2121
* @return array Any errors or status information
@@ -34,15 +34,15 @@ public function run($operation, $tables, $disable_board = 0);
3434
public function disable_board($disable, $disabled);
3535

3636
/**
37-
* Is the database using MySQL
37+
* Is the database using MySQL?
3838
*
3939
* @return bool True if MySQL, false otherwise
4040
* @access public
4141
*/
4242
public function is_mysql();
4343

4444
/**
45-
* Is requested operation to optimize, repair or check tables
45+
* Is the requested operation to optimize, repair or check tables?
4646
*
4747
* @param string $operation The name of the operation
4848
* @return bool True if valid operation, false otherwise

0 commit comments

Comments
 (0)