CGL cleanups
authorfrancois <francois@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 31 Aug 2010 09:47:13 +0000 (09:47 +0000)
committerfrancois <francois@735d13b6-9817-0410-8766-e36946ffe9aa>
Tue, 31 Aug 2010 09:47:13 +0000 (09:47 +0000)
Added autoloader configuration

git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/overlays/trunk@37484 735d13b6-9817-0410-8766-e36946ffe9aa

class.tx_overlays.php
ext_autoload.php [new file with mode: 0644]

index 854e0ad..e7cbafd 100644 (file)
@@ -117,14 +117,13 @@ class tx_overlays {
                                if (isset($GLOBALS['TSFE']->sys_language_contentOL) && isset($tableCtrlTCA['transOrigPointerField'])) {
                                        $languageCondition = $table . '.' . $tableCtrlTCA['languageField'] . ' IN (0,-1)'; // Default language and "all" language
 
-                                       // If current language is not default, select elements that exist only for current language
-                                       // That means elements that exist for current language but have no parent element
+                                               // If current language is not default, select elements that exist only for current language
+                                               // That means elements that exist for current language but have no parent element
                                        if ($GLOBALS['TSFE']->sys_language_content > 0) {
                                                $languageCondition .= ' OR (' . $table . '.' . $tableCtrlTCA['languageField'] . " = '" . $GLOBALS['TSFE']->sys_language_content . "' AND " . $table . '.' . $tableCtrlTCA['transOrigPointerField'] . " = '0')";
                                        }
-                               }
-                               else {
-                                       $languageCondition = $table.'.'.$tableCtrlTCA['languageField']." = '".$GLOBALS['TSFE']->sys_language_content."'";
+                               } else {
+                                       $languageCondition = $table . '.' . $tableCtrlTCA['languageField'] . " = '" . $GLOBALS['TSFE']->sys_language_content . "'";
                                }
                        }
                }
diff --git a/ext_autoload.php b/ext_autoload.php
new file mode 100644 (file)
index 0000000..f352cad
--- /dev/null
@@ -0,0 +1,11 @@
+<?php
+/* 
+ * Register necessary class names with autoloader
+ *
+ * $Id$
+ */
+$extensionPath = t3lib_extMgm::extPath('overlays');
+return array(
+       'tx_overlays' => $extensionPath . 'class.tx_overlays.php',
+);
+?>