[!!!][TASK] Remove deprecated function calls since 6.2 67/40367/7
authorBenjamin Mack <benni@typo3.org>
Wed, 17 Jun 2015 15:07:25 +0000 (17:07 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Thu, 18 Jun 2015 21:56:04 +0000 (23:56 +0200)
Some last leftover deprecated methods and logic are removed.

Resolves: #67565
Releases: master
Change-Id: Ia6a62d8aa436e491e93dce3b51468c7bcaf6bcb7
Reviewed-on: http://review.typo3.org/40367
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Classes/AjaxRequestHandler.php
typo3/sysext/backend/Classes/Rte/AbstractRte.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-67565-DeprecatedBackendRelatedMethodsRemoved.rst [new file with mode: 0644]

index 123816b..814b85d 100644 (file)
@@ -76,16 +76,9 @@ class AjaxRequestHandler implements RequestHandlerInterface {
                $ajaxRegistryEntry = isset($GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX'][$ajaxID]) ? $GLOBALS['TYPO3_CONF_VARS']['BE']['AJAX'][$ajaxID] : NULL;
                $ajaxScript = NULL;
                $csrfTokenCheck = FALSE;
-               if ($ajaxRegistryEntry !== NULL) {
-                       if (is_array($ajaxRegistryEntry)) {
-                               if (isset($ajaxRegistryEntry['callbackMethod'])) {
-                                       $ajaxScript = $ajaxRegistryEntry['callbackMethod'];
-                                       $csrfTokenCheck = $ajaxRegistryEntry['csrfTokenCheck'];
-                               }
-                       } else {
-                               // @deprecated since 6.2 will be removed two versions later
-                               $ajaxScript = $ajaxRegistryEntry;
-                       }
+               if ($ajaxRegistryEntry !== NULL && is_array($ajaxRegistryEntry) && isset($ajaxRegistryEntry['callbackMethod'])) {
+                       $ajaxScript = $ajaxRegistryEntry['callbackMethod'];
+                       $csrfTokenCheck = $ajaxRegistryEntry['csrfTokenCheck'];
                }
 
                // Instantiating the AJAX object
index 0f2a840..bf34fa4 100644 (file)
@@ -78,7 +78,7 @@ class AbstractRte {
                // Create item:
                $item = '
                        ' . $this->triggerField($PA['itemFormElName']) . '
-                       <textarea name="' . htmlspecialchars($PA['itemFormElName']) . '"' . $pObj->formWidthText('48', 'off') . ' rows="20" wrap="off" style="background-color: #99eebb;">' . GeneralUtility::formatForTextarea($value) . '</textarea>';
+                       <textarea name="' . htmlspecialchars($PA['itemFormElName']) . '"' . $pObj->formWidth('48') . ' rows="20" wrap="off" style="background-color: #99eebb;">' . GeneralUtility::formatForTextarea($value) . '</textarea>';
                // Return form item:
                return $item;
        }
index b11d36b..403e1f8 100644 (file)
@@ -676,25 +676,6 @@ function jumpToUrl(URL) {
        }
 
        /**
-        * This function is dedicated to textareas, which has the wrapping on/off option to observe.
-        * EXAMPLE:
-        * <textarea rows="10" wrap="off" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48, "", "off").'>
-        * or
-        * <textarea rows="10" wrap="virtual" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48, "", "virtual").'>
-        *
-        * @param int $size A relative number which multiplied with approx. 10 will lead to the width in pixels
-        * @param string $styleOverride A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
-        * @param string $wrap Pass on the wrap-attribute value you use in your <textarea>! This will be used to make sure that some browsers will detect wrapping alright.
-        * @return string Tag attributes for an <input> tag (regarding width)
-        * @see formWidth()
-        * @deprecated since TYPO3 CMS 6.2, remove two versions later, as this is function is not needed anymore, use formWidth()
-        */
-       public function formWidthText($size = 48, $styleOverride = '', $wrap = '') {
-               GeneralUtility::logDeprecatedFunction();
-               return $this->formWidth($size, TRUE, $styleOverride);
-       }
-
-       /**
         * Returns JavaScript variables setting the returnUrl and thisScript location for use by JavaScript on the page.
         * Used in fx. db_list.php (Web>List)
         *
index fe5b4d1..5a5705c 100644 (file)
@@ -909,17 +909,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                return $out;
        }
 
-       /**
-        * Get backend layout configuration
-        *
-        * @return array
-        * @deprecated since TYPO3 CMS 6.2, will be removed two versions later
-        */
-       public function getBackendLayoutConfiguration() {
-               GeneralUtility::logDeprecatedFunction();
-               return $this->getBackendLayoutView()->getSelectedBackendLayout($this->id);
-       }
-
        /**********************************
         *
         * Generic listing of items
@@ -1994,29 +1983,6 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
        }
 
        /**
-        * Will perform "word-wrapping" on the input string. What it does is to split by space or line break,
-        * then find any word longer than $max and if found, a hyphen is inserted.
-        * Works well on normal texts, little less well when HTML is involved (since much HTML will have
-        * long strings that will be broken).
-        *
-        * @param string $content Content to word-wrap.
-        * @param int $max Max number of chars in a word before it will be wrapped.
-        * @param string $char Character to insert when wrapping.
-        * @return string Processed output.
-        * @deprecated since 6.2 - will be removed two versions later; use CSS instead (word-break: break-all;)
-        */
-       public function wordWrapper($content, $max = 50, $char = ' -') {
-               GeneralUtility::logDeprecatedFunction();
-               $array = preg_split('/[ ' . LF . ']/', $content);
-               foreach ($array as $val) {
-                       if (strlen($val) > $max) {
-                               $content = str_replace($val, substr(chunk_split($val, $max, $char), 0, -1), $content);
-                       }
-               }
-               return $content;
-       }
-
-       /**
         * Returns icon for "no-edit" of a record.
         * Basically, the point is to signal that this record could have had an edit link if
         * the circumstances were right. A placeholder for the regular edit icon...
index ecabe0c..74c9643 100644 (file)
@@ -411,7 +411,7 @@ class QueryView {
                                        $rowArr[] = $this->csvValues($row, ',', '"', $GLOBALS['TCA'][$table], $table);
                                }
                                if (count($rowArr)) {
-                                       $out .= '<textarea name="whatever" rows="20" wrap="off"' . $GLOBALS['SOBE']->doc->formWidthText($this->formW, '', 'off') . ' class="text-monospace">' . GeneralUtility::formatForTextarea(implode(LF, $rowArr)) . '</textarea>';
+                                       $out .= '<textarea name="whatever" rows="20" wrap="off"' . $GLOBALS['SOBE']->doc->formWidth($this->formW) . ' class="text-monospace">' . GeneralUtility::formatForTextarea(implode(LF, $rowArr)) . '</textarea>';
                                        if (!$this->noDownloadB) {
                                                $out .= '<br><input class="btn btn-default" type="submit" name="download_file" value="Click to download file" onClick="window.location.href=\'' . $this->downloadScript . '\';">';
                                        }
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-67565-DeprecatedBackendRelatedMethodsRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-67565-DeprecatedBackendRelatedMethodsRemoved.rst
new file mode 100644 (file)
index 0000000..d59c9cd
--- /dev/null
@@ -0,0 +1,27 @@
+=============================================================
+Breaking: #67565 - Deprecated backend related methods removed
+=============================================================
+
+Description
+===========
+
+The following deprecated methods have been removed:
+
+
+.. code-block:: php
+
+       DocumentTemplate::formWidthText()
+       PageLayoutView::getBackendLayoutConfiguration()
+       PageLayoutView::wordWrapper()
+
+
+Impact
+======
+
+Calls to these methods will result in a fatal error.
+
+
+Affected Installations
+======================
+
+Instances with third-party extensions calling one of these methods.