aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-04-03 21:13:26 -0700
committerzotlabs <mike@macgirvin.com>2018-04-03 21:13:26 -0700
commit29b377d4c56763807d514a0e192cd12dd717f45d (patch)
treed89f85b028b6ffe66df228d5b9cf72d309949306 /Zotlabs/Module
parent4915a4efbb5a25668a917a953b8d8c49a3181e1c (diff)
downloadvolse-hubzilla-29b377d4c56763807d514a0e192cd12dd717f45d.tar.gz
volse-hubzilla-29b377d4c56763807d514a0e192cd12dd717f45d.tar.bz2
volse-hubzilla-29b377d4c56763807d514a0e192cd12dd717f45d.zip
get rid of dangerous test code
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Oauth2testvehicle.php68
1 files changed, 0 insertions, 68 deletions
diff --git a/Zotlabs/Module/Oauth2testvehicle.php b/Zotlabs/Module/Oauth2testvehicle.php
index 8d6552e36..a724dc549 100644
--- a/Zotlabs/Module/Oauth2testvehicle.php
+++ b/Zotlabs/Module/Oauth2testvehicle.php
@@ -49,30 +49,6 @@ class OAuth2TestVehicle extends \Zotlabs\Web\Controller {
*/
'$endpoints' => array(
array(
- 'oauth2testvehicle',
- array(
- array(
- 'action', 'delete_db'
- )
- ),
- 'oauth2test_delete_db',
- 'Delete the OAuth2 database tables',
- 'POST',
- ($_SESSION['success'] === 'delete_db'),
- ),
- array(
- 'oauth2testvehicle',
- array(
- array(
- 'action', 'create_db'
- )
- ),
- 'oauth2test_create_db',
- 'Create the OAuth2 database tables',
- 'POST',
- ($_SESSION['success'] === 'create_db'),
- ),
- array(
'authorize',
array(
array('response_type', 'code'),
@@ -164,50 +140,6 @@ class OAuth2TestVehicle extends \Zotlabs\Web\Controller {
$_SESSION['access_token'] = $response['access_token'];
}
break;
-/*
- case 'delete_db':
- $status = true;
- // Use the \OAuth2\Storage\Pdo class to create the OAuth2 tables
- // by passing it the database connection
- $pdo = \DBA::$dba->db;
- $storage = new \Zotlabs\Storage\ZotOauth2Pdo($pdo);
- foreach ($storage->getConfig() as $key => $table) {
- $r = q("DROP TABLE %s;", dbesc($table));
- if (!$r) {
- $status = false;
- }
- }
- if (!$status) {
- notice('Errors encountered deleting database tables.' . EOL);
- $_SESSION['success'] = '';
- } else {
- info('Database tables deleted successfully.' . EOL);
- $_SESSION['success'] = 'delete_db';
- }
- break;
-
- case 'create_db':
- $status = true;
- @include('.htconfig.php');
- $pdo = \DBA::$dba->db;
- $storage = new \Zotlabs\Storage\ZotOauth2Pdo($pdo);
- foreach (explode(';', $storage->getBuildSql($db_data)) as $statement) {
- try {
- $result = $pdo->exec($statement);
- } catch (\PDOException $e) {
- $status = false;
- }
- }
-
- if (!$status) {
- notice('Errors encountered creating database tables.' . EOL);
- $_SESSION['success'] = '';
- } else {
- info('Database tables created successfully.' . EOL);
- $_SESSION['success'] = 'create_db';
- }
- break;
-*/
default:
break;