Skip to content
This repository was archived by the owner on Aug 21, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions class.tx_rgsmoothgallery_fe.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class tx_rgsmoothgallery_fe
// hook for tt_news
public function extraItemMarkerProcessor($markerArray, $row, $lConf, &$pObj)
{
$this->cObj = t3lib_div::makeInstance('tslib_cObj'); // local cObj.
$this->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\ContentObject\\ContentObjectRenderer'); // local cObj.
$this->pObj = &$pObj;
$this->realConf = $pObj;

Expand All @@ -42,12 +42,12 @@ public function extraItemMarkerProcessor($markerArray, $row, $lConf, &$pObj)

// merge with special configuration (based on chosen CODE [SINGLE, LIST, LATEST]) if this is available
if (is_array($rgsgConfDefault[$pObj->config['code'] . '.'])) {
$rgsgConf = t3lib_div::array_merge_recursive_overrule($rgsgConfDefault, $rgsgConfDefault[$pObj->config['code'] . '.']);
$rgsgConf = \TYPO3\CMS\Core\Utility\GeneralUtility::array_merge_recursive_overrule($rgsgConfDefault, $rgsgConfDefault[$pObj->config['code'] . '.']);
} else {
$rgsgConf = $rgsgConfDefault;
}

#echo t3lib_div::view_array($rgsgConf);
#echo \TYPO3\CMS\Core\Utility\GeneralUtility::view_array($rgsgConf);
$this->rgsgConf = $rgsgConf;
// if the configuration is available, otherwise just do nothing
if ($rgsgConf) {
Expand Down Expand Up @@ -78,8 +78,8 @@ public function extraItemMarkerProcessor($markerArray, $row, $lConf, &$pObj)
// If there are any images and minimum count of images is reached
if ($row[$imageField] && count($images) >= $rgsgConf['minimumImages']) {
// call rgsmoothgallery
require_once t3lib_extMgm::extPath('rgsmoothgallery') . 'pi1/class.tx_rgsmoothgallery_pi1.php';
$this->gallery = t3lib_div::makeInstance('tx_rgsmoothgallery_pi1');
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('rgsmoothgallery') . 'pi1/class.tx_rgsmoothgallery_pi1.php';
$this->gallery = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_rgsmoothgallery_pi1');

// if no js is available
$noJsImg = $rgsgConf['big.'];
Expand Down
10 changes: 5 additions & 5 deletions class.tx_rgsmoothgallery_rgsg.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ class tx_rgsmoothgallery_rgsg
{
public function user_rgsg($content, $conf)
{
$sysPageObj = t3lib_div::makeInstance('t3lib_pageSelect');
$sysPageObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
$rootLine = $sysPageObj->getRootLine($GLOBALS['TSFE']->id);
$TSObj = t3lib_div::makeInstance('t3lib_tsparser_ext');
$TSObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\ExtendedTemplateService');
$TSObj->tt_track = 0;
$TSObj->init();
$TSObj->runThroughTemplates($rootLine);
Expand All @@ -24,8 +24,8 @@ public function user_rgsg($content, $conf)
$css .= ($row['imageheight']) ? 'height:' . $row['imageheight'] . 'px;' : '';
$GLOBALS['TSFE']->additionalCSS['rgsmoothgallery' . $id] = '#myGallery' . $id . ' {' . $css . '}';

if (t3lib_extMgm::isLoaded('t3mootools')) {
require_once t3lib_extMgm::extPath('t3mootools') . 'class.tx_t3mootools.php';
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3mootools')) {
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3mootools') . 'class.tx_t3mootools.php';
}

if (defined('T3MOOTOOLS')) {
Expand All @@ -50,7 +50,7 @@ public function getPath($path)
if (substr($path, 0, 4) == 'EXT:') {
$keyEndPos = strpos($path, '/', 6);
$key = substr($path, 4, $keyEndPos - 4);
$keyPath = t3lib_extMgm::siteRelpath($key);
$keyPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelpath($key);
$newPath = $keyPath . substr($path, $keyEndPos + 1);

return $newPath;
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
'CGLcompliance_note' => '',
'constraints' => array(
'depends' => array(
'typo3' => '6.1.0-7.99.99',
'typo3' => '6.2.0-7.99.99',
),
'conflicts' => array(
),
Expand Down
8 changes: 4 additions & 4 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
}

## Extending TypoScript from static template uid=43 to set up userdefined tag:
t3lib_extMgm::addTypoScript($_EXTKEY, 'editorcfg', '
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript($_EXTKEY, 'editorcfg', '
tt_content.CSS_editor.ch.tx_rgsmoothgallery_pi1 = < plugin.tx_rgsmoothgallery_pi1.CSS_editor
', 43);

t3lib_extMgm::addPItoST43($_EXTKEY, 'pi1/class.tx_rgsmoothgallery_pi1.php', '_pi1', 'list_type', 1);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPItoST43($_EXTKEY, 'pi1/class.tx_rgsmoothgallery_pi1.php', '_pi1', 'list_type', 1);

t3lib_extMgm::addUserTSConfig('
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
options.saveDocNew.tx_rgsmoothgallery_image=1
');

// hook for tt_news
if (TYPO3_MODE == 'FE') {
require_once t3lib_extMgm::extPath($_EXTKEY) . 'class.tx_rgsmoothgallery_fe.php';
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'class.tx_rgsmoothgallery_fe.php';
}
$TYPO3_CONF_VARS['EXTCONF']['tt_news']['extraItemMarkerHook'][] = 'tx_rgsmoothgallery_fe';
#$TYPO3_CONF_VARS['EXTCONF']['tt_news']['extraGlobalMarkerHook'][] = 'tx_rgsmoothgallery_fe';
Expand Down
28 changes: 14 additions & 14 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
die('Access denied.');
}

t3lib_div::loadTCA('tt_content');
//\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('tt_content');
$TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY . '_pi1'] = 'layout,select_key,pages';

t3lib_extMgm::addPlugin(array('LLL:EXT:rgsmoothgallery/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY . '_pi1'), 'list_type');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(array('LLL:EXT:rgsmoothgallery/locallang_db.xml:tt_content.list_type_pi1', $_EXTKEY . '_pi1'), 'list_type');

t3lib_extMgm::addStaticFile($_EXTKEY, "pi1/static/", "SmoothGallery");
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, "pi1/static/", "SmoothGallery");

// Flexforms
$TCA['tt_content']['types']['list']['subtypes_addlist'][$_EXTKEY . '_pi1'] = 'pi_flexform';
if (t3lib_extMgm::isLoaded('dam')) {
t3lib_extMgm::addPiFlexFormValue('rgsmoothgallery_pi1', 'FILE:EXT:rgsmoothgallery/flexformDAM_ds.xml');
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dam')) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('rgsmoothgallery_pi1', 'FILE:EXT:rgsmoothgallery/flexformDAM_ds.xml');
} else {
t3lib_extMgm::addPiFlexFormValue('rgsmoothgallery_pi1', 'FILE:EXT:rgsmoothgallery/flexform_ds.xml');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('rgsmoothgallery_pi1', 'FILE:EXT:rgsmoothgallery/flexform_ds.xml');
}

if (TYPO3_MODE == "BE") {
$TBE_MODULES_EXT["xMOD_db_new_content_el"]["addElClasses"]["tx_rgsmoothgallery_pi1_wizicon"] = t3lib_extMgm::extPath($_EXTKEY) . 'pi1/class.tx_rgsmoothgallery_pi1_wizicon.php';
$TBE_MODULES_EXT["xMOD_db_new_content_el"]["addElClasses"]["tx_rgsmoothgallery_pi1_wizicon"] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'pi1/class.tx_rgsmoothgallery_pi1_wizicon.php';
}

t3lib_extMgm::allowTableOnStandardPages('tx_rgsmoothgallery_image');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_rgsmoothgallery_image');

$TCA["tx_rgsmoothgallery_image"] = array(
"ctrl" => array(
Expand All @@ -40,8 +40,8 @@
'enablecolumns' => array(
'disabled' => 'hidden',
),
'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'tca.php',
'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'icon_tx_rgsmoothgallery_image.gif',
'dynamicConfigFile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'tca.php',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'icon_tx_rgsmoothgallery_image.gif',
),
"feInterface" => array(
"fe_admin_fieldList" => "sys_language_uid, l18n_parent, l18n_diffsource, hidden, title, description, image",
Expand All @@ -57,13 +57,13 @@
),
),
);
t3lib_div::loadTCA("tt_content");
t3lib_extMgm::addTCAcolumns("tt_content", $tempColumns, 1);
//\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA("tt_content");
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns("tt_content", $tempColumns);

$GLOBALS['TCA']['tt_content']['palettes']['7']['showitem'] .= ',tx_rgsmoothgallery_rgsg';

/*
t3lib_div::loadTCA("tt_content");
t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns,1);
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA("tt_content");
t3lib_extMgm::addTCAcolumns("tt_content",$tempColumns);
t3lib_extMgm::addToAllTCAtypes("tt_content","tx_rgsmoothgallery_rgsg;;;;1-1-1");
*/;
32 changes: 16 additions & 16 deletions pi1/class.tx_rgsmoothgallery_pi1.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @package TYPO3
* @subpackage tx_rgsmoothgallery
*/
class tx_rgsmoothgallery_pi1 extends tslib_pibase
class tx_rgsmoothgallery_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin
{
public $prefixId = 'tx_rgsmoothgallery_pi1'; // Same as class name
public $scriptRelPath = 'pi1/class.tx_rgsmoothgallery_pi1.php'; // Path to this script relative to the extension dir.
Expand Down Expand Up @@ -197,7 +197,7 @@ public function beginGallery($uniqueId, $limitImages = 0)

if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraBeginGalleryHook'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraBeginGalleryHook'] as $_classRef) {
$_procObj = & t3lib_div::getUserObj($_classRef);
$_procObj = & \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
$content = $_procObj->extraBeginGalleryProcessor($content, $limitImages, $this);
}
}
Expand All @@ -216,7 +216,7 @@ public function endGallery()
$content = '</div></div>';
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraEndGalleryHook'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraEndGalleryHook'] as $_classRef) {
$_procObj = & t3lib_div::getUserObj($_classRef);
$_procObj = & \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
$content = $_procObj->extraEndGalleryProcessor($content, $this);
}
}
Expand Down Expand Up @@ -264,7 +264,7 @@ public function getImagesDirectory($limitImages = 0)

if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraGetImagesDirectoryHook'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraGetImagesDirectoryHook'] as $_classRef) {
$_procObj = & t3lib_div::getUserObj($_classRef);
$_procObj = & \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
$text = $_procObj->extraGetImagesDirectoryHook($text, $this->config['startingpoint'] . $value, $this);
}
}
Expand Down Expand Up @@ -461,8 +461,8 @@ public function getJs($thumbsVal, $arrowsVal, $durationVal, $widthGallery, $heig
{
$this->conf = $conf;

if (t3lib_extMgm::isLoaded('t3mootools')) {
require_once t3lib_extMgm::extPath('t3mootools') . 'class.tx_t3mootools.php';
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3mootools')) {
require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('t3mootools') . 'class.tx_t3mootools.php';
}
if (defined('T3MOOTOOLS')) {
tx_t3mootools::addMooJS();
Expand Down Expand Up @@ -575,7 +575,7 @@ public function getImageDifferentPlaces($limitImages = 0)
// hook
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'] as $_classRef) {
$_procObj = & t3lib_div::getUserObj($_classRef);
$_procObj = & \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
$content = $_procObj->extraBeginGalleryProcessor($content, $limitImages, $this);
}
}
Expand Down Expand Up @@ -641,7 +641,7 @@ private function addImage($path, $title, $description, $thumb, $uniqueID, $limit
$config['limitImages'] = $limitImages;
if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'])) {
foreach ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'] as $_classRef) {
$_procObj = & t3lib_div::getUserObj($_classRef);
$_procObj = & \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($_classRef);
$singleImage = $_procObj->extraImageProcessor($singleImage, $config, $this);
}
}
Expand Down Expand Up @@ -707,7 +707,7 @@ public function getPath($path)
if (substr($path, 0, 4) == 'EXT:') {
$keyEndPos = strpos($path, '/', 6);
$key = substr($path, 4, $keyEndPos - 4);
$keyPath = t3lib_extMgm::siteRelpath($key);
$keyPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelpath($key);
$newPath = $keyPath . substr($path, $keyEndPos + 1);

return $newPath;
Expand Down Expand Up @@ -857,13 +857,13 @@ public function readImageInfo($image)
*/
public function readExif($image)
{
if (!t3lib_div::isAbsPath($image)) {
$image = t3lib_div::getFileAbsFileName($image);
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath($image)) {
$image = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($image);
}

$data = array('title' => '', 'description' => '', 'author' => '');

if (!t3lib_div::inArray(get_loaded_extensions(), 'exif') || $this->conf['exif'] != 1) { // If there is no EXIF Support at your installation
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::inArray(get_loaded_extensions(), 'exif') || $this->conf['exif'] != 1) { // If there is no EXIF Support at your installation
return $data;
}

Expand Down Expand Up @@ -892,8 +892,8 @@ public function readExif($image)
*/
public function readIptc($image)
{
if (!t3lib_div::isAbsPath($image)) {
$image = t3lib_div::getFileAbsFileName($image);
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath($image)) {
$image = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($image);
}

$data = array('title' => '', 'description' => '', 'author' => '');
Expand Down Expand Up @@ -933,8 +933,8 @@ public function readIptc($image)
*/
public function readTextComment($image)
{
if (!t3lib_div::isAbsPath($image)) {
$image = t3lib_div::getFileAbsFileName($image);
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isAbsPath($image)) {
$image = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($image);
}

$data = array('title' => '', 'description' => '', 'author' => '');
Expand Down
6 changes: 3 additions & 3 deletions pi1/class.tx_rgsmoothgallery_pi1_wizicon.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function proc($wizardItems)
$LL = $this->includeLocalLang();

$wizardItems['plugins_tx_rgsmoothgallery_pi1'] = array(
'icon' => t3lib_extMgm::extRelPath('rgsmoothgallery') . 'pi1/ce_wiz.gif',
'icon' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('rgsmoothgallery') . 'pi1/ce_wiz.gif',
'title' => $LANG->getLLL('pi1_title', $LL),
'description' => $LANG->getLLL('pi1_plus_wiz_description', $LL),
'params' => '&defVals[tt_content][CType]=list&defVals[tt_content][list_type]=rgsmoothgallery_pi1',
Expand All @@ -61,8 +61,8 @@ public function proc($wizardItems)
*/
public function includeLocalLang()
{
$llFile = t3lib_extMgm::extPath('rgsmoothgallery') . 'locallang.xml';
$LOCAL_LANG = t3lib_div::readLLfile($llFile, $GLOBALS['LANG']->lang);
$llFile = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('rgsmoothgallery') . 'locallang.xml';
$LOCAL_LANG = \TYPO3\CMS\Core\Utility\GeneralUtility::readLLfile($llFile, $GLOBALS['LANG']->lang);

return $LOCAL_LANG;
}
Expand Down
10 changes: 4 additions & 6 deletions savefile.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,14 @@
define('PATH_site', ereg_replace('[^/]*.[^/]*$', '', dirname(dirname(PATH_thisScript))));
define('PATH_typo3', PATH_site . 'typo3/');
define('PATH_typo3conf', PATH_site . 'typo3conf/');
define('PATH_t3lib', PATH_site . 't3lib/');
require_once PATH_t3lib . 'class.t3lib_div.php';

$image = $_GET['image'];

// remove domain if it is prepended
$image = str_replace(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), '', $image);
$allowedExtensions = t3lib_div::trimExplode(',', (strlen($TYPO3_CONF_VARS['GFX']['imagefile_ext']) > 0 ? $TYPO3_CONF_VARS['GFX']['imagefile_ext'] : 'gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai'), 1);
$image = str_replace(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), '', $image);
$allowedExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', (strlen($TYPO3_CONF_VARS['GFX']['imagefile_ext']) > 0 ? $TYPO3_CONF_VARS['GFX']['imagefile_ext'] : 'gif,jpg,jpeg,tif,bmp,pcx,tga,png,pdf,ai'), 1);
$imageInfo = pathinfo($image);
if (!is_file(t3lib_div::getFileAbsFileName($image)) || !in_array(strtolower($imageInfo['extension']), $allowedExtensions)) {
if (!is_file(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($image)) || !in_array(strtolower($imageInfo['extension']), $allowedExtensions)) {
die('You try to download a file, you are not allowed to download');
}

Expand Down Expand Up @@ -86,7 +84,7 @@ function force_download($filename, $mimetype = '')
{
$filenameOrig = $filename;
# $filename = str_replace(,PATH_site,$filename);
$filename = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . $filename;
$filename = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $filename;
#if (!file_exists($filename)) return false;
// Mimetype not set?
if (empty($mimetype)) {
Expand Down