Added space after function call arguments. Changed constant into uppercase. Reduce...
authorpatrick@roquin <patrick@roquin@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 13 Sep 2013 08:16:17 +0000 (08:16 +0000)
committerpatrick@roquin <patrick@roquin@735d13b6-9817-0410-8766-e36946ffe9aa>
Fri, 13 Sep 2013 08:16:17 +0000 (08:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/roq_newsevent/trunk@79767 735d13b6-9817-0410-8766-e36946ffe9aa

Classes/Controller/EventController.php
Classes/Domain/Repository/EventRepository.php
class.ext_update.php
ext_emconf.php
ext_tables.php

index aeefbdc..f5a692e 100644 (file)
@@ -50,7 +50,7 @@ class Tx_RoqNewsevent_Controller_EventController extends Tx_News_Controller_News
             $this->configurationManager->getConfiguration(Tx_Extbase_Configuration_ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
 
         // Fetch the current controller action which is set in the news plugin
-        $controllerConfigurationAction = implode(";",$extbaseFrameworkConfiguration['controllerConfiguration']['News']['actions']);
+        $controllerConfigurationAction = implode(';', $extbaseFrameworkConfiguration['controllerConfiguration']['News']['actions']);
 
         parent::setViewConfiguration($view);
 
@@ -58,7 +58,7 @@ class Tx_RoqNewsevent_Controller_EventController extends Tx_News_Controller_News
         foreach($GLOBALS['TYPO3_CONF_VARS']['EXT']['news']['switchableControllerActions']['newItems'] as $switchableControllerActions => $value) {
             $action = str_replace('News->', '', $switchableControllerActions);
 
-            if(strpos($action,$controllerConfigurationAction) !== FALSE) {
+            if(strpos($action, $controllerConfigurationAction) !== FALSE) {
                 // the current controller configuration action matches with one of the event controller actions: set event view configuration
                 $this->setEventViewConfiguration($view);
             }
@@ -110,7 +110,7 @@ class Tx_RoqNewsevent_Controller_EventController extends Tx_News_Controller_News
 
         // set ordering
         if($settings['event']['orderByAllowed']) {
-            $demand->setOrderByAllowed($orderByAllowed . str_replace(' ','',$settings['event']['orderByAllowed']));
+            $demand->setOrderByAllowed($orderByAllowed . str_replace(' ', '', $settings['event']['orderByAllowed']));
         } else {
             // default orderByAllowed list
             $demand->setOrderByAllowed($orderByAllowed . 'tx_roqnewsevent_startdate,tx_roqnewsevent_starttime');
index e3a9d25..3f6e8dd 100644 (file)
@@ -23,22 +23,22 @@ class Tx_RoqNewsevent_Domain_Repository_EventRepository extends Tx_News_Domain_R
      */
     protected function createIsActiveConstraint(Tx_Extbase_Persistence_QueryInterface $query) {
         /** @var $constraint Tx_Extbase_Persistence_QOM_Constraint */
-        $constraint = null;
+        $constraint = NULL;
         $timestamp  = time(); // + date('Z');
 
         $constraint = $query->logicalOr(
             // future events:
-            $query->greaterThan('tx_roqnewsevent_startdate + tx_roqnewsevent_starttime',$timestamp),
+            $query->greaterThan('tx_roqnewsevent_startdate + tx_roqnewsevent_starttime', $timestamp),
             // current multiple day events:
             $query->logicalAnd(
-                $query->lessThan('tx_roqnewsevent_startdate + tx_roqnewsevent_starttime',$timestamp),
-                $query->greaterThan('tx_roqnewsevent_enddate + tx_roqnewsevent_endtime',$timestamp)
+                $query->lessThan('tx_roqnewsevent_startdate + tx_roqnewsevent_starttime', $timestamp),
+                $query->greaterThan('tx_roqnewsevent_enddate + tx_roqnewsevent_endtime', $timestamp)
             ),
             // current single day events:
             $query->logicalAnd(
-                $query->lessThan('tx_roqnewsevent_startdate + tx_roqnewsevent_starttime',$timestamp),
-                $query->greaterThan('tx_roqnewsevent_startdate + tx_roqnewsevent_endtime',$timestamp),
-                $query->equals('tx_roqnewsevent_enddate',0)
+                $query->lessThan('tx_roqnewsevent_startdate + tx_roqnewsevent_starttime', $timestamp),
+                $query->greaterThan('tx_roqnewsevent_startdate + tx_roqnewsevent_endtime', $timestamp),
+                $query->equals('tx_roqnewsevent_enddate', 0)
             )
         );
 
@@ -57,11 +57,11 @@ class Tx_RoqNewsevent_Domain_Repository_EventRepository extends Tx_News_Domain_R
 
         if ($demand->getCategories() && $demand->getCategories() !== '0') {
             $constraints[] = $this->createCategoryConstraint(
-                                        $query,
-                                        $demand->getCategories(),
-                                        $demand->getCategoryConjunction(),
-                                        $demand->getIncludeSubCategories()
-                    );
+                $query,
+                $demand->getCategories(),
+                $demand->getCategoryConjunction(),
+                $demand->getIncludeSubCategories()
+            );
         }
 
             // archived
@@ -140,12 +140,12 @@ class Tx_RoqNewsevent_Domain_Repository_EventRepository extends Tx_News_Domain_R
         }
 
             // events only
-        $constraints[] = $query->logicalAnd($query->equals('tx_roqnewsevent_is_event',1));
+        $constraints[] = $query->logicalAnd($query->equals('tx_roqnewsevent_is_event', 1));
 
             // the event must have an event start date
         $constraints[] = $query->logicalAnd(
             $query->logicalNot(
-                $query->equals('tx_roqnewsevent_startdate',0)
+                $query->equals('tx_roqnewsevent_startdate', 0)
             )
         );
 
index 2b7cc1f..438f7a8 100644 (file)
@@ -15,7 +15,7 @@ class ext_update extends t3lib_SCbase {
      *
      * @return string: HTML to display
      */
-    function main() {
+    public function main() {
         $affectedRows   = 0;
         $errorMessage   = '';
         $this->content  = '';
@@ -24,9 +24,9 @@ class ext_update extends t3lib_SCbase {
         $this->doc->backPath = $GLOBALS['BACK_PATH'];
 
         if($this->updateNewsEventRecords($errorMessage, $affectedRows) == 0) {
-            $this->content .= $this->doc->section('','The update has been performed successfully: ' . $affectedRows . " row(s) affected.");
+            $this->content .= $this->doc->section('', 'The update has been performed successfully: ' . $affectedRows . ' row(s) affected.');
         } else {
-            $this->content .= $this->doc->section('','An error occurred while preforming updates. Error: ' . $errorMessage);
+            $this->content .= $this->doc->section('', 'An error occurred while preforming updates. Error: ' . $errorMessage);
         }
 
         return $this->content;
@@ -42,7 +42,7 @@ class ext_update extends t3lib_SCbase {
     protected function updateNewsEventRecords(&$errorMessage, &$affectedRows) {
         $errorCode      = 0;
         $affectedRows   = 0;
-        $result         = false;
+        $result         = FALSE;
 
         $result = $GLOBALS['TYPO3_DB']->exec_UPDATEquery(
             'tx_news_domain_model_news',
@@ -68,7 +68,7 @@ class ext_update extends t3lib_SCbase {
      *
      * @return boolean: returns true if update should be performed
      */
-    function access() {
+    public function access() {
         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
             'tx_news_domain_model_news.type',
             'tx_news_domain_model_news',
@@ -77,10 +77,10 @@ class ext_update extends t3lib_SCbase {
 
         // check if there are news records which must be updated
         if (($result !== FALSE) && ($GLOBALS['TYPO3_DB']->sql_num_rows($result) > 0)) {
-            return true;
+            return TRUE;
         }
 
-        return false;
+        return FALSE;
     }
 }
 
index b8691c2..27acb13 100644 (file)
@@ -3,7 +3,7 @@
 /***************************************************************
  * Extension Manager/Repository config file for ext "roq_newsevent".
  *
- * Auto generated 16-07-2013 13:55
+ * Auto generated 13-09-2013 10:07
  *
  * Manual updates:
  * Only the data in the array - everything else is removed by next
@@ -40,7 +40,7 @@ $EM_CONF[$_EXTKEY] = array(
                'suggests' => array(
                ),
        ),
-       '_md5_values_when_last_written' => 'a:47:{s:9:"Changelog";s:4:"084a";s:20:"class.ext_update.php";s:4:"47bb";s:12:"ext_icon.gif";s:4:"d6cc";s:17:"ext_localconf.php";s:4:"c834";s:14:"ext_tables.php";s:4:"9c2f";s:14:"ext_tables.sql";s:4:"9803";s:21:"ExtensionBuilder.json";s:4:"c6aa";s:38:"Classes/Controller/EventController.php";s:4:"8738";s:30:"Classes/Domain/Model/Event.php";s:4:"cd86";s:45:"Classes/Domain/Repository/EventRepository.php";s:4:"64a4";s:36:"Classes/ViewHelpers/IfViewHelper.php";s:4:"0625";s:38:"Classes/ViewHelpers/LinkViewHelper.php";s:4:"0155";s:43:"Classes/ViewHelpers/TranslateViewHelper.php";s:4:"e892";s:45:"Classes/ViewHelpers/Format/DateViewHelper.php";s:4:"f7f1";s:45:"Classes/ViewHelpers/Format/TimeViewHelper.php";s:4:"586d";s:45:"Classes/ViewHelpers/Format/TrimViewHelper.php";s:4:"b1fc";s:44:"Configuration/ExtensionBuilder/settings.yaml";s:4:"406d";s:27:"Configuration/TCA/Event.php";s:4:"a0fd";s:38:"Configuration/TypoScript/constants.txt";s:4:"c80e";s:34:"Configuration/TypoScript/setup.txt";s:4:"00b2";s:40:"Resources/Private/Language/locallang.xml";s:4:"eb43";s:70:"Resources/Private/Language/locallang_csh_tx_news_domain_model_news.xml";s:4:"9c21";s:43:"Resources/Private/Language/locallang_db.xml";s:4:"5fff";s:46:"Resources/Private/Partials/Category/Items.html";s:4:"7304";s:53:"Resources/Private/Partials/Detail/MediaContainer.html";s:4:"29ed";s:47:"Resources/Private/Partials/Detail/MediaDam.html";s:4:"df99";s:48:"Resources/Private/Partials/Detail/MediaHtml.html";s:4:"14e2";s:49:"Resources/Private/Partials/Detail/MediaImage.html";s:4:"4fdd";s:49:"Resources/Private/Partials/Detail/MediaVideo.html";s:4:"2993";s:48:"Resources/Private/Partials/Detail/Opengraph.html";s:4:"3410";s:42:"Resources/Private/Partials/Event/Item.html";s:4:"ab77";s:41:"Resources/Private/Partials/Event/Item.ics";s:4:"26ac";s:41:"Resources/Private/Partials/Event/Item.xml";s:4:"a115";s:46:"Resources/Private/Partials/EventList/Item.html";s:4:"c6d5";s:51:"Resources/Private/Templates/News/EventDateMenu.html";s:4:"d404";s:49:"Resources/Private/Templates/News/EventDetail.html";s:4:"0eac";s:48:"Resources/Private/Templates/News/EventDetail.ics";s:4:"ebd0";s:47:"Resources/Private/Templates/News/EventList.html";s:4:"4a1a";s:46:"Resources/Private/Templates/News/EventList.ics";s:4:"8638";s:46:"Resources/Private/Templates/News/EventList.xml";s:4:"6808";s:35:"Resources/Public/Icons/relation.gif";s:4:"e615";s:52:"Resources/Public/Icons/tx_news_domain_model_news.gif";s:4:"905a";s:45:"Tests/Unit/Controller/EventControllerTest.php";s:4:"33b1";s:37:"Tests/Unit/Domain/Model/EventTest.php";s:4:"0bbc";s:14:"doc/manual.pdf";s:4:"5612";s:14:"doc/manual.sxw";s:4:"1f4d";s:14:"doc/manual.txt";s:4:"eed9";}',
+       '_md5_values_when_last_written' => 'a:47:{s:9:"Changelog";s:4:"ad35";s:20:"class.ext_update.php";s:4:"6963";s:12:"ext_icon.gif";s:4:"d6cc";s:17:"ext_localconf.php";s:4:"c834";s:14:"ext_tables.php";s:4:"f31b";s:14:"ext_tables.sql";s:4:"9803";s:21:"ExtensionBuilder.json";s:4:"c6aa";s:38:"Classes/Controller/EventController.php";s:4:"ab4b";s:30:"Classes/Domain/Model/Event.php";s:4:"cd86";s:45:"Classes/Domain/Repository/EventRepository.php";s:4:"d477";s:36:"Classes/ViewHelpers/IfViewHelper.php";s:4:"0625";s:38:"Classes/ViewHelpers/LinkViewHelper.php";s:4:"0155";s:43:"Classes/ViewHelpers/TranslateViewHelper.php";s:4:"e892";s:45:"Classes/ViewHelpers/Format/DateViewHelper.php";s:4:"f7f1";s:45:"Classes/ViewHelpers/Format/TimeViewHelper.php";s:4:"586d";s:45:"Classes/ViewHelpers/Format/TrimViewHelper.php";s:4:"b1fc";s:44:"Configuration/ExtensionBuilder/settings.yaml";s:4:"406d";s:27:"Configuration/TCA/Event.php";s:4:"a0fd";s:38:"Configuration/TypoScript/constants.txt";s:4:"c80e";s:34:"Configuration/TypoScript/setup.txt";s:4:"00b2";s:40:"Resources/Private/Language/locallang.xml";s:4:"eb43";s:70:"Resources/Private/Language/locallang_csh_tx_news_domain_model_news.xml";s:4:"9c21";s:43:"Resources/Private/Language/locallang_db.xml";s:4:"5fff";s:46:"Resources/Private/Partials/Category/Items.html";s:4:"7304";s:53:"Resources/Private/Partials/Detail/MediaContainer.html";s:4:"29ed";s:47:"Resources/Private/Partials/Detail/MediaDam.html";s:4:"df99";s:48:"Resources/Private/Partials/Detail/MediaHtml.html";s:4:"14e2";s:49:"Resources/Private/Partials/Detail/MediaImage.html";s:4:"4fdd";s:49:"Resources/Private/Partials/Detail/MediaVideo.html";s:4:"2993";s:48:"Resources/Private/Partials/Detail/Opengraph.html";s:4:"3410";s:42:"Resources/Private/Partials/Event/Item.html";s:4:"ab77";s:41:"Resources/Private/Partials/Event/Item.ics";s:4:"26ac";s:41:"Resources/Private/Partials/Event/Item.xml";s:4:"a115";s:46:"Resources/Private/Partials/EventList/Item.html";s:4:"c6d5";s:51:"Resources/Private/Templates/News/EventDateMenu.html";s:4:"d404";s:49:"Resources/Private/Templates/News/EventDetail.html";s:4:"0eac";s:48:"Resources/Private/Templates/News/EventDetail.ics";s:4:"ebd0";s:47:"Resources/Private/Templates/News/EventList.html";s:4:"4a1a";s:46:"Resources/Private/Templates/News/EventList.ics";s:4:"8638";s:46:"Resources/Private/Templates/News/EventList.xml";s:4:"6808";s:35:"Resources/Public/Icons/relation.gif";s:4:"e615";s:52:"Resources/Public/Icons/tx_news_domain_model_news.gif";s:4:"905a";s:45:"Tests/Unit/Controller/EventControllerTest.php";s:4:"33b1";s:37:"Tests/Unit/Domain/Model/EventTest.php";s:4:"0bbc";s:14:"doc/manual.pdf";s:4:"1a9f";s:14:"doc/manual.sxw";s:4:"2c43";s:14:"doc/manual.txt";s:4:"cc3a";}',
 );
 
 ?>
\ No newline at end of file
index 4512be0..7f00fc1 100644 (file)
@@ -66,9 +66,15 @@ $tmp_roq_newsevent_columns = array(
        ),
 );
 
-t3lib_extMgm::addTCAcolumns('tx_news_domain_model_news',$tmp_roq_newsevent_columns);
+t3lib_extMgm::addTCAcolumns('tx_news_domain_model_news', $tmp_roq_newsevent_columns);
 
-t3lib_extMgm::addToAllTCAtypes('tx_news_domain_model_news', ',--div--;LLL:EXT:roq_newsevent/Resources/Private/Language/locallang_db.xml:tx_roqnewsevent_domain_model_event,');
-t3lib_extMgm::addToAllTCAtypes('tx_news_domain_model_news', 'tx_roqnewsevent_is_event, tx_roqnewsevent_startdate, tx_roqnewsevent_starttime, tx_roqnewsevent_enddate, tx_roqnewsevent_endtime, tx_roqnewsevent_location');
+t3lib_extMgm::addToAllTCAtypes(
+    'tx_news_domain_model_news',
+    ',--div--;LLL:EXT:roq_newsevent/Resources/Private/Language/locallang_db.xml:tx_roqnewsevent_domain_model_event,'
+);
+t3lib_extMgm::addToAllTCAtypes(
+    'tx_news_domain_model_news',
+    'tx_roqnewsevent_is_event, tx_roqnewsevent_startdate, tx_roqnewsevent_starttime, tx_roqnewsevent_enddate, tx_roqnewsevent_endtime, tx_roqnewsevent_location'
+);
 
 ?>
\ No newline at end of file