当前位置: 首页>>代码示例>>PHP>>正文


PHP t3lib_div::deprecationLog方法代码示例

本文整理汇总了PHP中t3lib_div::deprecationLog方法的典型用法代码示例。如果您正苦于以下问题:PHP t3lib_div::deprecationLog方法的具体用法?PHP t3lib_div::deprecationLog怎么用?PHP t3lib_div::deprecationLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在t3lib_div的用法示例。


在下文中一共展示了t3lib_div::deprecationLog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: notifyStageChange


//.........这里部分代码省略.........
                        $emails = $this->getEmailsForStageChangeNotification($workspaceRec['adminusers'], TRUE);
                        $emails = t3lib_div::array_merge($emails, $this->getEmailsForStageChangeNotification($workspaceRec['reviewers']));
                        $emails = t3lib_div::array_merge($emails, $this->getEmailsForStageChangeNotification($workspaceRec['members']));
                        break;
                }
            } else {
                $emails = array();
                foreach ($notificationAlternativeRecipients as $emailAddress) {
                    $emails[] = array('email' => $emailAddress);
                }
            }
            // prepare and then send the emails
            if (count($emails)) {
                // Path to record is found:
                list($elementTable, $elementUid) = explode(':', $elementName);
                $elementUid = intval($elementUid);
                $elementRecord = t3lib_BEfunc::getRecord($elementTable, $elementUid);
                $recordTitle = t3lib_BEfunc::getRecordTitle($elementTable, $elementRecord);
                if ($elementTable == 'pages') {
                    $pageUid = $elementUid;
                } else {
                    t3lib_BEfunc::fixVersioningPid($elementTable, $elementRecord);
                    $pageUid = $elementUid = $elementRecord['pid'];
                }
                // fetch the TSconfig settings for the email
                // 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
                $pageTsConfig = t3lib_BEfunc::getPagesTSconfig($pageUid);
                $emailConfig = $pageTsConfig['tx_version.']['workspaces.']['stageNotificationEmail.'];
                $markers = array('###RECORD_TITLE###' => $recordTitle, '###RECORD_PATH###' => t3lib_BEfunc::getRecordPath($elementUid, '', 20), '###SITE_NAME###' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'], '###SITE_URL###' => t3lib_div::getIndpEnv('TYPO3_SITE_URL') . TYPO3_mainDir, '###WORKSPACE_TITLE###' => $workspaceRec['title'], '###WORKSPACE_UID###' => $workspaceRec['uid'], '###ELEMENT_NAME###' => $elementName, '###NEXT_STAGE###' => $newStage, '###COMMENT###' => $comment, '###USER_REALNAME###' => $tcemainObj->BE_USER->user['realName'], '###USER_USERNAME###' => $tcemainObj->BE_USER->user['username']);
                // 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 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']);
                    // 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];
                            }
                            if (t3lib_div::isFirstPartOfStr($emailSubject, 'LLL:')) {
                                $emailSubject = $languageObject->sL($emailSubject);
                            }
                            if (t3lib_div::isFirstPartOfStr($emailMessage, 'LLL:')) {
                                $emailMessage = $languageObject->sL($emailMessage);
                            }
                        }
                        $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);
            }
        }
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:101,代码来源:class.tx_version_tcemain.php

示例2: render

 /**
  * Render content with htmlspecialchars
  *
  * @return string Formatted date
  * @deprecated Use Tx_Fluid_ViewHelpers_Format_HtmlspecialcharsViewHelper instead
  */
 public function render()
 {
     if (class_exists('Tx_Fluid_ViewHelpers_Format_HtmlspecialcharsViewHelper')) {
         $message = 'EXT:news: Since TYPO3 4.6.0, a native ViewHelper for htmlspecialchars() ' . 'is available, use f:format.htmlspecialchars instead of n:format.hsc';
         t3lib_div::deprecationLog($message);
     }
     return htmlspecialchars($this->renderChildren());
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:14,代码来源:HscViewHelper.php

示例3: initializeDeprecatedHooks

 /**
  * Initializes deprectated hooks that existed in t3lib_matchCondition until TYPO3 4.3.
  *
  * @return	void
  */
 protected function initializeDeprecatedHooks()
 {
     // Hook: $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_matchcondition.php']['matchConditionClass']:
     $matchConditionHooks =& $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_matchcondition.php']['matchConditionClass'];
     if (is_array($matchConditionHooks)) {
         t3lib_div::deprecationLog('The hook $TYPO3_CONF_VARS[SC_OPTIONS][t3lib/class.t3lib_matchcondition.php][matchConditionClass] ' . 'is deprecated since TYPO3 4.3. Use the new hooks getBrowserInfo and getDeviceType in ' . 't3lib_utility_Client instead.');
         foreach ($matchConditionHooks as $hookClass) {
             $this->deprecatedHooks[] = t3lib_div::getUserObj($hookClass, '');
         }
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:16,代码来源:class.t3lib_matchcondition_frontend.php

示例4: mail

    /**
     * Proxy for the PHP mail() function. Adds possibility to hook in and send the mails in a different way.
     * The hook can be used by adding function to the configuration array:
     * $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery']
     *
     * @param	string		Email address to send to.
     * @param	string		Subject line, non-encoded. (see PHP function mail())
     * @param	string		Message content, non-encoded. (see PHP function mail())
     * @param	string		 Additional headers for the mail (see PHP function mail())
     * @param	string		Additional flags for the sending mail tool (see PHP function mail())
     * @return	boolean		Indicates whether the mail has been sent or not
     * @see		PHP function mail() []
     * @link	http://www.php.net/manual/en/function.mail.php
     */
    public static function mail($to, $subject, $messageBody, $additionalHeaders = NULL, $additionalParameters = NULL)
    {
        $success = TRUE;
        // If the mail does not have a From: header, fall back to the default in TYPO3_CONF_VARS.
        if (!preg_match('/^From:/im', $additionalHeaders) && $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']) {
            if (!is_null($additionalHeaders) && substr($additionalHeaders, -1) != LF) {
                $additionalHeaders .= LF;
            }
            if ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']) {
                $additionalHeaders .= 'From: "' . $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] . '" <' . $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] . '>';
            } else {
                $additionalHeaders .= 'From: ' . $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'];
            }
        }
        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'])) {
            $parameters = array('to' => $to, 'subject' => $subject, 'messageBody' => $messageBody, 'additionalHeaders' => $additionalHeaders, 'additionalParameters' => $additionalParameters);
            $fakeThis = FALSE;
            foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] as $hookSubscriber) {
                $hookSubscriberContainsArrow = strpos($hookSubscriber, '->');
                if ($hookSubscriberContainsArrow !== FALSE) {
                    // deprecated, remove in TYPO3 4.7
                    t3lib_div::deprecationLog('The usage of user function notation for the substituteMailDelivery hook is deprecated,
						use the t3lib_mail_MailerAdapter interface instead.');
                    $success = $success && t3lib_div::callUserFunction($hookSubscriber, $parameters, $fakeThis);
                } else {
                    $mailerAdapter = t3lib_div::makeInstance($hookSubscriber);
                    if ($mailerAdapter instanceof t3lib_mail_MailerAdapter) {
                        $success = $success && $mailerAdapter->mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters, $fakeThis);
                    } else {
                        throw new RuntimeException($hookSubscriber . ' is not an implementation of t3lib_mail_MailerAdapter,
							but must implement that interface to be used in the substituteMailDelivery hook.', 1294062286);
                    }
                }
            }
        } else {
            if (t3lib_utility_PhpOptions::isSafeModeEnabled() && !is_null($additionalParameters)) {
                $additionalParameters = null;
            }
            if (is_null($additionalParameters)) {
                $success = @mail($to, $subject, $messageBody, $additionalHeaders);
            } else {
                $success = @mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
            }
        }
        if (!$success) {
            t3lib_div::sysLog('Mail to "' . $to . '" could not be sent (Subject: "' . $subject . '").', 'Core', 3);
        }
        return $success;
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:63,代码来源:class.t3lib_utility_mail.php

示例5: render

 /**
  * Converts all HTML entities to their applicable characters as needed
  * using PHPs html_entity_decode() function.
  *
  * @param string $value string to format
  * @param boolean $keepQuotes if TRUE, single and double quotes won't be replaced
  * @return string the altered string
  * @see http://www.php.net/html_entity_decode
  */
 public function render($value = NULL, $keepQuotes = FALSE)
 {
     if (class_exists('Tx_Fluid_ViewHelpers_Format_HtmlentitiesDecodeViewHelper')) {
         $message = 'EXT:news: Since TYPO3 4.6.0, a native ViewHelper for html_entity_decode() ' . 'is available, use f:format.htmlentitiesDecode instead of n:format.htmlEntityDecode';
         t3lib_div::deprecationLog($message);
     }
     if ($value === NULL) {
         $value = $this->renderChildren();
     }
     if (!is_string($value)) {
         return $value;
     }
     $flags = $keepQuotes ? ENT_NOQUOTES : ENT_COMPAT;
     return html_entity_decode($value, $flags);
 }
开发者ID:rafu1987,项目名称:t3bootstrap-project,代码行数:24,代码来源:HtmlentitiesDecodeViewHelper.php

示例6:

 *
 *
 *
 *   73: class SC_alt_menu_sel
 *   81:     function main()
 *  108:     function printContent()
 *
 * TOTAL FUNCTIONS: 2
 * (This index is automatically created/updated by the extension "extdeveval")
 *
 * @deprecated since TYPO3 4.5, this file will be removed in TYPO3 4.7. The TYPO3 backend is using typo3/backend.php with less frames, which makes this file obsolete.
 */
require 'init.php';
require 'template.php';
require_once 'class.alt_menu_functions.inc';
t3lib_div::deprecationLog('alt_menu_sel.php is deprecated since TYPO3 4.5, this file will be removed in TYPO3 4.7. The TYPO3 backend is using typo3/backend.php with less frames, which makes this file obsolete.');
/**
 * Script Class for rendering the selector box menu
 *
 * @author	Kasper Skårhøj <kasperYYYY@typo3.com>
 * @package TYPO3
 * @subpackage core
 */
class SC_alt_menu_sel
{
    var $content;
    /**
     * Main function, making the selector box menu
     *
     * @return	void
     */
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:alt_menu_sel.php

示例7: triggerField

        }
        #debug(array($dirRTE,$value),'OUT: '.$dirRTE);
        return $value;
    }
    /***********************************
     *
     * Helper functions
     *
     **********************************/
    /**
     * Trigger field - this field tells the TCEmain that processing should be done on this value!
     *
     * @param	string		Field name of the RTE field.
     * @return	string		<input> field of type "hidden" with a flag telling the TCEmain that this fields content should be traansformed back to database state.
     */
    function triggerField($fieldName)
    {
        $triggerFieldName = preg_replace('/\\[([^]]+)\\]$/', '[_TRANSFORM_\\1]', $fieldName);
        return '<input type="hidden" name="' . htmlspecialchars($triggerFieldName) . '" value="RTE" />';
    }
}
/**
 * @deprecated since TYPO3 4.4: Use XCLASS t3lib/class.t3lib_rteapi.php instead. Will be removed in TYPO3 4.6.
 */
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rte/class.tx_rte_base.php']) {
    t3lib_div::deprecationLog('XCLASS "ext/rte/class.tx_rte_base.php" is deprecated since TYPO3 4.4 - use "t3lib/class.t3lib_rteapi.php" instead.');
    include_once $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rte/class.tx_rte_base.php'];
}
if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_rteapi.php']) {
    include_once $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_rteapi.php'];
}
开发者ID:zsolt-molnar,项目名称:TYPO3-4.5-trunk,代码行数:31,代码来源:class.t3lib_rteapi.php

示例8: getTstamp

 /**
  * Returns the timestamp for the value parts in $this->values.
  *
  * @deprecated since 4.5
  * @return integer unix timestamp
  */
 public function getTstamp()
 {
     t3lib_div::deprecationLog('The method is deprecated since TYPO3 version 4.5.');
     return $this->getTimestamp();
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:11,代码来源:class.tx_scheduler_croncmd.php

示例9: __get

 /**
  * Allow access to other tslib_content variables.
  *
  * Provides backwards compatibility for PHP_SCRIPT which simply
  * accesses properties like $this->parameters.
  *
  * @deprecated since 4.5, will be removed in 4.7. Use $this->cObj-><property> instead.
  *
  * @param string $name The name of the property
  * @return mixed
  */
 public function __get($name)
 {
     if (array_key_exists($name, get_object_vars($this->cObj))) {
         $trail = debug_backtrace();
         $location = $trail[1]['file'] . '#' . $trail[1]['line'];
         t3lib_div::deprecationLog(sprintf('%s: PHP_SCRIPT accessed $this->%s. Modify it to access $this->cObj->%s instead. Will be removed in 4.7.', $location, $name, $name));
         return $this->cObj->{$name};
     }
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:20,代码来源:class.tslib_content_phpscript.php

示例10: getTemplateSource

 /**
  * Resolve the template path and filename for the given action. If $actionName
  * is NULL, looks into the current request.
  *
  * @param string $actionName Name of the action. If NULL, will be taken from request.
  * @return string Full path to template
  * @throws Tx_Fluid_View_Exception_InvalidTemplateResourceException
  * @author Sebastian Kurfürst <sebastian@typo3.org>
  */
 protected function getTemplateSource($actionName = NULL)
 {
     if ($this->templatePathAndFilename !== NULL) {
         $templatePathAndFilename = $this->templatePathAndFilename;
     } else {
         $actionName = $actionName !== NULL ? $actionName : $this->controllerContext->getRequest()->getControllerActionName();
         $paths = $this->expandGenericPathPattern($this->templatePathAndFilenamePattern, FALSE, FALSE);
         $found = FALSE;
         foreach ($paths as &$templatePathAndFilename) {
             // These tokens are replaced by the Backporter for the graceful fallback in version 4.
             $fallbackPath = str_replace('@action', $actionName, $templatePathAndFilename);
             $templatePathAndFilename = str_replace('@action', ucfirst($actionName), $templatePathAndFilename);
             if (file_exists($templatePathAndFilename)) {
                 $found = TRUE;
                 // additional check for deprecated template filename for case insensitive file systems (Windows)
                 $realFileName = basename(realpath($templatePathAndFilename));
                 if ($realFileName !== ucfirst($realFileName)) {
                     t3lib_div::deprecationLog('the template filename "' . t3lib_div::fixWindowsFilePath(realpath($templatePathAndFilename)) . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "' . basename($templatePathAndFilename) . '"');
                 }
                 break;
             } elseif (file_exists($fallbackPath)) {
                 t3lib_div::deprecationLog('the template filename "' . $fallbackPath . '" is lowercase. This is deprecated since TYPO3 4.4. Please rename the template to "' . basename($templatePathAndFilename) . '"');
                 $found = TRUE;
                 $templatePathAndFilename = $fallbackPath;
                 break;
             }
         }
         if (!$found) {
             throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('Template could not be loaded. I tried "' . implode('", "', $paths) . '"', 1225709595);
         }
     }
     $templateSource = file_get_contents($templatePathAndFilename);
     if ($templateSource === FALSE) {
         throw new Tx_Fluid_View_Exception_InvalidTemplateResourceException('"' . $templatePathAndFilename . '" is not a valid template resource URI.', 1257246929);
     }
     return $templateSource;
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:46,代码来源:TemplateView.php

示例11: storeData

 /**
  * This method stores the imported data in the database
  * New data is inserted, existing data is updated and absent data is deleted
  *
  * @param	array		$records: records containing the data
  * @return	void
  */
 protected function storeData($records)
 {
     if ($this->extConf['debug'] || TYPO3_DLOG) {
         t3lib_div::devLog('Data received for storage', $this->extKey, 0, $records);
     }
     // Initialize some variables
     $fieldsExcludedFromInserts = array();
     $fieldsExcludedFromUpdates = array();
     // Get the list of existing uids for the table
     $existingUids = $this->getExistingUids();
     // Check which columns are MM-relations and get mappings to foreign tables for each
     // NOTE: as it is now, it is assumed that the imported data is denormalised
     //
     // NOTE2:	as long as we're looping on all columns, we assemble the list
     //			of fields that are excluded from insert or update operations
     //
     // There's more to do than that:
     //
     // 1.	a sorting field may have been defined, but TCEmain assumes the MM-relations are in the right order
     //		and inserts its own number for the table's sorting field. So MM-relations must be sorted before executing TCEmain.
     // 2.a	it is possible to store additional fields in the MM-relations. This is not TYPO3-standard, so TCEmain will
     //		not be able to handle it. We thus need to store all that data now and rework the MM-relations when TCEmain is done.
     // 2.b	if a pair of records is related to each other several times (because the additional fields vary), this will be filtered out
     //		by TCEmain. So we must preserve also these additional relations.
     $mappings = array();
     $fullMappings = array();
     foreach ($this->tableTCA['columns'] as $columnName => $columnData) {
         // Check if some fields are excluded from some operations
         // and add them to the relevant list
         if (isset($columnData['external'][$this->columnIndex]['disabledOperations'])) {
             if (t3lib_div::inList($columnData['external'][$this->columnIndex]['disabledOperations'], 'insert')) {
                 $fieldsExcludedFromInserts[] = $columnName;
             }
             if (t3lib_div::inList($columnData['external'][$this->columnIndex]['disabledOperations'], 'update')) {
                 $fieldsExcludedFromUpdates[] = $columnName;
             }
         }
         // The "excludedOperations" property is deprecated and replaced by "disabledOperations"
         // It is currently kept for backwards-compatibility reasons
         // TODO: remove in next major version
         if (isset($columnData['external'][$this->columnIndex]['excludedOperations'])) {
             $deprecationMessage = 'Property "excludedOperations" has been deprecated. Please use "disabledOperations" instead.';
             $deprecationMessage .= LF . 'Support for "excludedOperations" will be removed in external_import version 3.0.';
             t3lib_div::deprecationLog($deprecationMessage);
             if (t3lib_div::inList($columnData['external'][$this->columnIndex]['excludedOperations'], 'insert')) {
                 $fieldsExcludedFromInserts[] = $columnName;
             }
             if (t3lib_div::inList($columnData['external'][$this->columnIndex]['excludedOperations'], 'update')) {
                 $fieldsExcludedFromUpdates[] = $columnName;
             }
         }
         // Process MM-relations, if any
         if (isset($columnData['external'][$this->columnIndex]['MM'])) {
             $mmData = $columnData['external'][$this->columnIndex]['MM'];
             $sortingField = isset($mmData['sorting']) ? $mmData['sorting'] : FALSE;
             $additionalFields = isset($mmData['additional_fields']) ? $mmData['additional_fields'] : FALSE;
             $mappings[$columnName] = array();
             if ($additionalFields || $mmData['multiple']) {
                 $fullMappings[$columnName] = array();
             }
             // Get foreign mapping for column
             // TODO: remove in next major version
             if (isset($mmData['mappings']['uid_foreign'])) {
                 $deprecationMessage = 'Property "mappings.uid_foreign" has been deprecated. Please use "mapping" instead.';
                 $deprecationMessage .= LF . 'Support for "mappings.uid_foreign" will be removed in external_import version 3.0.';
                 t3lib_div::deprecationLog($deprecationMessage);
                 $mappingInformation = $mmData['mappings']['uid_foreign'];
             } else {
                 $mappingInformation = $mmData['mapping'];
             }
             $foreignMappings = $this->getMapping($mappingInformation);
             // Go through each record and assemble pairs of primary and foreign keys
             foreach ($records as $theRecord) {
                 $externalUid = $theRecord[$this->externalConfig['reference_uid']];
                 // Make sure not to keep the value from the previous iteration
                 unset($foreignValue);
                 // Get foreign value
                 // First try the "soft" matching method to mapping table
                 if (!empty($mmData['mapping']['match_method'])) {
                     if ($mmData['mapping']['match_method'] == 'strpos' || $mmData['mapping']['match_method'] == 'stripos') {
                         // Try matching the value. If matching fails, unset it.
                         try {
                             $foreignValue = $this->matchSingleField($theRecord[$columnName], $mmData['mapping'], $foreignMappings);
                         } catch (Exception $e) {
                             // Nothing to do, foreign value must stay "unset"
                         }
                     }
                     // Then the "strict" matching method to mapping table
                 } elseif (isset($foreignMappings[$theRecord[$columnName]])) {
                     $foreignValue = $foreignMappings[$theRecord[$columnName]];
                 }
                 // If a value was found, use it
                 if (isset($foreignValue)) {
//.........这里部分代码省略.........
开发者ID:portrino,项目名称:ExternalImport,代码行数:101,代码来源:class.tx_externalimport_importer.php

示例12: __construct

 /**
  * Constructor
  *
  * @author Bastian Waidelich <bastian@typo3.org>
  */
 public function __construct()
 {
     t3lib_div::deprecationLog('the ViewHelper "' . get_class($this) . '" extends "Tx_Fluid_Core_ViewHelper_TagBasedViewHelper". This is deprecated since TYPO3 4.5. Please extend the class "Tx_Fluid_Core_ViewHelper_AbstractTagBasedViewHelper"');
     parent::__construct();
 }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:10,代码来源:TagBasedViewHelper.php

示例13: workspaceAllowAutoCreation

 /**
  * Evaluates if auto creation of a version of a record is allowed.
  *
  * @param string $table Table of the record
  * @param integer $id UID of record
  * @param integer $recpid PID of record
  * @return boolean TRUE if ok.
  * @todo Define visibility
  */
 public function workspaceAllowAutoCreation($table, $id, $recpid)
 {
     // Auto-creation of version: In offline workspace, test if versioning is
     // enabled and look for workspace version of input record.
     // If there is no versionized record found we will create one and save to that.
     if ($this->workspace !== 0 && !$this->workspaceRec['disable_autocreate'] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $recpid >= 0 && !t3lib_BEfunc::getWorkspaceVersionOfRecord($this->workspace, $table, $id, 'uid')) {
         // There must be no existing version of this record in workspace.
         return TRUE;
     } elseif ($this->workspaceRec['disable_autocreate']) {
         t3lib_div::deprecationLog('Usage of disable_autocreate feature is deprecated since 4.5.');
     }
 }
开发者ID:nicksergio,项目名称:TYPO3v4-Core,代码行数:21,代码来源:class.t3lib_userauthgroup.php

示例14: handlePageEditing

    /**
     * Checking if the "&edit" variable was sent so we can open it for editing the page.
     * Code based on code from "alt_shortcut.php"
     *
     * @return	void
     */
    protected function handlePageEditing()
    {
        if (!t3lib_extMgm::isLoaded('cms')) {
            return;
        }
        // EDIT page:
        $editId = preg_replace('/[^[:alnum:]_]/', '', t3lib_div::_GET('edit'));
        $editRecord = '';
        if ($editId) {
            // Looking up the page to edit, checking permissions:
            $where = ' AND (' . $GLOBALS['BE_USER']->getPagePermsClause(2) . ' OR ' . $GLOBALS['BE_USER']->getPagePermsClause(16) . ')';
            if (t3lib_div::testInt($editId)) {
                $editRecord = t3lib_BEfunc::getRecordWSOL('pages', $editId, '*', $where);
            } else {
                $records = t3lib_BEfunc::getRecordsByField('pages', 'alias', $editId, $where);
                if (is_array($records)) {
                    reset($records);
                    $editRecord = current($records);
                    t3lib_BEfunc::workspaceOL('pages', $editRecord);
                }
            }
            // If the page was accessible, then let the user edit it.
            if (is_array($editRecord) && $GLOBALS['BE_USER']->isInWebMount($editRecord['uid'])) {
                // Setting JS code to open editing:
                $this->js .= '
		// Load page to edit:
	window.setTimeout("top.loadEditId(' . intval($editRecord['uid']) . ');", 500);
			';
                // "Shortcuts" have been renamed to "Bookmarks"
                // @deprecated remove shortcuts code in TYPO3 4.7
                $shortcutSetPageTree = $GLOBALS['BE_USER']->getTSConfigVal('options.shortcut_onEditId_dontSetPageTree');
                $bookmarkSetPageTree = $GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_dontSetPageTree');
                if ($shortcutSetPageTree !== '') {
                    t3lib_div::deprecationLog('options.shortcut_onEditId_dontSetPageTree - since TYPO3 4.5, will be removed in TYPO3 4.7 - use options.bookmark_onEditId_dontSetPageTree instead');
                }
                // Checking page edit parameter:
                if (!$shortcutSetPageTree && !$bookmarkSetPageTree) {
                    $shortcutKeepExpanded = $GLOBALS['BE_USER']->getTSConfigVal('options.shortcut_onEditId_keepExistingExpanded');
                    $bookmarkKeepExpanded = $GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_keepExistingExpanded');
                    $keepExpanded = $shortcutKeepExpanded || $bookmarkKeepExpanded;
                    // Expanding page tree:
                    t3lib_BEfunc::openPageTree(intval($editRecord['pid']), !$keepExpanded);
                    if ($shortcutKeepExpanded) {
                        t3lib_div::deprecationLog('options.shortcut_onEditId_keepExistingExpanded - since TYPO3 4.5, will be removed in TYPO3 4.7 - use options.bookmark_onEditId_keepExistingExpanded instead');
                    }
                }
            } else {
                $this->js .= '
		// Warning about page editing:
	alert(' . $GLOBALS['LANG']->JScharCode(sprintf($GLOBALS['LANG']->getLL('noEditPage'), $editId)) . ');
			';
            }
        }
    }
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:60,代码来源:backend.php

示例15: array

*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*  A copy is found in the textfile GPL.txt and important notices to the license
*  from the author is found in LICENSE.txt distributed with these scripts.
*
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
 * This is a wrapper file for direct calls to list module.
 * It's deprecated since 4.5, use proper link generation.
 *
 * @author	Steffen Kamper <steffen@typo3.com>
 * @deprecated
 *
 */
require 'init.php';
$query = t3lib_div::getIndpEnv('QUERY_STRING');
t3lib_div::deprecationLog('The list module is a system extension now, do not link to this file.' . LF . 'Referer: ' . t3lib_div::getIndpEnv('HTTP_REFERER'));
if (t3lib_extMgm::isLoaded('recordlist')) {
    t3lib_utility_Http::redirect(t3lib_BEfunc::getModuleUrl('web_list', array(), '', TRUE) . '&' . $query);
} else {
    $title = sprintf($GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:extension.not.installed'), 'list');
    $message = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:link.to.dblist.correctly');
    throw new RuntimeException($title . ': ' . $message);
}
开发者ID:NaveedWebdeveloper,项目名称:Test,代码行数:31,代码来源:db_list.php


注:本文中的t3lib_div::deprecationLog方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。