[!!!][TASK][CONF] Remove deprecated code for 4.7
authorMarkus Klein <klein.t3@mfc-linz.at>
Sun, 27 Nov 2011 17:02:18 +0000 (11:02 -0600)
committerSteffen Ritter <info@rs-websystems.de>
Mon, 5 Dec 2011 12:08:08 +0000 (13:08 +0100)
Removes all deprecated code marked for deletion in 4.7.

Change-Id: I2c5d0d3a11efc909ef814e8b795abcdaca8166ed
Resolves: #32108
Releases: 4.7
Reviewed-on: http://review.typo3.org/6946
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Stefan Neufeind
typo3/sysext/version/class.tx_version_gui.php
typo3/sysext/version/class.tx_version_tcemain.php
typo3/sysext/version/cm1/index.php
typo3/sysext/version/ws/class.wslib.php

index c59737f..bac0e02 100644 (file)
@@ -177,21 +177,6 @@ class tx_version_gui {
                                                                </table>
                                                        ';
                                                }
-                                       } elseif ($GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'] == FALSE && $GLOBALS['TYPO3_CONF_VARS']['BE']['newPagesVersioningType'] == 0) {
-                                                       // only add this info if old/deprecated newPagesVersioning is allowed
-                                               return '
-
-                                                       <!--
-                                                               Version selector:
-                                                       -->
-                                                       <table border="0" cellpadding="0" cellspacing="0" id="typo3-versionSelector">
-                                                               <tr>
-                                                                       <td>' . $selectorLabel . '</td>
-                                                                       <td>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspace', TRUE) . ': "' . htmlspecialchars($wsTitle) . '"</td>
-                                                                       <td><em>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.versionsFound', TRUE) . '</em></td>
-                                                               </tr>
-                                                       </table>
-                                               ';
                                        }
                                } elseif ($verPage['t3ver_swapmode']==0) {
                                        $onClick = $GLOBALS['TBE_TEMPLATE']->issueCommand('&cmd[pages][' . $onlineId . '][version][action]=swap&cmd[pages][' .
index e01bb39..320c87f 100644 (file)
@@ -458,11 +458,6 @@ class tx_version_tcemain {
                                        // old way, options are TCEMAIN.notificationEmail_body/subject
                                $TCEmainTSConfig = $tcemainObj->getTCEMAIN_TSconfig($pageUid);
 
-                                       // these options are deprecated since TYPO3 4.5, but are still
-                                       // used in order to provide backwards compatibility
-                               $emailMessage = trim($TCEmainTSConfig['notificationEmail_body']);
-                               $emailSubject = trim($TCEmainTSConfig['notificationEmail_subject']);
-
                                        // new way, options are
                                        // pageTSconfig: tx_version.workspaces.stageNotificationEmail.subject
                                        // userTSconfig: page.tx_version.workspaces.stageNotificationEmail.subject
@@ -510,98 +505,62 @@ class tx_version_tcemain {
                                        }
                                }
 
-                                       // sending the emails the old way with sprintf(),
-                                       // because it was set explicitly in TSconfig
-                               if ($emailMessage && $emailSubject) {
-                                       t3lib_div::deprecationLog('This TYPO3 installation uses Workspaces staging notification by setting the TSconfig options "TCEMAIN.notificationEmail_subject" / "TCEMAIN.notificationEmail_body". Please use the more flexible marker-based options tx_version.workspaces.stageNotificationEmail.message / tx_version.workspaces.stageNotificationEmail.subject');
-
-                                       $emailSubject = sprintf($emailSubject, $elementName);
-                                       $emailMessage = sprintf($emailMessage,
-                                               $markers['###SITE_NAME###'],
-                                               $markers['###SITE_URL###'],
-                                               $markers['###WORKSPACE_TITLE###'],
-                                               $markers['###WORKSPACE_UID###'],
-                                               $markers['###ELEMENT_NAME###'],
-                                               $markers['###NEXT_STAGE###'],
-                                               $markers['###COMMENT###'],
-                                               $markers['###USER_REALNAME###'],
-                                               $markers['###USER_USERNAME###'],
-                                               $markers['###RECORD_PATH###'],
-                                               $markers['###RECORD_TITLE###']
-                                       );
-
-                                               // filter out double email addresses
-                                       $emailRecipients = array();
-                                       foreach ($emails as $recip) {
-                                               $emailRecipients[$recip['email']] = $recip['email'];
-                                       }
-                                       $emailRecipients = implode(',', $emailRecipients);
+                                       // send an email to each individual user, to ensure the
+                                       // multilanguage version of the email
+                               $emailHeaders = $emailConfig['additionalHeaders'];
+                               $emailRecipients = array();
 
-                                               // Send one email to everybody
-                                       t3lib_div::plainMailEncoded(
-                                               $emailRecipients,
-                                               $emailSubject,
-                                               $emailMessage
-                                       );
-                               } else {
-                                               // send an email to each individual user, to ensure the
-                                               // multilanguage version of the email
-
-                                       $emailHeaders = $emailConfig['additionalHeaders'];
-                                       $emailRecipients = array();
-
-                                               // an array of language objects that are needed
-                                               // for emails with different languages
-                                       $languageObjects = array(
-                                               $GLOBALS['LANG']->lang => $GLOBALS['LANG']
-                                       );
+                                       // an array of language objects that are needed
+                                       // for emails with different languages
+                               $languageObjects = array(
+                                       $GLOBALS['LANG']->lang => $GLOBALS['LANG']
+                               );
 
-                                               // loop through each recipient and send the email
-                                       foreach ($emails as $recipientData) {
-                                                       // don't send an email twice
-                                               if (isset($emailRecipients[$recipientData['email']])) {
-                                                       continue;
+                                       // loop through each recipient and send the email
+                               foreach ($emails as $recipientData) {
+                                               // don't send an email twice
+                                       if (isset($emailRecipients[$recipientData['email']])) {
+                                               continue;
+                                       }
+                                       $emailSubject = $emailConfig['subject'];
+                                       $emailMessage = $emailConfig['message'];
+                                       $emailRecipients[$recipientData['email']] = $recipientData['email'];
+
+                                               // check if the email needs to be localized
+                                               // in the users' language
+                                       if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:') || t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
+                                               $recipientLanguage = ($recipientData['lang'] ? $recipientData['lang'] : 'default');
+                                               if (!isset($languageObjects[$recipientLanguage])) {
+                                                               // a LANG object in this language hasn't been
+                                                               // instantiated yet, so this is done here
+                                                       /** @var $languageObject language */
+                                                       $languageObject = t3lib_div::makeInstance('language');
+                                                       $languageObject->init($recipientLanguage);
+                                                       $languageObjects[$recipientLanguage] = $languageObject;
+                                               } else {
+                                                       $languageObject = $languageObjects[$recipientLanguage];
                                                }
-                                               $emailSubject = $emailConfig['subject'];
-                                               $emailMessage = $emailConfig['message'];
-                                               $emailRecipients[$recipientData['email']] = $recipientData['email'];
-
-                                                       // check if the email needs to be localized
-                                                       // in the users' language
-                                               if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:') || t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
-                                                       $recipientLanguage = ($recipientData['lang'] ? $recipientData['lang'] : 'default');
-                                                       if (!isset($languageObjects[$recipientLanguage])) {
-                                                                       // a LANG object in this language hasn't been
-                                                                       // instantiated yet, so this is done here
-                                                               /** @var $languageObject language */
-                                                               $languageObject = t3lib_div::makeInstance('language');
-                                                               $languageObject->init($recipientLanguage);
-                                                               $languageObjects[$recipientLanguage] = $languageObject;
-                                                       } else {
-                                                               $languageObject = $languageObjects[$recipientLanguage];
-                                                       }
 
-                                                       if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:')) {
-                                                               $emailSubject = $languageObject->sL($emailSubject);
-                                                       }
-
-                                                       if (t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
-                                                               $emailMessage = $languageObject->sL($emailMessage);
-                                                       }
+                                               if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:')) {
+                                                       $emailSubject = $languageObject->sL($emailSubject);
                                                }
 
-                                               $emailSubject = t3lib_parseHtml::substituteMarkerArray($emailSubject, $markers, '', TRUE, TRUE);
-                                               $emailMessage = t3lib_parseHtml::substituteMarkerArray($emailMessage, $markers, '', TRUE, TRUE);
-                                                       // Send an email to the recipient
-                                               t3lib_div::plainMailEncoded(
-                                                       $recipientData['email'],
-                                                       $emailSubject,
-                                                       $emailMessage,
-                                                       $emailHeaders
-                                               );
+                                               if (t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
+                                                       $emailMessage = $languageObject->sL($emailMessage);
+                                               }
                                        }
-                                       $emailRecipients = implode(',', $emailRecipients);
+
+                                       $emailSubject = t3lib_parseHtml::substituteMarkerArray($emailSubject, $markers, '', TRUE, TRUE);
+                                       $emailMessage = t3lib_parseHtml::substituteMarkerArray($emailMessage, $markers, '', TRUE, TRUE);
+                                               // Send an email to the recipient
+                                       t3lib_div::plainMailEncoded(
+                                               $recipientData['email'],
+                                               $emailSubject,
+                                               $emailMessage,
+                                               $emailHeaders
+                                       );
                                }
+                               $emailRecipients = implode(',', $emailRecipients);
                                $tcemainObj->newlog2('Notification email for stage change was sent to "' . $emailRecipients . '"', $table, $id);
                        }
                }
index b84f369..7eb32ed 100755 (executable)
@@ -522,11 +522,6 @@ class tx_version_cm1 extends t3lib_SCbase {
 
                        <form action="'.$this->doc->backPath.'tce_db.php" method="post">
                        ' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" /><br />
-                       '.(($this->table == 'pages' && $GLOBALS['TYPO3_CONF_VARS']['BE']['elementVersioningOnly'] == FALSE)? '<select name="cmd['.$this->table.']['.$this->uid.'][version][treeLevels]">
-                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0) ? '<option value="0">' . $GLOBALS['LANG']->getLL('cmdPid0') . '</option>' : '').'
-                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(1) ? '<option value="100">' . $GLOBALS['LANG']->getLL('cmdPid100') . '</option>' : '').'
-                               '.($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(-1) ? '<option value="-1">' . $GLOBALS['LANG']->getLL('cmdPid1') . '</option>' : '').'
-                       </select>' : '').'
                        <br /><input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
                        <input type="hidden" name="prErr" value="1" />
                        <input type="hidden" name="redirect" value="'.htmlspecialchars($this->REQUEST_URI).'" />
index d675d50..2436728 100755 (executable)
@@ -160,17 +160,6 @@ class wslib {
         ****************************/
 
        /**
-        * Main function to call from cli-script
-        *
-        * @return      void
-        * @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - This was meant for an obsolete CLI script. You shouldn't be calling this.
-        */
-       function CLI_main()     {
-               t3lib_div::logDeprecatedFunction();
-               $this->autoPublishWorkspaces();
-       }
-
-       /**
         * This method is called by the Scheduler task that triggers
         * the autopublication process
         * It searches for workspaces whose publication date is in the past