mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 22:27:24 +02:00
New plugin: Display row numbers in select (fix #1106)
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
- PostgreSQL 11-: Avoid duplicate oid in table status (bug #1089)
|
||||
- Elasticsearch: Support dropping aliases
|
||||
- Plugins: Methods processList() and killProcess()
|
||||
- New plugin: Display row numbers in select (bug #1106)
|
||||
|
||||
## Adminer 5.3.0 (released 2025-05-04)
|
||||
- Align numeric functions right
|
||||
|
24
plugins/row-numbers.php
Normal file
24
plugins/row-numbers.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/** Display row numbers in select
|
||||
* @link https://www.adminer.org/plugins/#use
|
||||
* @author Jakub Vrana, https://www.vrana.cz/
|
||||
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
|
||||
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
|
||||
*/
|
||||
class AdminerRowNumbers extends Adminer\Plugin {
|
||||
|
||||
function backwardKeys($table, $tableName) {
|
||||
return array(1);
|
||||
}
|
||||
|
||||
function backwardKeysPrint($backwardKeys, $row) {
|
||||
static $n = $_GET["page"] * Adminer\adminer()->selectLimitProcess();
|
||||
$n++;
|
||||
echo "$n.\n";
|
||||
}
|
||||
|
||||
protected $translations = array(
|
||||
'cs' => array('' => 'Zobrazí čísla řádek ve výpisu'),
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user