Commit bc41d5d6 authored by Tomas Norre Mikkelsen's avatar Tomas Norre Mikkelsen Committed by Thomas Löffler
Browse files

[TASK] Adjust wsdl and objectmanager

parent 425a3937
...@@ -35,12 +35,8 @@ define('PATH_tslib', PATH_typo3 . 'sysext/cms/tslib/'); ...@@ -35,12 +35,8 @@ define('PATH_tslib', PATH_typo3 . 'sysext/cms/tslib/');
define('PATH_typo3conf', PATH_site . 'typo3conf/'); define('PATH_typo3conf', PATH_site . 'typo3conf/');
define('TYPO3_mainDir', 'typo3/'); define('TYPO3_mainDir', 'typo3/');
if (!defined('TYPO3_db')) { $serviceLocation = $_SERVER['HTTP_HOST'] . 'index.php?id=ter';
die('The configuration file was not included.'); $WSDLSource = file_get_contents('tx_ter.wsdl');
}
$serviceLocation = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'index.php?id=ter';
$WSDLSource = file_get_contents(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter') . 'tx_ter.wsdl');
$WSDLSource = trim(str_replace('---SERVICE_LOCATION---', $serviceLocation, $WSDLSource)); $WSDLSource = trim(str_replace('---SERVICE_LOCATION---', $serviceLocation, $WSDLSource));
if (!headers_sent()) { if (!headers_sent()) {
...@@ -48,5 +44,3 @@ if (!headers_sent()) { ...@@ -48,5 +44,3 @@ if (!headers_sent()) {
header('Content-Length: ' . strlen($WSDLSource)); header('Content-Length: ' . strlen($WSDLSource));
} }
echo($WSDLSource); echo($WSDLSource);
?>
\ No newline at end of file
...@@ -100,7 +100,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab ...@@ -100,7 +100,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
// Register the extension key at ter server, if successfull, add it to the extension table // Register the extension key at ter server, if successfull, add it to the extension table
if ($this->terConnection->registerExtension($extensionData)) { if ($this->terConnection->registerExtension($extensionData)) {
// Create extension model // Create extension model
$extension = $this->objectManager->create('Tx_TerFe2_Domain_Model_Extension'); $extension = $this->objectManager->get('Tx_TerFe2_Domain_Model_Extension');
$extension->setExtKey($extensionKey); $extension->setExtKey($extensionKey);
$extension->setFrontendUser($this->frontendUser['username']); $extension->setFrontendUser($this->frontendUser['username']);
...@@ -180,7 +180,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab ...@@ -180,7 +180,7 @@ class Tx_TerFe2_Controller_RegisterkeyController extends Tx_TerFe2_Controller_Ab
// ); // );
$countSkipped++; $countSkipped++;
} else { } else {
$extensionModel = $this->objectManager->create('Tx_TerFe2_Domain_Model_Extension'); $extensionModel = $this->objectManager->get('Tx_TerFe2_Domain_Model_Extension');
$extensionModel->setExtKey($extensionKey); $extensionModel->setExtKey($extensionKey);
$extensionModel->setFrontendUser($extension['ownerusername']); $extensionModel->setFrontendUser($extension['ownerusername']);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment