Some cleanup and text improvements
This commit is contained in:
parent
de6644302c
commit
399e977b82
|
@ -1,35 +0,0 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
|
@ -0,0 +1 @@
|
|||
*~
|
19
README
19
README
|
@ -1,8 +1,22 @@
|
|||
sqlquery Plugin for DokuWiki
|
||||
|
||||
Processing query to mysql database and display results as a table.
|
||||
Processing queries to databases and display results as a table.
|
||||
|
||||
All documentation for this plugin can be found at
|
||||
This is a improved version which can connect to different hosts
|
||||
and databases. The defaults are set in the plugin configuration.
|
||||
Different types, hosts and databases can be set inside the tag:
|
||||
|
||||
<sql type=mysql host=myhost db=mydb>
|
||||
SELECT foo FROM bar ORDER BY baz
|
||||
<sql>
|
||||
|
||||
For security reasons the credentials for database access are only
|
||||
stored in the main plugin configuration. At the moment there is
|
||||
only one user configurable so for access to multiple servers.
|
||||
So the user and password mast be the same across the servers.
|
||||
|
||||
Based on sqlquery-plugin from George Pirogov, original documentation
|
||||
for that base plugin can be found at
|
||||
https://www.dokuwiki.org/plugin:sqlquery
|
||||
|
||||
If you install this plugin manually, make sure it is installed in
|
||||
|
@ -13,6 +27,7 @@ Please refer to http://www.dokuwiki.org/plugins for additional info
|
|||
on how to install plugins in DokuWiki.
|
||||
|
||||
----
|
||||
Copyright (C) Thomas Hooge <thomas@hoogi.de>
|
||||
Copyright (C) George Pirogov <i1557@yandex.ru>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
|
13
README.md
13
README.md
|
@ -1,13 +0,0 @@
|
|||
# sqlquery
|
||||
A dokuwiki plugin for processing query to MySQL databases and display results as a table.
|
||||
|
||||
This is a improved version which cann connect to different hosts
|
||||
and databases. The defaults are set in the plugin configuration.
|
||||
Different types, hosts and databases can be set inside the tag:
|
||||
```
|
||||
<sql type=mysql host=myhost db=mydb>
|
||||
SELECT foo FROM bar ORDER BY baz
|
||||
<sql>
|
||||
```
|
||||
|
||||
More information at https://www.dokuwiki.org/plugin:sqlquery
|
|
@ -8,8 +8,8 @@
|
|||
// keys need to match the config setting name
|
||||
|
||||
$lang['type'] = 'DSN-Prefix (Datenbanktyp)';
|
||||
$lang['Host'] = 'Standard MySQL-Serveradresse (DNS or IP)';
|
||||
$lang['DB'] = 'Standard MySQL-Datenbankname';
|
||||
$lang['Host'] = 'Standard-Serveradresse (DNS oder IP)';
|
||||
$lang['DB'] = 'Standard-Datenbankname';
|
||||
$lang['user'] = 'Datenbankbenutzername';
|
||||
$lang['password'] = 'Datenbankkennwort';
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
// $lang['fixme'] = 'FIXME';
|
||||
|
||||
$lang['type'] = 'DSN prefix (database type)';
|
||||
$lang['Host'] = 'Default MySQL server address (DNS or IP)';
|
||||
$lang['DB'] = 'MySQL database name';
|
||||
$lang['Host'] = 'Default server address (DNS or IP)';
|
||||
$lang['DB'] = 'Default database name';
|
||||
$lang['user'] = 'Database username';
|
||||
$lang['password'] = 'Database password';
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
// $lang['fixme'] = 'FIXME';
|
||||
|
||||
$lang['type'] = 'Префикс DSN (тип базы данных)';
|
||||
$lang['Host'] = 'Адрес MySQL сервера по умолчанию (DNS или IP)';
|
||||
$lang['DB'] = 'Имя базы данных MySQL по умолчанию';
|
||||
$lang['Host'] = 'Адрес сервера по умолчанию (DNS или IP)';
|
||||
$lang['DB'] = 'Имя базы данных по умолчанию';
|
||||
$lang['user'] = 'Логин';
|
||||
$lang['password'] = 'Пароль';
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
base sqlquery
|
||||
author George Pirogov
|
||||
email i1557@yandex.ru
|
||||
date 2018-12-12
|
||||
author Thomas Hooge
|
||||
email thomas@hoogi.de
|
||||
date 2023-12-01
|
||||
name SQL query plugin (multidb)
|
||||
desc Processing query to mysql database and display results as a table.
|
||||
url https://www.dokuwiki.org/plugin:sqlquery
|
||||
desc Processing queries to databases and display results as a table.
|
||||
|
|
|
@ -85,11 +85,11 @@ class syntax_plugin_sqlquery extends DokuWiki_Syntax_Plugin {
|
|||
$password = $this->getConf('password');
|
||||
|
||||
// connect to database
|
||||
$dsn = "{$data['type']}:host={$data['host']};dbname={$data[db]};charset=UTF-8;";
|
||||
$dsn = "{$data['type']}:host={$data['host']};dbname={$data[db]};charset=UTF8;";
|
||||
try {
|
||||
$dbh = new PDO($dsn, $user, $password);
|
||||
} catch (PDOException $e) {
|
||||
$renderer->doc .= "<pre>Unable to connect ro database:" . $e->getMessage() . "</pre>\n";
|
||||
$renderer->doc .= "<pre>Unable to connect to database:" . $e->getMessage() . "</pre>\n";
|
||||
return true;
|
||||
}
|
||||
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
|
Loading…
Reference in New Issue