Skip to content

Commit

Permalink
[TASK] More compatibility fixes for TYPO3 6.2 (#55783)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/formhandler/trunk@85290 735d13b6-9817-0410-8766-e36946ffe9aa
  • Loading branch information
reinhardfuehricht committed May 16, 2014
1 parent 11c9de4 commit 70875e4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Classes/Component/Tx_Formhandler_Component_Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ private function loadTypoScriptConfig() {
$conf = $overrideSettings['settings.']['additionalIncludePaths.'];
}
if(TYPO3_MODE === 'BE') {
$tsconfig = t3lib_BEfunc::getModTSconfig(intval($_GET['id']), 'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig(intval($_GET['id']), 'tx_formhandler_mod1');
if (is_array($tsconfig['properties']['config.']['additionalIncludePaths.'])) {
$conf = $tsconfig['properties']['config.']['additionalIncludePaths.'];
$conf = $this->getParsedIncludePaths($conf);
Expand Down
10 changes: 5 additions & 5 deletions Classes/Controller/Module/Tx_Formhandler_Controller_Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ protected function generatePDF($detailId) {
$allParams = array_merge($allParams, $row['params']);
}
$GLOBALS['TYPO3_DB']->sql_free_result($res);
$tsconfig = t3lib_BEfunc::getModTSconfig($this->id,'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id,'tx_formhandler_mod1');
$configParams = array();

$className = 'Tx_Formhandler_Generator_TCPDF';
Expand Down Expand Up @@ -333,7 +333,7 @@ protected function generateCSV($detailId) {
$count = 0;
$hashes = array();
$availableFormats = array();
$tsconfig = t3lib_BEfunc::getModTSconfig($this->id,'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id,'tx_formhandler_mod1');

$className = 'Tx_Formhandler_Generator_CSV';
if($tsconfig['properties']['config.']['generators.']['csv']) {
Expand Down Expand Up @@ -791,7 +791,7 @@ protected function buildWhereClause() {
$where = array();

if ($this->id) {
$tsconfig = t3lib_BEfunc::getModTSconfig($this->id, 'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id, 'tx_formhandler_mod1');
$isAllowedToShowAll = (intval($tsconfig['properties']['config.']['enableShowAllButton']) === 1);
}

Expand All @@ -805,7 +805,7 @@ protected function buildWhereClause() {
$pid_search = array();
// check is page shall be accessed by current BE user
foreach ($pids as $pid) {
if (t3lib_BEfunc::readPageAccess(intval($pid), $GLOBALS['BE_USER']->getPagePermsClause(1))) {
if (\TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess(intval($pid), $GLOBALS['BE_USER']->getPagePermsClause(1))) {
$pid_search[] = intval($pid);
}
}
Expand Down Expand Up @@ -875,7 +875,7 @@ protected function getFilterSection() {

// display show all function
if ($this->id) {
$tsconfig = t3lib_BEfunc::getModTSconfig($this->id, 'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id, 'tx_formhandler_mod1');
$isAllowedToShowAll = (intval($tsconfig['properties']['config.']['enableShowAllButton']) === 1);
}
if ($GLOBALS['BE_USER']->user['admin'] || $isAllowedToShowAll) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function setId($id) {
* @return void
*/
protected function init() {
$tsconfig = t3lib_BEfunc::getModTSconfig($this->id, 'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($this->id, 'tx_formhandler_mod1');
$this->settings = $tsconfig['properties']['config.'];

$GLOBALS['LANG']->includeLLFile('EXT:formhandler/Resources/Language/locallang.xml');
Expand Down
6 changes: 3 additions & 3 deletions Classes/Controller/Module/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class tx_formhandler_module1 extends t3lib_SCbase {
*/
function init() {
$id = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
$tsconfig = t3lib_BEfunc::getModTSconfig($id, 'tx_formhandler_mod1');
$tsconfig = \TYPO3\CMS\Backend\Utility\BackendUtility::getModTSconfig($id, 'tx_formhandler_mod1');
$this->settings = $tsconfig['properties']['config.'];
parent::init();

Expand Down Expand Up @@ -111,7 +111,7 @@ function main() {

// Access check!
// The page will show only if there is a valid page and if this page may be viewed by the user
$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id, $this->perms_clause);
$this->pageinfo = \TYPO3\CMS\Backend\Utility\BackendUtility::readPageAccess($this->id, $this->perms_clause);
$access = is_array($this->pageinfo) ? 1 : 0;

if (($this->id && $access) || ($GLOBALS['BE_USER']->user['admin'] && !$this->id)) {
Expand Down Expand Up @@ -154,7 +154,7 @@ function jumpToUrl(URL) {
$this->content .= $this->doc->startPage($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
$this->content .= $this->doc->spacer(5);
$this->content .= $this->doc->section('', $this->doc->funcMenu('', t3lib_BEfunc::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
$this->content .= $this->doc->section('', $this->doc->funcMenu('', \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu($this->id, 'SET[function]', $this->MOD_SETTINGS['function'], $this->MOD_MENU['function'])));
$this->content .= $this->doc->divider(5);
$this->content .= $this->moduleContent();

Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/Tx_Formhandler_Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @author Reinhard Führicht <[email protected]>
*/
class Tx_Formhandler_Dispatcher extends tslib_pibase {
class Tx_Formhandler_Dispatcher extends TYPO3\CMS\Frontend\Plugin\AbstractPlugin {

/**
* Compontent Manager
Expand Down
2 changes: 1 addition & 1 deletion Classes/View/Tx_Formhandler_AbstractView.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @author Reinhard Führicht <[email protected]>
*/
abstract class Tx_Formhandler_AbstractView extends tslib_pibase {
abstract class Tx_Formhandler_AbstractView extends TYPO3\CMS\Frontend\Plugin\AbstractPlugin {

/**
* The prefix id
Expand Down
6 changes: 1 addition & 5 deletions pi1/class.tx_formhandler_pi1.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,9 @@
* @author Reinhard Führicht <[email protected]>
*/

$compatibilityFuncs = Tx_Formhandler_CompatibilityFuncs::getInstance();
if($compatibilityFuncs->convertVersionNumberToInteger(TYPO3_version) < 6002000) {
require_once(PATH_tslib . 'class.tslib_pibase.php');
}
require_once(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('formhandler') . 'Classes/Controller/Tx_Formhandler_Dispatcher.php');

class tx_formhandler_pi1 extends tslib_pibase {
class tx_formhandler_pi1 extends TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
var $prefixId = 'tx_formhandler_pi1';
var $scriptRelPath = 'pi1/class.tx_formhandler_pi1.php';
var $extKey = 'formhandler';
Expand Down

0 comments on commit 70875e4

Please sign in to comment.