Skip to content
Open
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
2 changes: 1 addition & 1 deletion Classes/Controller/NewsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public function getTagsOfNews($newsRecords)
*/
public function ajaxEventAction(array $overwriteDemand = null)
{
date_default_timezone_set('UTC');
//date_default_timezone_set('UTC+1');
$calendarstart = \DateTime::createFromFormat('Y-m-d H:i:s', $this->request->getArgument('start') . '00:00:00');
$calendarend = \DateTime::createFromFormat('Y-m-d H:i:s', $this->request->getArgument('end') . '00:00:00');

Expand Down
6 changes: 3 additions & 3 deletions Classes/Hooks/PageRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
class PageRenderer implements SingletonInterface
{

/**
* wrapper function called by hook (\TYPO3\CMS\Core\Page\PageRenderer->render-preProcess)
*
Expand All @@ -37,7 +37,7 @@ class PageRenderer implements SingletonInterface
*/
public function addBackendJS($parameters, &$pageRenderer)
{
if (get_class($GLOBALS['SOBE']) === 'TYPO3\CMS\Backend\Controller\EditDocumentController' && array_keys($GLOBALS['SOBE']->editconf)[0] === 'tx_news_domain_model_news') {
if (!empty($GLOBALS['SOBE']) && (get_class($GLOBALS['SOBE']) === 'TYPO3\CMS\Backend\Controller\EditDocumentController' && array_keys($GLOBALS['SOBE']->editconf)[0] === 'tx_news_domain_model_news')) {
$lang = $GLOBALS['LANG'];
$languageLabels = [
'datedNews.modalHeader' => $lang->sL('LLL:EXT:dated_news/Resources/Private/Language/locallang_db.xml:tx_dated_news.modal.header', 1),
Expand All @@ -47,7 +47,7 @@ public function addBackendJS($parameters, &$pageRenderer)
'datedNews.overwrite.allFieldsNoneModified' => $lang->sL('LLL:EXT:dated_news/Resources/Private/Language/locallang_db.xml:tx_dated_news.modal.overwrite.allFieldsNoneModified', 1),
'datedNews.overwrite.changedFieldsAll' => $lang->sL('LLL:EXT:dated_news/Resources/Private/Language/locallang_db.xml:tx_dated_news.modal.overwrite.changedFieldsAll', 1),
'datedNews.overwrite.changedFieldsNoneModified' => $lang->sL('LLL:EXT:dated_news/Resources/Private/Language/locallang_db.xml:tx_dated_news.modal.overwrite.changedFieldsNoneModified', 1),

];
$pageRenderer->addInlineLanguageLabelArray($languageLabels);
$pageRenderer->loadRequireJsModule('TYPO3/CMS/DatedNews/Backend/ConfirmationDialog');
Expand Down
15 changes: 13 additions & 2 deletions Classes/Utility/Div.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
use TYPO3\CMS\Extbase\Service\FlexFormService;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;

/**
* This file is part of the TYPO3 CMS project.
Expand Down Expand Up @@ -214,9 +216,18 @@ public function shuffleAssoc($list)
*/
public function getPluginConfiguration($id)
{
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = 1;
$piFlexformSettings = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('pi_flexform', 'tt_content', 'uid = ' . $id);
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('tt_content');
$queryBuilder->select('pi_flexform')
->from('tt_content')
->where(
$queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT))
);

$piFlexformSettings = $queryBuilder->execute()->fetchAll();

$ffs = GeneralUtility::makeInstance(FlexFormService::class);
return $ffs->convertFlexFormContentToArray($piFlexformSettings[0]['pi_flexform']);


}
}
4 changes: 2 additions & 2 deletions Classes/ViewHelpers/Javascript/CalendarViewHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function render()

//complete javascript code
$js = <<<EOT

if(!DatedNews.eventscal.hasOwnProperty("newsCalendarEvent_$calendarUid")){
DatedNews.eventscal["newsCalendarEvent_$uid"] = [];
}
Expand Down Expand Up @@ -184,7 +184,7 @@ public function render()
theme : 'true',
buttonIcons: true,
weekNumbers: false,
timezone : 'UTC',
timezone : 'UTC',
viewRender: function(){
if($('.fc-slats').length > 0) {
var bottomContainerPos = $('#calendar')[0].getBoundingClientRect().bottom;
Expand Down
62 changes: 34 additions & 28 deletions ext_emconf.php
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
<?php

/***************************************************************
* Extension Manager/Repository config file for ext: "dated_news"
* Extension Manager/Repository config file for ext "dated_news".
*
* Auto generated by Extension Builder 2017-01-21
* Auto generated 20-02-2018 09:31
*
* Manual updates:
* Only the data in the array - anything else is removed by next write.
* "version" and "dependencies" must not be touched!
* Only the data in the array - everything else is removed by next
* writing. "version" and "dependencies" must not be touched!
***************************************************************/

$EM_CONF[$_EXTKEY] = [
'title' => 'Dated News',
'description' => 'Extends the TYPO3 versatile news system extension tx_news with a calendar view using fullcalendar.js/qtip.js and allows to book for the now pricable events',
'category' => 'fe',
'author' => 'Falk Röder',
'author_email' => 'mail@falk-roeder.de',
'state' => 'stable',
'internal' => '',
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 1,
'version' => '5.1.1',
'constraints' => [
'depends' => [
'typo3' => '7.6.13-8.7.99',
'news' => '5.3.0-6.3.99',
'recurr' => '1.0.0',
],
'conflicts' => [
],
'suggests' => [
],
],
];
$EM_CONF[$_EXTKEY] = array (
'title' => 'Dated News',
'description' => 'Extends the TYPO3 versatile news system extension tx_news with a calendar view using fullcalendar.js/qtip.js and allows to book for the now pricable events',
'category' => 'fe',
'author' => 'Falk Röder',
'author_email' => 'mail@falk-roeder.de',
'state' => 'stable',
'uploadfolder' => false,
'createDirs' => '',
'clearCacheOnLoad' => 1,
'version' => '6.0.0',
'constraints' =>
array (
'depends' =>
array (
'typo3' => '8.0.0-9.5.99',
'news' => '5.3.0-7.99.99',
'recurr' => '1.0.0',
),
'conflicts' =>
array (
),
'suggests' =>
array (
),
),
'clearcacheonload' => true,
'author_company' => NULL,
);

4 changes: 2 additions & 2 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_datednews_domain_model_newsrecurrence');

if (TYPO3_MODE == 'BE') {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Classes/Hooks/PageRenderer.php:FalkRoeder\\DatedNews\\Hooks\\PageRenderer->addBackendJS';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-preProcess'][] = 'FalkRoeder\\DatedNews\\Hooks\\PageRenderer->addBackendJS';
}

//TYPO3 V7
Expand All @@ -23,4 +23,4 @@
];
}

$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['orderByNews'] .= ',eventstart';
$GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['orderByNews'] .= ',eventstart';
15 changes: 0 additions & 15 deletions sonar-project.properties

This file was deleted.