示例#1
0
    /**
     * Creates the HTML content for the palette
     * (Horizontally, for display in the top frame)
     * (Used if GET var "backRef" IS set)
     *
     * @deprecated since TYPO3 4.3, will be removed in TYPO3 4.6
     * @param	array		Array of information from which the fields are built.
     * @return	string		HTML output
     */
    function printPalette($palArr)
    {
        t3lib_div::logDeprecatedFunction();
        $out = '';
        // For each element on the palette, write a few table cells with the field name, content and control images:
        foreach ($palArr as $content) {
            $iRow[] = '
				<td>' . '<img name="req_' . $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'] . '" class="c-reqIcon" src="clear.gif" width="10" height="10" alt="" />' . '<img name="cm_' . $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'] . '" class="c-cmIcon" src="clear.gif" width="7" height="10" alt="" />' . '</td>
				<td class="c-label">' . $content['NAME'] . '&nbsp;' . '</td>
				<td class="c-csh">' . $content['ITEM'] . $content['HELP_ICON'] . '</td>';
        }
        // Finally, wrap it all in a table:
        $out = '



			<!--
				TCEforms palette, rendered in top frame.
			-->
			<table border="0" cellpadding="0" cellspacing="0" id="typo3-TCEforms-palette">
				<tr>
					<td class="c-close">' . '<a href="#" onclick="closePal();return false;">' . t3lib_iconWorks::getSpriteIcon('actions-document-close', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.close', TRUE))) . '</a>' . '</td>' . implode('', $iRow) . '
				</tr>
			</table>

			';
        // Return the result:
        return $out;
    }
示例#2
0
 /**
  * Retrieves the singleton instance of the factory.
  *
  * @deprecated 2014-08-28 Use t3lib_div::makeInstance instead
  *
  * @return Tx_Oelib_MailerFactory the singleton factory
  */
 public static function getInstance()
 {
     t3lib_div::logDeprecatedFunction();
     /** @var Tx_Oelib_MailerFactory $mailerFactory */
     $mailerFactory = t3lib_div::makeInstance('Tx_Oelib_MailerFactory');
     return $mailerFactory;
 }
示例#3
0
 /**
  * Returns a fresh or existing instance of the object specified by $objectName.
  *
  * Important:
  *
  * If possible, instances of Prototype objects should always be created with the
  * Object Factory's create() method and Singleton objects should rather be
  * injected by some type of Dependency Injection.
  *
  * @param string $objectName The name of the object to return an instance of
  * @return object The object instance
  * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Please use Tx_Extbase_Object_ObjectManager instead
  */
 public function getObject($objectName)
 {
     t3lib_div::logDeprecatedFunction();
     $arguments = array_slice(func_get_args(), 1);
     if (in_array('t3lib_Singleton', class_implements($objectName))) {
         $object = $this->get($objectName, $arguments);
     } else {
         $object = $this->create($objectName, $arguments);
     }
     return $object;
 }
示例#4
0
 /**
  * Frontend hook: If the page is not being re-generated this is our chance to force it to be (because re-generation of the page is required in order to have the indexer called!)
  *
  * @param	array		Parameters from frontend
  * @param	object		TSFE object (reference under PHP5)
  * @return	void
  * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.6, the method was extracted to hooks/class.tx_indexedsearch_tslib_fe_hook.php
  */
 function fe_headerNoCache(&$params, $ref)
 {
     t3lib_div::logDeprecatedFunction();
     require_once t3lib_extMgm::extPath('indexed_search') . 'hooks/class.tx_indexedsearch_tslib_fe_hook.php';
     t3lib_div::makeInstance('tx_indexedsearch_tslib_fe_hook')->headerNoCache($params, $ref);
 }
 /**
  * Returns a part for a WHERE clause (without preceeding operator) which will select records based on the presence of a certain string in a string-list inside the record.
  * Example: If you have a record with a field, "usergroup" and that field might contain a list like "1,2,3" (with no spaces between the values) then you can select all records having eg. "2" in this list by calling this function. This is regardless of whether the number "2" is in the start, end or middle of the list - or the only value at all.
  *
  * @param	string		The field name to look in
  * @param	string		The value to look for.
  * @return	string
  * @deprecated since TYPO3 3.6, will be removed in TYPO3 4.6 - Use $GLOBALS['TYPO3_DB']->listQuery() directly!
  */
 function whereSelectFromList($field, $value)
 {
     t3lib_div::logDeprecatedFunction();
     return $GLOBALS['TYPO3_DB']->listQuery($field, $value, '');
 }
示例#6
0
/**
 * Deprecated fontwrap function. Is just transparent now.
 *
 * @param	string		Input string
 * @return	string		Output string (in the old days this was wrapped in <font> tags)
 * @deprecated since TYPO3 3.6
 */
function fw($str)
{
    t3lib_div::logDeprecatedFunction();
    return $str;
}
 /**
  * Converts a name field
  * Deprecated since TYPO3 4.0
  *
  * @param	string		$name: the name
  * @return	string		the name
  * @deprecated since TYPO3 4.0, will be removed in TYPO3 4.6
  */
 public function convertName($name)
 {
     t3lib_div::logDeprecatedFunction();
     return $name;
 }
示例#8
0
 /**
  * Outputs an empty string. This function is obsolete and kept for the
  * compatibility only.
  *
  * @param	string	$unused	Unused
  * @return	string		HTML output
  * @deprecated since TYPO3 4.3, all the functionality was put in $this->startForm() and $this->addFields_hidden
  */
 function getHiddenFields($unused = '')
 {
     t3lib_div::logDeprecatedFunction();
     return '';
 }
 /**
  * Start creation of result list
  *
  * @param string $content
  * @param array $items
  * @param tx_mklib_mod1_decorator_Base $decorator
  * @param tx_mklib_mod1_searcher_Base $callingClass
  * @param bool $bAddMiscColumns
  * @deprecated tx_mklib_mod1_searcher_abstractBase nutzen
  */
 public static function showItems(&$content, $items, tx_mklib_mod1_decorator_Base $decorator, tx_mklib_mod1_searcher_Base $callingClass, $columns, $bAddMiscColumns = true)
 {
     t3lib_div::logDeprecatedFunction();
     $funcId = $callingClass->getFuncId();
     //allgmeine Spalten hinzufügen
     if ($bAddMiscColumns) {
         self::addMiscColumns($columns, $decorator);
     }
     if ($items) {
         tx_rnbase::load('tx_rnbase_mod_Tables');
         $arr = tx_rnbase_mod_Tables::prepareTable($items, $columns, $callingClass->getFormTool(), $callingClass->getOptions());
         $out = $callingClass->getModule()->getDoc()->table($arr[0]);
     } else {
         $out = '<p><strong>###LABEL_NO_' . strtoupper($funcId) . '_FOUND###</strong></p><br/>';
     }
     $content .= $out;
 }
示例#10
0
 /**
  * Returns the settings of Extbase
  *
  * @return array The configuration for the Extbase framework
  * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0
  */
 public static function getExtbaseFrameworkConfiguration()
 {
     t3lib_div::logDeprecatedFunction();
     return self::$configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
 }
 /**
  * Seeds the random number engine.
  *
  * @return	void
  * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.5, the random number generator is seeded automatically since PHP 4.2.0
  */
 function make_seed()
 {
     t3lib_div::logDeprecatedFunction();
     list($usec, $sec) = explode(' ', microtime());
     $seedV = (double) $sec + (double) $usec * 100000;
     srand($seedV);
 }
 /**
  * Returns "list of backend modules". Most likely this will be obsolete soon / removed. Don't use.
  * Usage: 0
  *
  * @param	array		Module names in array. Must be "addslashes()"ed
  * @param	string		Perms clause for SQL query
  * @param	string		Backpath
  * @param	string		The URL/script to jump to (used in A tag)
  * @return	array		Two keys, rows and list
  * @internal
  * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.6.
  * @obsolete
  */
 public static function getListOfBackendModules($name, $perms_clause, $backPath = '', $script = 'index.php')
 {
     t3lib_div::logDeprecatedFunction();
     $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'doktype!=255 AND module IN (\'' . implode('\',\'', $name) . '\') AND' . $perms_clause . self::deleteClause('pages'));
     if (!$GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
         return FALSE;
     }
     $out = '';
     $theRows = array();
     while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
         $theRows[] = $row;
         $out .= '<span class="nobr"><a href="' . htmlspecialchars($script . '?id=' . $row['uid']) . '">' . t3lib_iconWorks::getSpriteIconForRecord('pages', $row, array('title' => htmlspecialchars(self::getRecordPath($row['uid'], $perms_clause, 20)))) . htmlspecialchars($row['title']) . '</a></span><br />';
     }
     $GLOBALS['TYPO3_DB']->sql_free_result($res);
     return array('rows' => $theRows, 'list' => $out);
 }
 /**
  * Compatibility stdWrap wrapper.
  *
  * @param	string		$content The content to manipulate using stdWrap functions.
  * @param	array		$conf stdWrap configuration.
  * @deprecated since TYPO3 4.5, this function will be removed in TYPO3 4.7, use $this->cObj->stdWrap() instead.
  */
 public function stdWrap($content = '', $conf = array())
 {
     t3lib_div::logDeprecatedFunction();
     return $this->cObj->stdWrap($content, $conf);
 }
示例#14
0
 /**
  * Returns dynamic tab menu header JS code.
  * This is now incorporated automatically when the function template::getDynTabMenu is called
  * (as long as it is called before $this->startPage())
  * The return value is not needed anymore
  *
  * @deprecated since TYPO3 4.5, as the getDynTabMenu() function includes the function automatically since TYPO3 4.3
  * @return	string		JavaScript section for the HTML header. (return value is deprecated since TYPO3 4.3, will be removed in TYPO3 4.5)
  */
 function getDynTabMenuJScode()
 {
     t3lib_div::logDeprecatedFunction();
     $this->loadJavascriptLib('js/tabmenu.js');
     // return value deprecated since TYPO3 4.3
     return '';
 }
示例#15
0
 /**
  * Gets a list of markers with a given prefix.
  * Example: If the prefix is "WRAPPER" (or "wrapper", case is not relevant),
  * the following array might be returned: ("WRAPPER_FOO", "WRAPPER_BAR")
  *
  * If there are no matches, an empty array is returned.
  *
  * @deprecated 2015-03-01
  *
  * @param string $prefix case-insensitive prefix for the marker names to look for
  *
  * @return string[] matching marker names, might be empty
  */
 public function getPrefixedMarkers($prefix)
 {
     t3lib_div::logDeprecatedFunction();
     $upperCasePrefix = strtoupper($prefix) . '_';
     $result = array();
     foreach ($this->markerNames as $marker) {
         if (strpos($marker, $upperCasePrefix) === 0) {
             $result[] = $marker;
         }
     }
     return $result;
 }
 /**
  * Creates a new GD image resource.
  * Wrapper for imagecreate(truecolor) depended if GD2 is used.
  * This function however got obsolete, as PHP now recommends to use
  * imagecreatetruecolor() only.
  *
  * @param	integer		Width of image
  * @param	integer		Height of image
  * @return	pointer		Image Resource pointer
  * @deprecated since TYPO3 4.4, this function will be removed in TYPO3 4.6.
  */
 function imagecreate($w, $h)
 {
     t3lib_div::logDeprecatedFunction();
     return imagecreatetruecolor($w, $h);
 }
 /**
  * If flag is set and the extensions 'beuser_tracking' is loaded, this will insert a table row with the REQUEST_URI of current script - thus tracking the scripts the backend users uses...
  * This function works ONLY with the "beuser_tracking" extension and is deprecated since it does nothing useful.
  *
  * @param	boolean		Activate insertion of the URL.
  * @return	void
  * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5.
  */
 function trackBeUser($flag)
 {
     t3lib_div::logDeprecatedFunction();
     if ($flag && t3lib_extMgm::isLoaded('beuser_tracking')) {
         $insertFields = array('userid' => intval($this->user['uid']), 'tstamp' => $GLOBALS['EXEC_TIME'], 'script' => t3lib_div::getIndpEnv('REQUEST_URI'));
         $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_trackbeuser', $insertFields);
     }
 }
 /**
  * Returns microtime input to milliseconds
  *
  * @param	string		PHP microtime string
  * @return	integer
  * @deprecated	since TYPO3 4.3, this function will be removed in TYPO3 4.5, use getMilliseconds() instead that expects microtime as float instead of a string
  */
 public function convertMicrotime($microtime)
 {
     t3lib_div::logDeprecatedFunction();
     $parts = explode(' ', $microtime);
     return round(($parts[0] + $parts[1]) * 1000);
 }
 /**
  * sets the default RPC parameter setting.
  * If true, default is that call params are like RPC even for document style
  * Each call() can override this value.
  *
  * This is no longer used.
  *
  * @param    boolean $rpcParams
  * @access public
  * @deprecated since at least TYPO3 4.3, will be removed in TYPO3 4.5.
  */
 function setDefaultRpcParams($rpcParams)
 {
     t3lib_div::logDeprecatedFunction();
     $this->defaultRpcParams = $rpcParams;
 }
 /**
  * freebsd_loadavg() - Gets the max() system load average from uname(1)
  *
  * The max() Load Average will be returned
  *
  * I've been told the code below will work on solaris too, anyone wanna
  * test it?
  *
  * @return	float		Returns the current load average
  * @deprecated since TYPO3 4.3, this function will be removed in TYPO3 4.6, we're using the "ob_gzhandler" for compression now.
  */
 function freebsd_loadavg()
 {
     t3lib_div::logDeprecatedFunction();
     $buffer = `uptime`;
     $load = array();
     preg_match('/averag(es|e): ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]), ([0-9][.][0-9][0-9]*)/', $buffer, $load);
     return max((double) $load[2], (double) $load[3], (double) $load[4]);
 }
示例#21
0
 /**
  * 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();
 }
示例#22
0
 /**
  * Matches against the (internal) uid.
  *
  * @param int $uid The uid to match against
  * @return Tx_Extbase_Persistence_QOM_ComparisonInterface
  * @deprecated since Extbase 1.2.0; was removed in FLOW3; will be removed in Extbase 1.3.0; use equals() instead
  */
 public function withUid($operand)
 {
     t3lib_div::logDeprecatedFunction();
     return $this->qomFactory->comparison($this->qomFactory->propertyValue('uid', $this->getSelectorName()), Tx_Extbase_Persistence_QueryInterface::OPERATOR_EQUAL_TO, $operand);
 }
 /**
  * Writes the extension list to "localconf.php" file
  * Removes the temp_CACHED* files before return.
  *
  * @param	string		List of extensions
  * @return	void
  * @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - Use Tx_Install_Updates_Base::installExtensions() instead
  */
 protected function writeNewExtensionList($newExtList)
 {
     t3lib_div::logDeprecatedFunction();
     // Instance of install tool
     $instObj = new t3lib_install();
     $instObj->allowUpdateLocalConf = 1;
     $instObj->updateIdentity = 'TYPO3 Core Update Manager';
     // Get lines from localconf file
     $lines = $instObj->writeToLocalconf_control();
     $instObj->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'EXT\'][\'extList\']', $newExtList);
     $instObj->writeToLocalconf_control($lines);
     $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = $newExtList;
     t3lib_extMgm::removeCacheFiles();
 }
 /**
  * Includes the PHP script defined for the HMENU special type "userdefined".
  * This script is supposed to populate the array $menuItemsArray with a set of page records comprising the menu.
  * The "userdefined" type is deprecated since "userfunction" has arrived since and is a better choice for many reasons (like using classes/functions for rendering the menu)
  *
  * @param	array		TypoScript parameters for "special.". In particular the property "file" is reserved and specifies the file to include. Seems like any other property can be used freely by the script.
  * @param	string		The sorting field. Can be used from the script in the $incFile.
  * @return	array		An array with the menu items
  * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use HMENU of type "userfunction" instead of "userdefined"
  * @access private
  */
 function includeMakeMenu($conf, $altSortField)
 {
     t3lib_div::logDeprecatedFunction();
     $incFile = $GLOBALS['TSFE']->tmpl->getFileName($conf['file']);
     if ($incFile && $GLOBALS['TSFE']->checkFileInclude($incFile)) {
         include $incFile;
     }
     return is_array($menuItemsArray) ? $menuItemsArray : array();
 }
 /**
  * Includes a locallang-xml file and returns the $LOCAL_LANG array
  * Works only when the frontend or backend has been initialized with a charset conversion object. See first code lines.
  *
  * @param string $fileRef Absolute reference to locallang-XML file
  * @param string $langKey TYPO3 language key, eg. "dk" or "de" or "default"
  * @param string $charset Character set (optional)
  * @return array LOCAL_LANG array in return.
  * @deprecated since TYPO3 4.6, will be removed in TYPO3 4.8 - use t3lib_l10n_parser_Llxml::getParsedData() from now on
  */
 public static function readLLXMLfile($fileRef, $langKey, $charset = '')
 {
     t3lib_div::logDeprecatedFunction();
     if (is_object($GLOBALS['LANG'])) {
         $csConvObj = $GLOBALS['LANG']->csConvObj;
     } elseif (is_object($GLOBALS['TSFE'])) {
         $csConvObj = $GLOBALS['TSFE']->csConvObj;
     } else {
         $csConvObj = self::makeInstance('t3lib_cs');
     }
     $LOCAL_LANG = NULL;
     if (@is_file($fileRef) && $langKey) {
         // Set charset:
         if ($charset) {
             $targetCharset = $csConvObj->parse_charset($charset);
         } elseif ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']) {
             // when forceCharset is set, we store ALL labels in this charset!!!
             $targetCharset = $csConvObj->parse_charset($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset']);
         } else {
             $targetCharset = $csConvObj->parse_charset($csConvObj->charSetArray[$langKey] ? $csConvObj->charSetArray[$langKey] : 'iso-8859-1');
         }
         // Cache file name:
         $hashSource = substr($fileRef, strlen(PATH_site)) . '|' . date('d-m-Y H:i:s', filemtime($fileRef)) . '|version=2.3';
         $cacheFileName = PATH_site . 'typo3temp/llxml/' . substr(basename($fileRef), 10, 15) . '_' . self::shortMD5($hashSource) . '.' . $langKey . '.' . $targetCharset . '.cache';
         // Check if cache file exists...
         if (!@is_file($cacheFileName)) {
             // ... if it doesn't, create content and write it:
             // Read XML, parse it.
             $xmlString = self::getUrl($fileRef);
             $xmlContent = self::xml2array($xmlString);
             if (!is_array($xmlContent)) {
                 $fileName = substr($fileRef, strlen(PATH_site));
                 throw new RuntimeException('TYPO3 Fatal Error: The file "' . $fileName . '" is no TYPO3 language file!', 1270853902);
             }
             // Set default LOCAL_LANG array content:
             $LOCAL_LANG = array();
             $LOCAL_LANG['default'] = $xmlContent['data']['default'];
             // converting the default language (English)
             // this needs to be done for a few accented loan words and extension names
             // NOTE: no conversion is done when in UTF-8 mode!
             if (is_array($LOCAL_LANG['default']) && $targetCharset != 'utf-8') {
                 foreach ($LOCAL_LANG['default'] as &$labelValue) {
                     $labelValue = $csConvObj->utf8_decode($labelValue, $targetCharset);
                 }
                 unset($labelValue);
             }
             // converting other languages to their "native" charsets
             // NOTE: no conversion is done when in UTF-8 mode!
             if ($langKey != 'default') {
                 // If no entry is found for the language key, then force a value depending on meta-data setting. By default an automated filename will be used:
                 $LOCAL_LANG[$langKey] = self::llXmlAutoFileName($fileRef, $langKey);
                 $localized_file = self::getFileAbsFileName($LOCAL_LANG[$langKey]);
                 if (!@is_file($localized_file) && isset($xmlContent['data'][$langKey])) {
                     $LOCAL_LANG[$langKey] = $xmlContent['data'][$langKey];
                 }
                 // Checking if charset should be converted.
                 if (is_array($LOCAL_LANG[$langKey]) && $targetCharset != 'utf-8') {
                     foreach ($LOCAL_LANG[$langKey] as &$labelValue) {
                         $labelValue = $csConvObj->utf8_decode($labelValue, $targetCharset);
                     }
                     unset($labelValue);
                 }
             }
             // Cache the content now:
             $serContent = array('origFile' => $hashSource, 'LOCAL_LANG' => array('default' => $LOCAL_LANG['default'], $langKey => $LOCAL_LANG[$langKey]));
             $res = self::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
             if ($res) {
                 throw new RuntimeException('TYPO3 Fatal Error: ' . $res, 1270853903);
             }
         } else {
             // Get content from cache:
             $serContent = unserialize(self::getUrl($cacheFileName));
             $LOCAL_LANG = $serContent['LOCAL_LANG'];
         }
         // Checking for EXTERNAL file for non-default language:
         if ($langKey != 'default' && is_string($LOCAL_LANG[$langKey]) && strlen($LOCAL_LANG[$langKey])) {
             // Look for localized file:
             $localized_file = self::getFileAbsFileName($LOCAL_LANG[$langKey]);
             if ($localized_file && @is_file($localized_file)) {
                 // Cache file name:
                 $hashSource = substr($localized_file, strlen(PATH_site)) . '|' . date('d-m-Y H:i:s', filemtime($localized_file)) . '|version=2.3';
                 $cacheFileName = PATH_site . 'typo3temp/llxml/EXT_' . substr(basename($localized_file), 10, 15) . '_' . self::shortMD5($hashSource) . '.' . $langKey . '.' . $targetCharset . '.cache';
                 // Check if cache file exists...
                 if (!@is_file($cacheFileName)) {
                     // ... if it doesn't, create content and write it:
                     // Read and parse XML content:
                     $local_xmlString = self::getUrl($localized_file);
                     $local_xmlContent = self::xml2array($local_xmlString);
                     if (!is_array($local_xmlContent)) {
                         $fileName = substr($localized_file, strlen(PATH_site));
                         throw new RuntimeException('TYPO3 Fatal Error: The file "' . $fileName . '" is no TYPO3 language file!', 1270853904);
                     }
                     $LOCAL_LANG[$langKey] = is_array($local_xmlContent['data'][$langKey]) ? $local_xmlContent['data'][$langKey] : array();
                     // Checking if charset should be converted.
                     if (is_array($LOCAL_LANG[$langKey]) && $targetCharset != 'utf-8') {
                         foreach ($LOCAL_LANG[$langKey] as &$labelValue) {
                             $labelValue = $csConvObj->utf8_decode($labelValue, $targetCharset);
                         }
                         unset($labelValue);
                     }
                     // Cache the content now:
                     $serContent = array('extlang' => $langKey, 'origFile' => $hashSource, 'EXT_DATA' => $LOCAL_LANG[$langKey]);
                     $res = self::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
                     if ($res) {
                         throw new RuntimeException('TYPO3 Fatal Error: ' . $res, 1270853905);
                     }
                 } else {
                     // Get content from cache:
                     $serContent = unserialize(self::getUrl($cacheFileName));
                     $LOCAL_LANG[$langKey] = $serContent['EXT_DATA'];
                 }
             } else {
                 $LOCAL_LANG[$langKey] = array();
             }
         }
         // Convert the $LOCAL_LANG array to XLIFF structure
         foreach ($LOCAL_LANG as &$keysLabels) {
             foreach ($keysLabels as &$label) {
                 $label = array(0 => array('target' => $label));
             }
             unset($label);
         }
         unset($keysLabels);
         return $LOCAL_LANG;
     }
 }
 /**
  * Makes a standard query for listing of records based on standard input vars from the 'browser' ($this->internal['results_at_a_time'] and $this->piVars['pointer']) and 'searchbox' ($this->piVars['sword'] and $this->internal['searchFieldList'])
  * Set $count to 1 if you wish to get a count(*) query for selecting the number of results.
  * Notice that the query will use $this->conf['pidList'] and $this->conf['recursive'] to generate a PID list within which to search for records.
  *
  * @param	string		See pi_exec_query()
  * @param	boolean		See pi_exec_query()
  * @param	string		See pi_exec_query()
  * @param	mixed		See pi_exec_query()
  * @param	string		See pi_exec_query()
  * @param	string		See pi_exec_query()
  * @param	string		See pi_exec_query()
  * @param	boolean		If set, the function will return the query not as a string but array with the various parts.
  * @return	mixed		The query build.
  * @access private
  * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5, use pi_exec_query() instead!
  * @todo	Deprecated but still used in the Core!
  */
 function pi_list_query($table, $count = 0, $addWhere = '', $mm_cat = '', $groupBy = '', $orderBy = '', $query = '', $returnQueryArray = FALSE)
 {
     t3lib_div::logDeprecatedFunction();
     // Begin Query:
     if (!$query) {
         // Fetches the list of PIDs to select from.
         // TypoScript property .pidList is a comma list of pids. If blank, current page id is used.
         // TypoScript property .recursive is a int+ which determines how many levels down from the pids in the pid-list subpages should be included in the select.
         $pidList = $this->pi_getPidList($this->conf['pidList'], $this->conf['recursive']);
         if (is_array($mm_cat)) {
             $query = 'FROM ' . $table . ',' . $mm_cat['table'] . ',' . $mm_cat['mmtable'] . LF . ' WHERE ' . $table . '.uid=' . $mm_cat['mmtable'] . '.uid_local AND ' . $mm_cat['table'] . '.uid=' . $mm_cat['mmtable'] . '.uid_foreign ' . LF . (strcmp($mm_cat['catUidList'], '') ? ' AND ' . $mm_cat['table'] . '.uid IN (' . $mm_cat['catUidList'] . ')' : '') . LF . ' AND ' . $table . '.pid IN (' . $pidList . ')' . LF . $this->cObj->enableFields($table) . LF;
             // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
         } else {
             $query = 'FROM ' . $table . ' WHERE pid IN (' . $pidList . ')' . LF . $this->cObj->enableFields($table) . LF;
             // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT selected, if they should not! Almost ALWAYS add this to your queries!
         }
     }
     // Split the "FROM ... WHERE" string so we get the WHERE part and TABLE names separated...:
     list($TABLENAMES, $WHERE) = preg_split('/WHERE/i', trim($query), 2);
     $TABLENAMES = trim(substr(trim($TABLENAMES), 5));
     $WHERE = trim($WHERE);
     // Add '$addWhere'
     if ($addWhere) {
         $WHERE .= ' ' . $addWhere . LF;
     }
     // Search word:
     if ($this->piVars['sword'] && $this->internal['searchFieldList']) {
         $WHERE .= $this->cObj->searchWhere($this->piVars['sword'], $this->internal['searchFieldList'], $table) . LF;
     }
     if ($count) {
         $queryParts = array('SELECT' => 'count(*)', 'FROM' => $TABLENAMES, 'WHERE' => $WHERE, 'GROUPBY' => '', 'ORDERBY' => '', 'LIMIT' => '');
     } else {
         // Order by data:
         if (!$orderBy && $this->internal['orderBy']) {
             if (t3lib_div::inList($this->internal['orderByList'], $this->internal['orderBy'])) {
                 $orderBy = 'ORDER BY ' . $table . '.' . $this->internal['orderBy'] . ($this->internal['descFlag'] ? ' DESC' : '');
             }
         }
         // Limit data:
         $pointer = $this->piVars['pointer'];
         $pointer = intval($pointer);
         $results_at_a_time = t3lib_div::intInRange($this->internal['results_at_a_time'], 1, 1000);
         $LIMIT = $pointer * $results_at_a_time . ',' . $results_at_a_time;
         // Add 'SELECT'
         $queryParts = array('SELECT' => $this->pi_prependFieldsWithTable($table, $this->pi_listFields), 'FROM' => $TABLENAMES, 'WHERE' => $WHERE, 'GROUPBY' => $GLOBALS['TYPO3_DB']->stripGroupBy($groupBy), 'ORDERBY' => $GLOBALS['TYPO3_DB']->stripOrderBy($orderBy), 'LIMIT' => $LIMIT);
     }
     $query = $GLOBALS['TYPO3_DB']->SELECTquery($queryParts['SELECT'], $queryParts['FROM'], $queryParts['WHERE'], $queryParts['GROUPBY'], $queryParts['ORDERBY'], $queryParts['LIMIT']);
     return $returnQueryArray ? $queryParts : $query;
 }
 /**
  * CheckFile runs through the $menuArr and checks every file-reference in $name
  * (Not used anywhere)
  *
  * @param	string		Property name in the menu array
  * @param	array		Menu array to traverse
  * @return	array		Modified menu array
  * @deprecated since TYPO3 3.6, this function will be removed in TYPO3 4.5.
  * @internal
  */
 function checkFile($name, $menuArr)
 {
     t3lib_div::logDeprecatedFunction();
     foreach ($menuArr as $aKey => $value) {
         $menuArr[$aKey][$name] = $this->getFileName($menuArr[$aKey][$name]);
     }
     return $menuArr;
 }
 /**
  * Returns an icon, which has its title attribute set to a massive amount of information about the element.
  *
  * @param	array		Array where values are human readable output of field values (not htmlspecialchars()'ed though). The values are imploded by a linebreak.
  * @return	string		HTML img tag if applicable.
  * @deprecated since TYPO3 4.4, this function will be removed in TYPO3 4.6
  */
 function infoGif($infoArr)
 {
     t3lib_div::logDeprecatedFunction();
     if (count($infoArr) && $this->tt_contentConfig['showInfo']) {
         return t3lib_iconWorks::getSpriteIcon('actions-document-info', array('title' => htmlspecialchars(implode(LF, $infoArr))));
     }
 }
示例#29
0
 /**
  * Get all flash messages currently available and delete them afterwards.
  *
  * @return array<string>
  * @deprecated since Extbase 1.3.0; will be removed in Extbase 1.5.0. Use getAllMessagesAndFlush() instead
  */
 public function getAllAndFlush()
 {
     t3lib_div::logDeprecatedFunction();
     $flashMessages = t3lib_FlashMessageQueue::getAllMessagesAndFlush();
     $messages = array();
     foreach ($flashMessages as $flashMessage) {
         $messages[] = $flashMessage->getMessage();
     }
     return $messages;
 }
 /**
  * @return void
  */
 public function initialize()
 {
     t3lib_div::logDeprecatedFunction();
     return parent::initialize();
 }