Commit eb50980e authored by Dirk Wildt's avatar Dirk Wildt

8.2.2

parent bef2b930
8.2.2
2019-08-12
Improvement
* #i0053: Add URL for live and sandbox to frontend of certification plugin.
Affected files:
* Classes/Controller/Immo24Controller.php
* Resources/Private/Language/Immo24
* de.locallang_mod.xlf
* locallang_mod.xlf
* #i0052: Remove deprecated plugin.
Affected files:
* Configuration/ExtTables
* 8.7/index.php
* Default/index.php
Bugfix
* #i0054: XML error prompt should display proper table.
Affected file:
* Classes/Scheduler/Immo24Task.php
8.2.1
2019-06-20
Upgrade
* #t3807: new method _zzDebug()
Affected file:
* Classes/Scheduler/Immo24Task.php
Optimise report
Affected file:
* Classes/Scheduler/Immo24Task.php
* #t3543: for TYPO3 8.7 / 9.5 and Immo24
* TCA
New files:
* Configuration/TCA/Default/*
Movements
* yourtable.tx_deal.marketplaces.immo24 > yourtable.immo24
* yourtable.ctrl.deal.marketplaces.immo24 > yourtable.ctrl.immo24
Affected files:
* Classes/Scheduler
* Immo24Task.php
......@@ -16,6 +41,20 @@
Affected file:
* Configuration/FlexForms/FlexformPi1.xml
Bugfix
* #t3806: ERROR: value for switch is undefined: ERROR_COMMON_SERVICE_UNAVAILABLE
Affected file:
*
* #t3799: Non-static method TYPO3\CMS\Core\Messaging\FlashMessageQueue::addMessage()
Affected files:
* Classes/Scheduler
* TestFieldProvider.php
* TestTask.php
* #t3798: setTitle() must be of the type string, null given
Replace null in calls with TYPO3\\CMS\\Core\\Messaging\\FlashMessage
Affected files:
* Classes/Scheduler
* TestFieldProvider.php
* TestTask.php
* #i0052: curl__init() > curl_init()
Affected file:
* Classes/Controller/Immo24Controller.php
......
......@@ -35,7 +35,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
* @package immo24
* @license http://www.gnu.org/licenses/lgpl.html
* GNU Lesser General Public License, version 3 or later
* @version 8.2.1
* @version 8.2.2
* @since 7.0.0
*/
class Immo24Controller extends ActionController
......@@ -125,12 +125,30 @@ class Immo24Controller extends ActionController
*/
private $sReadingType = NULL;
/**
* @var string
* @internal #i0053
*/
private $sUrlCurrent = NULL;
/**
* @var string
* @internal #i0053
*/
private $sUrlLive = 'https://www.immo24.de/';
/**
* @var string
* @internal #i0053
*/
private $sUrlSandbox = 'https://www.sandbox-immobilienscout24.de/';
/**
* _init() :
*
* @return void
* @access private
* @version 7.0.0
* @version 8.2.2
* @since 7.0.0
*/
private function _init()
......@@ -138,10 +156,11 @@ class Immo24Controller extends ActionController
$this->_initImmocaster();
$this->_initProperties();
$this->_initDatabase();
$this->_initUrlCurrent();
}
/**
* initDatabse() : Database contains certification records.
* initDatabase() : Database contains certification records.
* If there isn't any record, immo24 actions aren't possible, which need a certificate.
*
* @return void
......@@ -229,7 +248,7 @@ class Immo24Controller extends ActionController
}
/**
* initDatabseCurrent() : Database contains certification records.
* initDatabaseCurrent() : Database contains certification records.
* If there isn't any record, immo24 actions aren't possible, which need a certificate.
*
* @return void
......@@ -567,6 +586,31 @@ class Immo24Controller extends ActionController
}
}
/**
* initDatabaseCurrent() : Database contains certification records.
* If there isn't any record, immo24 actions aren't possible, which need a certificate.
*
* @return void
* @access private
* @version 7.0.0
* @since 7.0.0
*/
private function _initUrlCurrent()
{
switch( true )
{
case( $this->bImmo24Sandbox === FALSE):
$this->sUrlCurrent = $this->sUrl;
break;
case( $this->bImmo24Sandbox === TRUE):
$this->sUrlCurrent = $this->sUrlSandbox;
break;
case( $this->bImmo24Sandbox === NULL):
$this->_zzPromptErrorAndDie( 'errorRequestUrlUndefined', __METHOD__, __LINE__ );
break;
}
}
/**
* pluginAction() : Certificate current application at immobilienscout24
*
......@@ -730,7 +774,7 @@ class Immo24Controller extends ActionController
*
* @return void
* @access private
* @version 7.0.0
* @version 8.2.2
* @since 7.0.0
*/
private function _pluginCertificationUsersFromDatabaseWiUsers( $sUsers )
......@@ -749,6 +793,8 @@ class Immo24Controller extends ActionController
';
$prompt = str_replace( '%users%', $sUsers, $prompt );
$prompt = str_replace( '%dbtable%', $this->dbDatabase . '.' . $this->sDatabaseTableCurrent, $prompt );
// #i0053, 190811, dwildt, 1+
$prompt = str_replace( '%url%', $this->sUrlCurrent, $prompt );
if( count( $aUsers ) <= 1 )
{
......@@ -764,6 +810,8 @@ class Immo24Controller extends ActionController
';
$prompt = str_replace( '%users%', $sUsers, $prompt );
$prompt = str_replace( '%dbtable%', $this->dbDatabase . '.' . $this->sDatabaseTableCurrent, $prompt );
// #i0053, 190811, dwildt, 1+
$prompt = str_replace( '%url%', $this->sUrlCurrent, $prompt );
return $prompt;
}
......@@ -772,7 +820,7 @@ class Immo24Controller extends ActionController
*
* @return void
* @access private
* @version 7.0.0
* @version 8.2.2
* @since 7.0.0
*/
private function _pluginCertificationUsersFromDatabaseWoUsers()
......@@ -792,6 +840,8 @@ class Immo24Controller extends ActionController
</div>
';
$prompt = str_replace( '%dbtable%', $this->dbDatabase . '.' . $this->sDatabaseTableCurrent, $prompt );
// #i0053, 190811, dwildt, 1+
$prompt = str_replace( '%url%', $this->sUrlCurrent, $prompt );
return $prompt;
}
......@@ -1558,7 +1608,6 @@ class Immo24Controller extends ActionController
// // 190426, dwildt
// var_dump( __METHOD__, __LINE__, $aParameter);
// die();
// $this->oImmocaster->useHttps( true );
$returnAuthentication = $this->oImmocaster->getAccess( $aParameter );
if( $returnAuthentication === true )
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -29,14 +29,15 @@ $TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_addlist' ][ 'immo24_pi1' ]
'immo24_pi1'
, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/FlexformPi1.xml'
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:immo24/Resources/Private/Language/locallang_db.xml:tx_immo24_certificate'
, $pluginSignature
, 'EXT:immo24/ext_icon.svg'
]
, 'list_type'
);
// #i0052, 190811, dwildt, 8-
//TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
// [
// 'LLL:EXT:immo24/Resources/Private/Language/locallang_db.xml:tx_immo24_certificate'
// , $pluginSignature
// , 'EXT:immo24/ext_icon.svg'
// ]
// , 'list_type'
//);
/* * ************************************************************************
* Add pagetree icons
......
......@@ -29,15 +29,16 @@ $TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_addlist' ][ $pluginSignatur
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:immo24/Configuration/FlexForms/FlexformPi1.xml'
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:immo24/Resources/Private/Language/locallang_db.xml:tx_immo24_certificate'
, $pluginSignature
, 'EXT:immo24/ext_icon.svg'
]
, 'list_type'
, $_EXTKEY
);
// #i0052, 190811, dwildt, 8-
//TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
// [
// 'LLL:EXT:immo24/Resources/Private/Language/locallang_db.xml:tx_immo24_certificate'
// , $pluginSignature
// , 'EXT:immo24/ext_icon.svg'
// ]
// , 'list_type'
// , $_EXTKEY
//);
/* * ************************************************************************
......
......@@ -3,14 +3,14 @@
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../Includes.txt
.. include:: ../../Includes.txt
.. _administrators_bestpractice_tests:
.. _administrators_checkit:
Tests
=====
Check it!
=========
**Table of Contents**
......
......@@ -3,10 +3,10 @@
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. include:: ../../../Includes.txt
.. _administrators_bestpractice_tests_php:
.. _administrators_checkit_php:
PHP
......
......@@ -22,4 +22,4 @@ Administrators
Installation/Index
ExtensionManager/Index
Setup/Index
BestPractice/Index
\ No newline at end of file
CheckIt/Index
\ No newline at end of file
......@@ -9,5 +9,27 @@
.. _administrators_setup_cronjobs_immo24:
Immo 24
=======
\ No newline at end of file
Immo24
======
Requirements
''''''''''''
You must have configured tables of your database for mapping with immo24.
See :ref:`Mapping <developers_mapping>`
Workflow
''''''''
* Add the task / cron job: [Immo24: Test]
* Configure the task:
#. Disable it (it should run manually only)
#. Enter a frequency
#. Enter your e-mail-address
* Execute the task manually
\ No newline at end of file
......@@ -30,4 +30,6 @@ Workflow
#. Enter a frequency
#. Enter your e-mail-address
\ No newline at end of file
#. Enter your e-mail-address
* Execute the task manually
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. _developers_is24_debugging_apache:
Apache
======
Sometimes it seems, that a changed code hasn't any new effect to the workflow.
If you have this behaviour, please restart the Apache web server like:
.. code:: php
netzmacher@typo3.org: service apache2 restart
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. _developers_is24_debugging_curl:
Curl
====
If the cron job is running and running without any end, maybe the PHP curl statement
has an unexpected result.
Ypo can check the curl statement here:
* Resources/Private/Immo24/restapi-php-sdk_1.1.83/Immocaster/Immobilienscout/Immobilienscout.php
Look for
.. code:: php
...
$result = curl_exec( $ch )
...
Extend the code like in the snippet below:
.. code:: php
...
var_dump(__METHOD__, __LINE__, curl_getinfo( $ch ));
die();
$result = curl_exec( $ch )
...
Take the value from the element "url" and paste it into the adress line of your internet browser.
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../Includes.txt
.. _developers_is24_debugging:
Debugging
=========
**Table of Contents**
.. toctree::
:maxdepth: 3
:titlesonly:
Apache/Index
Curl/Index
\ No newline at end of file
......@@ -26,8 +26,10 @@ https://github.com/ImmobilienScout24/restapi-php-sdk
:maxdepth: 3
:titlesonly:
Wiki/Index
Registration/Index
Authentication/Index
Debugging/Index
Playground/Index
Registration/Index
Responses/Index
Tutorials/Index
Playground/Index
\ No newline at end of file
Wiki/Index
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../Includes.txt
.. _developers_is24_responses:
Responses
=========
https://api.immobilienscout24.de/get-started/responses.html
\ No newline at end of file
......@@ -18,5 +18,6 @@ Developers
:maxdepth: 3
:titlesonly:
Mapping/Index
IS24/Index
Git/Index
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../Includes.txt
.. _developers_mapping:
Mapping
=======
Immo24 supports
* apartments for rent and
* contacts
Apartments for rent and contacts must be linked.
**Table of Contents**
.. toctree::
:maxdepth: 3
:titlesonly:
fe_users/Index
my_apartmentsforrent/Index
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. _developers_mapping_feusers_check:
Check it!
=========
You can check your configuration with
* Modul System > Configuration
Clear Cache
-----------
Please clear the TYPO3 backend cache.
$GLOBALS['TCA']
---------------
* Modul System > Configuration: [$GLOBALS['TCA']]
columns
'''''''
The table fe_users must have some columns like:
* fe_users.columns.immo24*
ctrl.immo24
'''''''''''
The table fe_users must have the new ctrl property immo24 like:
* fe_users.ctrl.immo24
Your file structure
-------------------
This should be a cutout of the file structure of your extenion, if your extension is called
"yourextension".
.. code:: php
netzmacher@typo3.org: .../ext/yourextension# tree
.
├── Configuration
│   └── TCA
│   └── Overrides
│   ├── fe_users
│   │   ├── columns.php
│   │   └── mapping.php
│   └── fe_users.php
├── ext_tables.sql
└── Resources
└── Private
└── Language
├── de.fe_users.xlf
└── fe_users.xlf
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. _developers_mapping_feusers_database:
Database
========
You have to extend the fe_users table with some fields
Copy and paste the code
-----------------------
Copy the code of the ext_tables.sql from the :ref:`sample directory <developers_mapping_feusers-samplestructure>` and
paste it into the ext_tables.sql of your extension.
This will extend your table with the needed fields in the database.
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../Includes.txt
.. _developers_mapping_feusers:
Contacts
========
A sample configuration is prepared.
You find the step by step instruction on the next pages.
Workflow
--------
You have
* to copy and paste some files an directories
* to copy and paste code once
* to change one value once
.. _developers_mapping_feusers-samplestructure:
Sample Structure
----------------
.. code:: php
netzmacher@typo3.org: .../ext/immo24/Resources/Private/Immo24/samples/fe_users# tree
.
├── Configuration
│   └── TCA
│   └── Overrides
│   ├── fe_users
│   │   ├── columns.php
│   │   └── mapping.php
│   └── fe_users.php
├── ext_tables.sql
└── Resources
└── Private
└── Language
├── de.fe_users.xlf
└── fe_users.xlf
**Table of Contents**
.. toctree::
:maxdepth: 3
:titlesonly:
Database/Index
Language/Index
TCA/Index
Check/Index
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. _developers_mapping_feusers_language:
Language
========
Copy and paste the files
------------------------
Copy the language files (\*.xlf)
* from **Resources/Private/Language** of the :ref:`sample directory <developers_mapping_feusers-samplestructure>`
and paste it
* into the directory **Resources/Private/Language** of your extension.
No need to edit any file
------------------------
There is no need to change any value in the files.
\ No newline at end of file
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../../../../Includes.txt
.. _developers_mapping_feusers_tca:
TCA
===
Copy and paste files and directory
----------------------------------
Copy the TCA files (\*.php) and the directory
* from **Configuration/TCA/Overrides** of the :ref:`sample directory <developers_mapping_feusers-samplestructure>`
and paste it
* into the directory **Configuration/TCA/Overrides** of your extension.
Edit fe_users.php
-----------------
You must setup one value in the copied file fe_users.php at
* Configuration/TCA/Overrides/fe_users.php