Fix bug in DSN creation
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
* Default settings for the sqlquery plugin
|
* Default settings for the sqlquery plugin
|
||||||
*
|
*
|
||||||
* @author George Pirogov <i1557@yandex.ru>
|
* @author George Pirogov <i1557@yandex.ru>
|
||||||
|
* @author Thomas Hooge <thomas@hoogi.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//$conf['fixme'] = 'FIXME';
|
//$conf['fixme'] = 'FIXME';
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* Options for the sqlquery plugin
|
* Options for the sqlquery plugin
|
||||||
*
|
*
|
||||||
* @author George Pirogov <i1557@yandex.ru>
|
* @author George Pirogov <i1557@yandex.ru>
|
||||||
|
* @author Thomas Hooge <thomas@hoogi.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$meta['type'] = array('multichoice', '_choices' => array('mysql', 'dblib'));
|
$meta['type'] = array('multichoice', '_choices' => array('mysql', 'dblib'));
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
* English language file for sqlquery plugin
|
* English language file for sqlquery plugin
|
||||||
*
|
*
|
||||||
* @author George Pirogov <i1557@yandex.ru>
|
* @author George Pirogov <i1557@yandex.ru>
|
||||||
|
* @author Thomas Hooge <thomas@hoogi.de>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// keys need to match the config setting name
|
// keys need to match the config setting name
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
base sqlquery
|
base sqlquery
|
||||||
author Thomas Hooge
|
author Thomas Hooge
|
||||||
email thomas@hoogi.de
|
email thomas@hoogi.de
|
||||||
date 2023-12-01
|
date 2026-07-24
|
||||||
name SQL query plugin (multidb)
|
name SQL query plugin (multidb)
|
||||||
desc Processing queries to databases and display results as a table.
|
desc Processing queries to databases and display results as a table.
|
||||||
|
|||||||
+1
-1
@@ -85,7 +85,7 @@ class syntax_plugin_sqlquery extends DokuWiki_Syntax_Plugin {
|
|||||||
$password = $this->getConf('password');
|
$password = $this->getConf('password');
|
||||||
|
|
||||||
// connect to database
|
// connect to database
|
||||||
$dsn = "{$data['type']}:host={$data['host']};dbname={$data[db]};charset=UTF8;";
|
$dsn = "{$data['type']}:host={$data['host']};dbname={$data['db']};charset=UTF8;";
|
||||||
try {
|
try {
|
||||||
$dbh = new PDO($dsn, $user, $password);
|
$dbh = new PDO($dsn, $user, $password);
|
||||||
} catch (PDOException $e) {
|
} catch (PDOException $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user