Project

General

Profile

Feature #19503 » 0009633_v8_enable.patch

Administrator Admin, 2009-05-01 17:37

View differences:

t3lib/class.t3lib_div.php (Arbeitskopie)
public static function makeInstanceClassName($className) {
self::logDeprecatedFunction();
return class_exists('ux_'.$className) ? t3lib_div::makeInstanceClassName('ux_'.$className) : $className;
return (class_exists('ux_'.$className, false) ? t3lib_div::makeInstanceClassName('ux_' . $className) : $className);
}
/**
......
* @return string Final class name to instantiate with "new [classname]"
*/
protected function getClassName($className) {
return class_exists('ux_' . $className) ? self::getClassName('ux_' . $className) : $className;
return (class_exists('ux_' . $className, false) ? self::getClassName('ux_' . $className) : $className);
}
/**
typo3/mod/tools/em/class.em_terconnection.php (Arbeitskopie)
$filesData = array();
foreach ($uArr['FILES'] as $filename => $infoArr) {
$content = (!defined('SOAP_1_2') && class_exists('soapclient')) ? base64_encode($infoArr['content']) : $infoArr['content']; // bug in NuSOAP - no automatic encoding
// Avoid autoloading "soapclient", since it's only a strategy check here:
$content = (!defined('SOAP_1_2') && class_exists('soapclient', false)) ? base64_encode($infoArr['content']) : $infoArr['content']; // bug in NuSOAP - no automatic encoding
$filesData['fileData'][] = array (
'name' => utf8_encode($infoArr['name']),
'size' => intval($infoArr['size']),
typo3/mod/tools/em/class.em_soap.php (Arbeitskopie)
}
if (!$options['implementation'] || $options['implementation'] == 'detect') {
// Avoid autoloading, since it's only a strategy check here:
if (defined('SOAP_1_2')) {
$options['implementation'] = 'phpsoap';
} elseif (class_exists('soapclient')) {
} elseif (class_exists('soapclient', false)) {
$options['implementation'] = 'nusoap';
} elseif (class_exists('SOAP_Client')) {
} elseif (class_exists('SOAP_Client', false)) {
$options['implementation'] = 'pearsoap';
}
}
typo3/init.php (Arbeitskopie)
$temp_path_t3lib = @is_dir(PATH_site.'t3lib/') ? PATH_site.'t3lib/' : PATH_typo3.'t3lib/';
define('PATH_t3lib', $temp_path_t3lib); // Abs. path to t3lib/ (general TYPO3 library) within the TYPO3 admin dir
define('PATH_typo3conf', PATH_site.'typo3conf/'); // Abs. TYPO3 configuration path (local, not part of source)
if (!defined('PATH_tslib')) {
if (@is_dir(PATH_site . TYPO3_mainDir . 'sysext/cms/tslib/')) {
define('PATH_tslib', PATH_site . TYPO3_mainDir . 'sysext/cms/tslib/');
} elseif (@is_dir(PATH_site . 'tslib/')) {
define('PATH_tslib', PATH_site . 'tslib/');
}
}
}
......
require(PATH_t3lib.'config_default.php');
if (!defined ('TYPO3_db')) die ('The configuration file was not included.');
require_once(PATH_t3lib.'class.t3lib_db.php'); // The database library
// *********************
// Autoloader
// *********************
require_once(PATH_t3lib . 'class.t3lib_autoloader.php');
t3lib_autoloader::registerAutoloader();
/** @var TYPO3_DB t3lib_db */
$TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');
$TYPO3_DB->debugOutput = $TYPO3_CONF_VARS['SYS']['sqlDebug'];
typo3/sysext/cms/tslib/media/scripts/fe_adminLib.inc (Arbeitskopie)
function sendHTMLMail($content,$recipient,$dummy,$fromEmail,$fromName,$replyTo='') {
if (trim($recipient) && trim($content)) {
$cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');
if (class_exists($cls)) { // If htmlmail lib is included, then generate a nice HTML-email
// Avoid autoloading of t3lib_htmlmail, since it's only a strategy check here:
if (class_exists($cls, false)) { // If htmlmail lib is included, then generate a nice HTML-email
$parts = spliti('<title>|</title>',$content,3);
$subject = trim($parts[1]) ? trim($parts[1]) : 'TYPO3 FE Admin message';
typo3/sysext/cms/tslib/class.tslib_content.php (Arbeitskopie)
$parts = explode('->',$funcName);
if (count($parts)==2) { // Class
$cls = t3lib_div::makeInstanceClassName($parts[0]);
// Check whether class is available and try to reload includeLibs if possible:
if ($this->isClassAvailable($cls, $conf)) {
// Check whether class is available:
if (class_exists($cls)) {
$classObj = new $cls;
if (method_exists($classObj, $parts[1])) {
$classObj->cObj = &$this;
......
return $librariesIncluded;
}
/**
* Checks whether a PHP class is available. If the check fails, the method tries to
* determine the correct includeLibs to make the class available automatically.
*
* TypoScript example that can cause this:
* | plugin.tx_myext_pi1 = USER
* | plugin.tx_myext_pi1 {
* | includeLibs = EXT:myext/pi1/class.tx_myext_pi1.php
* | userFunc = tx_myext_pi1->main
* | }
* | 10 = USER
* | 10.userFunc = tx_myext_pi1->renderHeader
*
* @param string $className: The name of the PHP class to be checked
* @param array $config: TypoScript configuration (naturally of a USER or COA cObject)
* @return boolean Whether the class is available
* @link http://bugs.typo3.org/view.php?id=9654
* @TODO This method was introduced in TYPO3 4.3 and can be removed if the autoload was integrated
*/
protected function isClassAvailable($className, array $config = NULL) {
if (class_exists($className)) {
return true;
} elseif ($config) {
$pluginConfiguration =& $GLOBALS['TSFE']->tmpl->setup['plugin.'][$className . '.'];
if (isset($pluginConfiguration['includeLibs']) && $pluginConfiguration['includeLibs']) {
$config['includeLibs'] = $pluginConfiguration['includeLibs'];
return $this->includeLibs($config);
}
}
return false;
}
typo3/sysext/cms/tslib/index_ts.php (Arbeitskopie)
define('PATH_tslib', t3lib_extMgm::extPath('cms').'tslib/');
}
require_once(PATH_t3lib.'class.t3lib_db.php');
// *********************
// Autoloader
// *********************
$TT->push('Register Autoloader', '');
require_once(PATH_t3lib . 'class.t3lib_autoloader.php');
t3lib_autoloader::registerAutoloader();
$TT->pull();
$TYPO3_DB = t3lib_div::makeInstance('t3lib_DB');
$TYPO3_DB->debugOutput = $TYPO3_CONF_VARS['SYS']['sqlDebug'];
......
if ($TSFE->beUserLogin) {
$BE_USER->initializeFrontendEdit();
if ($BE_USER->frontendEdit instanceof t3lib_frontendedit) {
require_once(t3lib_extMgm::extPath('lang').'lang.php');
$LANG = t3lib_div::makeInstance('language');
$LANG->init($BE_USER->uc['lang']);
typo3/sysext/cms/tslib/class.tslib_eidtools.php (Arbeitskopie)
public static function initLanguage($language = 'default') {
if (!is_object($GLOBALS['LANG'])) {
require_once(PATH_t3lib . 'class.t3lib_cs.php');
require_once(t3lib_extMgm::extPath('lang', 'lang.php'));
$GLOBALS['LANG'] = t3lib_div::makeInstance('language');
$GLOBALS['LANG']->init($language);
}
typo3/sysext/indexed_search/class.crawler.php (Arbeitskopie)
# To make sure the backend charset is available:
require_once(PATH_typo3.'sysext/lang/lang.php');
if (!is_object($GLOBALS['LANG'])) {
$GLOBALS['LANG'] = t3lib_div::makeInstance('language');
$GLOBALS['LANG']->init($GLOBALS['BE_USER']->uc['lang']);
(13-13/14)