[TASK] ext:adodb Remove connection wizard 59/25759/2
authorChristian Kuhn <lolli@schwarzbu.ch>
Fri, 29 Nov 2013 13:13:12 +0000 (14:13 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Fri, 29 Nov 2013 15:40:21 +0000 (16:40 +0100)
Extension adodb can be used together with TER extension "datasource".
ext:adodb delivers a wizard and flexform code to connect to this
third party extension. Last release of ext:datasource was in 2005,
the extension in unmaintained and always had an experimental
character. Since core extension functionality should not depend on
third party code, the datasource related code of ext:adodb is fully
removed with this patch in 6.2.

Change-Id: Ib7de137599d9bb55d6b9dd98667cbbe3dd70c986
Resolves: #42651
Releases: 6.2
Reviewed-on: https://review.typo3.org/25759
Reviewed-by: Oliver Klee
Tested-by: Oliver Klee
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Franz G. Jahn
Tested-by: Franz G. Jahn
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/adodb/Classes/DataHandling/DatabaseTypeItemsFunction.php [deleted file]
typo3/sysext/adodb/Classes/View/CheckConnectionWizardView.php [deleted file]
typo3/sysext/adodb/Migrations/Code/ClassAliasMap.php [deleted file]
typo3/sysext/adodb/checkconnectionwizard.php [deleted file]
typo3/sysext/adodb/datasource_flexform_ds.xml [deleted file]
typo3/sysext/adodb/ext_localconf.php [deleted file]
typo3/sysext/adodb/locallang_datasource_config.xlf [deleted file]
typo3/sysext/adodb/locallang_wizard.xlf [deleted file]
typo3/sysext/adodb/res/checkconnection.gif [deleted file]
typo3/sysext/core/Migrations/Code/LegacyClassesForIde.php

diff --git a/typo3/sysext/adodb/Classes/DataHandling/DatabaseTypeItemsFunction.php b/typo3/sysext/adodb/Classes/DataHandling/DatabaseTypeItemsFunction.php
deleted file mode 100644 (file)
index 91b33e0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace TYPO3\CMS\Adodb\DataHandling;
-
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2004-2013 Robert Lemke (robert@typo3.org)
- *  (c) 2006-2013 Karsten Dambekalns (karsten@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Tceforms class for adodb
- *
- * @author Robert Lemke <robert@typo3.org>
- * @author Karsten Dambekalns <karsten@typo3.org>
- */
-class DatabaseTypeItemsFunction {
-
-       /**
-        * @todo Define visibility
-        */
-       public function itemsProcFunc_dbtype(&$params, $pObj) {
-               if (is_callable('sybase_get_last_message')) {
-                       $params['items'][] = array('Sybase', 'sybase');
-               }
-               if (is_callable('odbc_error')) {
-                       $params['items'][] = array('ODBC', 'odbc');
-               }
-               if (is_callable('mysql_error')) {
-                       $params['items'][] = array('MySQL', 'mysql');
-               }
-               if (is_callable('mssql_connect')) {
-                       $params['items'][] = array('MSSQL', 'mssql');
-               }
-               if (is_callable('ocilogon')) {
-                       $params['items'][] = array('Oracle', 'oci8');
-               }
-       }
-
-}
diff --git a/typo3/sysext/adodb/Classes/View/CheckConnectionWizardView.php b/typo3/sysext/adodb/Classes/View/CheckConnectionWizardView.php
deleted file mode 100644 (file)
index bfa53b7..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-namespace TYPO3\CMS\Adodb\View;
-
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2004-2013 Robert Lemke (robert@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-/**
- * Script Class checking the connection to an ADODB handled database
- *
- * @author Robert Lemke <robert@typo3.org>
- */
-class CheckConnectionWizardView {
-
-       /**
-        * @todo Define visibility
-        */
-       public function main() {
-               $content = '<html><body>';
-               $conf = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('P');
-               $conf['md5ID'];
-               if ($conf['table'] == 'tx_datasources_datasource') {
-                       $dsRecord = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($conf['table'], intval($conf['uid']));
-                       if (is_array($dsRecord)) {
-                               $dsArr = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($dsRecord['configuration']);
-                               $dsConf = $dsArr['data']['sDEF']['lDEF'];
-                               $content .= '<p>Trying to connect with Host / DSN <strong>' . htmlspecialchars($dsConf['field_host']['vDEF']) . '</strong> with user <strong>' . htmlspecialchars($dsConf['field_username']['vDEF']) . '</strong> ... ';
-                               $dbConn =& ADONewConnection($dsConf['field_dbtype']['vDEF']);
-                               $dbConn->PConnect($dsConf['field_host']['vDEF'], $dsConf['field_username']['vDEF'], $dsConf['field_password']['vDEF'], $dsConf['field_dbname']['vDEF']);
-                               $dbConn->SetFetchMode(ADODB_FETCH_ASSOC);
-                               $content .= $dbConn->ErrorMsg();
-                               if ($dbConn->_connectionID) {
-                                       $content .= '</p>';
-                                       $query = 'SELECT * FROM ' . $dsConf['field_table']['vDEF'];
-                                       $recordSet =& $dbConn->SelectLimit($query, 150);
-                                       if (!$recordSet) {
-                                               $content .= '<p>Query failed (' . htmlspecialchars($query) . '):<br />';
-                                               $content .= $dbConn->ErrorMsg() . '</p>';
-                                       } else {
-                                               $content .= '<span style="color:green">successful!</span></p>';
-                                               $counter = 0;
-                                               $content .= '<p>Showing the first 150 entries from the result recordset:</p>';
-                                               $content .= '<table border="1">';
-                                               while (!$recordSet->EOF) {
-                                                       $content .= '<tr>';
-                                                       if ($counter == 0) {
-                                                               foreach (array_keys($recordSet->fields) as $key) {
-                                                                       $content .= '<th>' . htmlspecialchars($key) . '</th>';
-                                                               }
-                                                               $content .= '</tr><tr>';
-                                                       }
-                                                       foreach (array_values($recordSet->fields) as $value) {
-                                                               $content .= '<td>' . htmlspecialchars($value) . '&nbsp;</td>';
-                                                       }
-                                                       $recordSet->MoveNext();
-                                                       $counter++;
-                                                       $content .= '</tr>';
-                                               }
-                                               $content .= '<table>';
-                                       }
-                               }
-                       } else {
-                               $content .= '<span style="color:red">failed!</span></p><p><strong>Error Message:</strong>' . $dbConn->ErrorMsg() . '</p>';
-                       }
-               }
-               $content .= '</body></html>';
-               echo $content;
-       }
-
-}
diff --git a/typo3/sysext/adodb/Migrations/Code/ClassAliasMap.php b/typo3/sysext/adodb/Migrations/Code/ClassAliasMap.php
deleted file mode 100644 (file)
index 1a0f8a0..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-return array(
-       'tx_adodb_tceforms' => 'TYPO3\\CMS\\Adodb\\DataHandling\\DatabaseTypeItemsFunction',
-       'tx_adodb_checkconnectionwizard' => 'TYPO3\\CMS\\Adodb\\View\\CheckConnectionWizardView',
-);
diff --git a/typo3/sysext/adodb/checkconnectionwizard.php b/typo3/sysext/adodb/checkconnectionwizard.php
deleted file mode 100644 (file)
index a3c48d2..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2004-2013 Robert Lemke (robert@typo3.org)
- *  All rights reserved
- *
- *  This script is part of the TYPO3 project. The TYPO3 project is
- *  free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
- *  (at your option) any later version.
- *
- *  The GNU General Public License can be found at
- *  http://www.gnu.org/copyleft/gpl.html.
- *
- *  This script is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
- *
- *  This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Check connection wizard for ADO DB databases. For usage in a popup window.
- *
- * @author Robert Lemke <robert@typo3.org>
- */
-// Build TYPO3 enviroment:
-$BACK_PATH = '../../../typo3/';
-define('TYPO3_MOD_PATH', 'sysext/adodb/');
-require $BACK_PATH . 'init.php';
-// Include ADODB library:
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('adodb') . 'adodb/adodb.inc.php';
-// Include language labels:
-$LANG->includeLLFile('EXT:adodb/locallang_wizard.xlf');
-/*
- * @deprecated since 6.0, the classname tx_adodb_checkconnectionwizard and this file is obsolete
- * and will be removed with 6.2. The class was renamed and is now located at:
- * typo3/sysext/adodb/Classes/View/CheckConnectionWizardView.php
- */
-require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('adodb') . 'Classes/View/CheckConnectionWizardView.php';
-// Make instance:
-$SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Adodb\\View\\CheckConnectionWizardView');
-$SOBE->main();
diff --git a/typo3/sysext/adodb/datasource_flexform_ds.xml b/typo3/sysext/adodb/datasource_flexform_ds.xml
deleted file mode 100644 (file)
index 1816faf..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<T3DataStructure>
-       <meta>
-               <langDisable>1</langDisable>
-       </meta>
-       <ROOT>
-               <type>array</type>
-               <el>
-                       <field_dbtype>
-                               <TCEforms>
-                                       <label>LLL:EXT:adodb/locallang_datasource_config.xml:dbtype</label>
-                                       <config>
-                                               <type>select</type>
-                                               <itemsProcFunc>TYPO3\CMS\Adodb\DataHandling\DatabaseTypeItemsFunction->itemsProcFunc_dbtype</itemsProcFunc>
-                                               <wizards>
-                                                       <_PADDING>4</_PADDING>
-                                                       <_POSITION>right</_POSITION>
-                                                       <checkconnection>
-                                                               <type>popup</type>
-                                                               <title>LLL:EXT:adodb/locallang_datasource_config.xml:checkconnectionwizard</title>
-                                                               <script>EXT:adodb/checkconnectionwizard.php</script>
-                                                               <icon>EXT:datasources/res/wizard_checkconnection.gif</icon>
-                                                               <JSopenParams>height=350,width=450,status=0,menubar=0,scrollbars=1</JSopenParams>
-                                                               <notNewRecords>1</notNewRecords>
-                                                       </checkconnection>
-                                               </wizards>
-                                       </config>
-                               </TCEforms>
-                       </field_dbtype>
-                       <field_host>
-                               <TCEforms>
-                                       <label>LLL:EXT:adodb/locallang_datasource_config.xml:host</label>
-                                       <config>
-                                               <type>input</type>
-                                       </config>
-                               </TCEforms>
-                       </field_host>
-                       <field_dbname>
-                               <TCEforms>
-                                       <label>LLL:EXT:adodb/locallang_datasource_config.xml:dbname</label>
-                                       <config>
-                                               <type>input</type>
-                                       </config>
-                               </TCEforms>
-                       </field_dbname>
-                       <field_username>
-                               <TCEforms>
-                                       <label>LLL:EXT:adodb/locallang_datasource_config.xml:username</label>
-                                       <config>
-                                               <type>input</type>
-                                       </config>
-                               </TCEforms>
-                       </field_username>
-                       <field_password>
-                               <TCEforms>
-                                       <label>LLL:EXT:adodb/locallang_datasource_config.xml:password</label>
-                                               <config>
-                                                       <type>input</type>
-                                                       <eval>password</eval>
-                                               </config>
-                               </TCEforms>
-                       </field_password>
-                       <field_table>
-                               <TCEforms>
-                                       <label>LLL:EXT:adodb/locallang_datasource_config.xml:table</label>
-                                       <config>
-                                               <type>input</type>
-                                       </config>
-                               </TCEforms>
-                       </field_table>
-               </el>
-       </ROOT>
-</T3DataStructure>
\ No newline at end of file
diff --git a/typo3/sysext/adodb/ext_localconf.php b/typo3/sysext/adodb/ext_localconf.php
deleted file mode 100644 (file)
index c99c2bb..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-if (!defined('TYPO3_MODE')) {
-       die('Access denied.');
-}
-
-// Register as a data source application if the extension datasources is loaded:
-if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('datasources')) {
-       require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('datasources') . 'class.tx_datasources_main.php';
-       $dataSourcesMainObj = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj('EXT:datasources/class.tx_datasources_main.php:&tx_datasources_main');
-       $dataSourcesMainObj->registerApplication('ADOdb', 'adodb');
-}
diff --git a/typo3/sysext/adodb/locallang_datasource_config.xlf b/typo3/sysext/adodb/locallang_datasource_config.xlf
deleted file mode 100644 (file)
index b0b5c4d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0">
-       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:32Z" product-name="adodb">
-               <header/>
-               <body>
-                       <trans-unit id="dbtype" xml:space="preserve">
-                               <source>Database type</source>
-                       </trans-unit>
-                       <trans-unit id="host" xml:space="preserve">
-                               <source>Host or DSN</source>
-                       </trans-unit>
-                       <trans-unit id="dbname" xml:space="preserve">
-                               <source>Database name</source>
-                       </trans-unit>
-                       <trans-unit id="username" xml:space="preserve">
-                               <source>Username</source>
-                       </trans-unit>
-                       <trans-unit id="password" xml:space="preserve">
-                               <source>Password</source>
-                       </trans-unit>
-                       <trans-unit id="table" xml:space="preserve">
-                               <source>Table name</source>
-                       </trans-unit>
-                       <trans-unit id="checkconnectionwizard" xml:space="preserve">
-                               <source>Check connection to database with configuration entered below</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
\ No newline at end of file
diff --git a/typo3/sysext/adodb/locallang_wizard.xlf b/typo3/sysext/adodb/locallang_wizard.xlf
deleted file mode 100644 (file)
index b0b5c4d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xliff version="1.0">
-       <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:32Z" product-name="adodb">
-               <header/>
-               <body>
-                       <trans-unit id="dbtype" xml:space="preserve">
-                               <source>Database type</source>
-                       </trans-unit>
-                       <trans-unit id="host" xml:space="preserve">
-                               <source>Host or DSN</source>
-                       </trans-unit>
-                       <trans-unit id="dbname" xml:space="preserve">
-                               <source>Database name</source>
-                       </trans-unit>
-                       <trans-unit id="username" xml:space="preserve">
-                               <source>Username</source>
-                       </trans-unit>
-                       <trans-unit id="password" xml:space="preserve">
-                               <source>Password</source>
-                       </trans-unit>
-                       <trans-unit id="table" xml:space="preserve">
-                               <source>Table name</source>
-                       </trans-unit>
-                       <trans-unit id="checkconnectionwizard" xml:space="preserve">
-                               <source>Check connection to database with configuration entered below</source>
-                       </trans-unit>
-               </body>
-       </file>
-</xliff>
\ No newline at end of file
diff --git a/typo3/sysext/adodb/res/checkconnection.gif b/typo3/sysext/adodb/res/checkconnection.gif
deleted file mode 100644 (file)
index ce3c90d..0000000
Binary files a/typo3/sysext/adodb/res/checkconnection.gif and /dev/null differ
index 0686143..0ded5aa 100644 (file)
@@ -29,16 +29,6 @@ class Tx_Aboutmodules_Controller_ModulesController extends \TYPO3\CMS\Aboutmodul
 /**
  * @deprecated since 6.0 will be removed in 7.0
  */
-class tx_adodb_tceforms extends \TYPO3\CMS\Adodb\DataHandling\DatabaseTypeItemsFunction {}
-
-/**
- * @deprecated since 6.0 will be removed in 7.0
- */
-class tx_adodb_checkconnectionwizard extends \TYPO3\CMS\Adodb\View\CheckConnectionWizardView {}
-
-/**
- * @deprecated since 6.0 will be removed in 7.0
- */
 class AjaxLogin extends \TYPO3\CMS\Backend\AjaxLoginHandler {}
 
 /**