[TASK] TYPO3 6.x compatibility fixes 05/24805/2
authorStefan Rotsch <stefan.rotsch@aoemedia.de>
Thu, 15 Aug 2013 12:46:33 +0000 (14:46 +0200)
committerStefan Rotsch <stefan.rotsch@aoemedia.de>
Tue, 15 Oct 2013 14:44:45 +0000 (16:44 +0200)
Change-Id: I15ef0d5918dde9cc11e1082760460257560bb25b
Reviewed-on: https://review.typo3.org/24805
Reviewed-by: Stefan Rotsch
Tested-by: Stefan Rotsch
75 files changed:
README.txt
class.tx_languagevisibility_beservices.php
class.tx_languagevisibility_feservices.php
class.tx_languagevisibility_fieldvisibility.php
classes/class.tx_languagevisibility_cacheManager.php
classes/class.tx_languagevisibility_celement.php
classes/class.tx_languagevisibility_element.php
classes/class.tx_languagevisibility_elementFactory.php
classes/class.tx_languagevisibility_fceelement.php
classes/class.tx_languagevisibility_fceoverlayelement.php
classes/class.tx_languagevisibility_language.php
classes/class.tx_languagevisibility_languagerepository.php
classes/class.tx_languagevisibility_pageelement.php
classes/class.tx_languagevisibility_recordelement.php
classes/class.tx_languagevisibility_reports_ConfigurationStatus.php
classes/class.tx_languagevisibility_ttnewselement.php
classes/class.tx_languagevisibility_visibility.php
classes/class.tx_languagevisibility_visibilityService.php
classes/dao/class.tx_languagevisibility_daocommon.php
classes/dao/class.tx_languagevisibility_daocommon_stub.php
classes/exceptions/class.tx_languagevisibility_InvalidRowException.php
doc/wizard_form.html
ext_autoload.php
ext_conf_template.txt
ext_emconf.php
ext_localconf.php
ext_tables.php
ext_tables.sql
hooks/class.tx_languagevisibility_hooks_alt_doc.php
hooks/class.tx_languagevisibility_hooks_aoe_wspreview.php
hooks/class.tx_languagevisibility_hooks_crawler.php
hooks/class.tx_languagevisibility_hooks_t3lib_page.php
hooks/class.tx_languagevisibility_hooks_t3lib_tcemain.php
hooks/class.tx_languagevisibility_hooks_t3lib_userauthgroup.php
hooks/class.tx_languagevisibility_hooks_templavoila_pi1.php
hooks/class.tx_languagevisibility_hooks_tslib_fe.php
hooks/class.tx_languagevisibility_hooks_tslib_menu.php
locallang_db.xml
modfunc1/class.tx_languagevisibility_modfunc1.php
modfunc1/locallang.xml
patch/core_4.2/class.ux_SCalt_doc.php [deleted file]
patch/core_4.2/class.ux_t3lib_beuserauth.php [deleted file]
patch/core_4.2/class.ux_t3lib_page.php [deleted file]
patch/core_4.2/class.ux_t3lib_tcemain.php [deleted file]
patch/core_4.2/class.ux_tslib_fe.php [deleted file]
patch/core_4.2/class.ux_tslib_menu.php [deleted file]
patch/core_4.2/class.ux_ux_tslib_menu.php [deleted file]
patch/core_4.3/class.ux_SCalt_doc.php [deleted file]
patch/core_4.3/class.ux_t3lib_beuserauth.php [deleted file]
patch/core_4.3/class.ux_t3lib_page.php [deleted file]
patch/core_4.3/class.ux_t3lib_tcemain.php [deleted file]
patch/core_4.3/class.ux_tslib_fe.php [deleted file]
patch/core_4.3/class.ux_tslib_menu.php [deleted file]
patch/core_4.3/class.ux_ux_tslib_menu.php [deleted file]
patch/lib/class.tx_languagevisibility_beUser.php
patch/lib/class.tx_languagevisibility_commandMap.php [deleted file]
patch/tv/class.ux_tx_templavoila_api.php [deleted file]
patch/tv/class.ux_tx_templavoila_module1.php [deleted file]
patch/tv/class.ux_tx_templavoila_pi1.php [deleted file]
tests/phpunit.xml
tests/tx_cacheManager_testcase.php
tests/tx_cachedWorkflow_testcase.php
tests/tx_elementFactory_testcase.php
tests/tx_element_testcase.php
tests/tx_environment_testcase.php
tests/tx_languageDB_testcase.php
tests/tx_language_testcase.php
tests/tx_languagerepository_testcase.php
tests/tx_languagevisibility_baseTestcase.php
tests/tx_languagevisibility_databaseTestcase.php
tests/tx_languagevisibility_databaseTtContentTestcase.php
tests/tx_languagevisibility_hooks_t3lib_page_testcase.php
tests/tx_visibilityBEService_testcase.php
tests/tx_visibilityServiceDB_testcase.php
tests/tx_visibilityService_testcase.php

index c61a67b..306526f 100644 (file)
@@ -1,19 +1,13 @@
-
 Add new translationMode for FCEs:
        <langDatabaseOverlay>1</langDatabaseOverlay>:
-       
+
        XML fields are merged with default record xml row if:
        <TCEforms type="array">
                        <l10n_mode>mergeIfNotBlank</l10n_mode>
        <TCEforms type="array">
                        <l10n_mode>exclude</l10n_mode>
        (use this for container fields for example)
-       
-       
-       
+
+
 Performance:
-* add index to sys_language_uid  and l18n_parent 
-       
-       
-Known issues:
-debug_backtrace() is used within the TYPO3 4.3 XCLASSes - this might cause errors on systems where this function is blacklisted
\ No newline at end of file
+* add index to sys_language_uid  and l18n_parent
index 1e74645..ee68ac5 100644 (file)
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_languagerepository.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_elementFactory.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_visibilityService.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/dao/class.tx_languagevisibility_daocommon.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'patch/lib/class.tx_languagevisibility_beUser.php');
-
 class tx_languagevisibility_beservices {
 
        protected static $cache_canBeUserCopyDelete = array();
@@ -52,12 +46,7 @@ class tx_languagevisibility_beservices {
                if (! $isCacheEnabled || ! isset($cacheData[$cacheKey])) {
 
                        $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-                       if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                               $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                               $elementfactory = new $elementfactoryName($dao);
-                       } else {
-                               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-                       }
+                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                        try {
                                $element = $elementfactory->getElementForTable($table, $uid);
                        } catch ( Exception $e ) {
@@ -91,15 +80,11 @@ class tx_languagevisibility_beservices {
         * @param boolean $overlay_ids
         * @return tx_languagevisibility_element
         */
-       public static function getElement($uid, $table, $overlay_ids = true) {
+       public static function getElement($uid, $table, $overlay_ids = TRUE) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $element = $elementfactory->getElementForTable($table, $uid, $overlay_ids);
+
                return $element;
        }
 
@@ -109,29 +94,25 @@ class tx_languagevisibility_beservices {
         * @param int $uid
         * @param string $table
         * @param int $languageUid
+        * @param bool $omitLocal
         * @return boolean
         */
-       public static function isVisible($uid, $table, $languageUid, $omitLocal=false) {
+       public static function isVisible($uid, $table, $languageUid, $omitLocal = FALSE) {
 
                $cacheKey = sprintf('%s:%d:%d:%d', $table, $uid, $languageUid, $omitLocal);
 
-               if (! isset(self::$cache_isVisible[$cacheKey])) {
+               if (!isset(self::$cache_isVisible[$cacheKey])) {
 
                        $rep = tx_languagevisibility_languagerepository::makeInstance();
                        $language = $rep->getLanguageById($languageUid);
 
                        $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-                       if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                               $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                               $elementfactory = new $elementfactoryName($dao);
-                       } else {
-                               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-                       }
+                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
 
                        try {
                                $element = $elementfactory->getElementForTable($table, $uid);
                        } catch ( Exception $e ) {
-                               return false;
+                               return FALSE;
                        }
 
                        $visibility = t3lib_div::makeInstance('tx_languagevisibility_visibilityService');
@@ -142,22 +123,22 @@ class tx_languagevisibility_beservices {
                return self::$cache_isVisible[$cacheKey];
        }
 
-        /**
+       /**
         * Helper function to check if the current backend user has rights to cut,copy or delete
         *
         * @return boolean
         */
        public static function canCurrrentUserCutCopyMoveDelete() {
-               //current element is no overlay -> if user has rights to cutMoveDelete or is an admin don't filter commants
-               /* @var $be_user tx_languagevisibility_beUser */
-               $be_user = t3lib_div::makeInstance('tx_languagevisibility_beUser');
-               $userId = $be_user->getUid();
-
-               if (! isset(self::$cache_canBeUserCopyDelete[$userId])) {
-                       if ($be_user->allowCutCopyMoveDelete() || $be_user->isAdmin()) {
-                               $result = true;
+                       //current element is no overlay -> if user has rights to cutMoveDelete or is an admin don't filter commants
+               /** @var $beUser tx_languagevisibility_beUser */
+               $beUser = t3lib_div::makeInstance('tx_languagevisibility_beUser');
+               $userId = $beUser->getUid();
+
+               if (!isset(self::$cache_canBeUserCopyDelete[$userId])) {
+                       if ($beUser->allowCutCopyMoveDelete() || $beUser->isAdmin()) {
+                               $result = TRUE;
                        } else {
-                               $result = false;
+                               $result = FALSE;
                        }
 
                        self::$cache_canBeUserCopyDelete[$userId] = $result;
@@ -175,27 +156,22 @@ class tx_languagevisibility_beservices {
         */
        public static function isOverlayRecord($row, $table) {
 
-               $result = false;
+               $result = FALSE;
 
                switch ($table) {
                        case 'pages_language_overlay' :
-                               $result = true;
+                               $result = TRUE;
                                break;
                        case 'pages' :
-                               $result = false;
+                               $result = FALSE;
                                break;
                        default:
 
-                               if(in_array($table, tx_languagevisibility_visibilityService::getSupportedTables())) {
-
-                                       global $TCA;
-                                       t3lib_div::loadTCA($table);
-                                       $tanslationIdField = $TCA[$table]['ctrl']['transOrigPointerField'];
-
+                               if (in_array($table, tx_languagevisibility_visibilityService::getSupportedTables())) {
+                                       $tanslationIdField = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'];
                                        if ($tanslationIdField != '') {
-                                               //if the field which points to the orginal of the translation is
-                                               //not 0 a translation exists and we have an overlay record
-
+                                                       // if the field which points to the orginal of the translation is
+                                                       // not 0 a translation exists and we have an overlay record
                                                $result = $row[$tanslationIdField] != 0;
                                        }
                                }
@@ -215,9 +191,9 @@ class tx_languagevisibility_beservices {
        public static function isSupportedTable($table) {
                $supported = tx_languagevisibility_visibilityService::getSupportedTables();
                if (in_array($table, $supported)) {
-                       return true;
+                       return TRUE;
                } else {
-                       return false;
+                       return FALSE;
                }
        }
 
@@ -230,35 +206,31 @@ class tx_languagevisibility_beservices {
         */
        public static function hasTranslationInAnyLanguage($uid, $table) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
+
                try {
                        $element = $elementfactory->getElementForTable($table, $uid);
                        $rep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                        $languages = $rep->getLanguages();
 
                        foreach ( $languages as $language ) {
-                               //skip default language
+                                       //skip default language
                                if ($language->getUid() != 0) {
                                        if ($element->hasTranslation($language->getUid())) {
-                                               return true;
+                                               return TRUE;
                                        }
                                }
                        }
                } catch ( UnexpectedValueException $e ) {
-                       //the element can not be handeld by language visibility
-                       return false;
+                               //the element can not be handeld by language visibility
+                       return FALSE;
                }
-               return false;
+               return FALSE;
        }
-       
+
        /**
         * Check if given element has traslation in given language
-        * 
+        *
         * @param int $elementUid
         * @param string $table
         * @param int $languageUid
@@ -266,23 +238,18 @@ class tx_languagevisibility_beservices {
         */
        public static function hasTranslation($elementUid, $table, $languageUid) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
 
-               $result = false;
+               $result = FALSE;
                try {
                        $element = $elementfactory->getElementForTable($table, $elementUid);
                        $result = $element->hasTranslation($languageUid);
-                       
+
                } catch ( UnexpectedValueException $e ) {
-                       //the element can not be handeld by language visibility
-                       $result = false;
+                               //the element can not be handeld by language visibility
+                       $result = FALSE;
                }
-               
+
                return $result;
        }
 
@@ -293,37 +260,35 @@ class tx_languagevisibility_beservices {
         * b) edit page record: only if the record is only visible in languages where the user has access to
         * b.1) also if the languages taht are visibile and falls back to allowed languages
         * c) delete: same as for edit (only if user has access to all visible languages)
-        **/
+        */
        public static function hasUserAccessToPageRecord($id, $cmd = 'edit') {
-
-               global $BE_USER;
                if ($cmd == 'new') {
-                       return true;
+                       return TRUE;
                }
-               if (! is_numeric($id)) {
-                       return false;
+               if (!is_numeric($id)) {
+                       return FALSE;
                }
                $rep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $languages = $rep->getLanguages();
                foreach ( $languages as $language ) {
-                       //echo 'check '.$language->getUid();
                        if (self::isVisible($id, 'pages', $language->getUid())) {
-                               if (! $BE_USER->checkLanguageAccess($language->getUid())) {
-                                       //no access to a visible language: check fallbacks
+                               if (!$GLOBALS['BE_USER']->checkLanguageAccess($language->getUid())) {
+                                               //no access to a visible language: check fallbacks
                                        $isInFallback = FALSE;
                                        $fallbacks = $language->getFallbackOrder(self::getContextElement('pages', $id));
-                                       foreach ( $fallbacks as $lId ) {
+                                       foreach ($fallbacks as $lId) {
                                                if ($GLOBALS['BE_USER']->checkLanguageAccess($lId)) {
                                                        $isInFallback = TRUE;
                                                        continue;
                                                }
                                        }
-                                       if (! $isInFallback)
-                                               return false;
+                                       if (!$isInFallback) {
+                                               return FALSE;
+                                       }
                                }
                        }
                }
-               return true;
+               return TRUE;
        }
 
        /**
@@ -331,69 +296,63 @@ class tx_languagevisibility_beservices {
         * that is the case if:
         * a) new page created -> always because then the languagevisibility is set to never for all languages where the user has no access
         * b) edit page record: only if the record is only visible in languages where the user has access to
-        **/
+        */
        public static function hasUserAccessToEditRecord($table, $id) {
-               global $BE_USER;
-
-               if (! is_numeric($id)) {
-                       return false;
+               if (!is_numeric($id)) {
+                       return FALSE;
                }
-               if (! self::isSupportedTable($table)) {
-                       return true;
+               if (!self::isSupportedTable($table)) {
+                       return TRUE;
                }
 
-               //check if overlay record:
+                       // check if overlay record:
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
                $row = $dao->getRecord($id, $table);
 
-               //@TODO check TCA for languagefield
+                       // @TODO check TCA for languagefield
                if (self::isOverlayRecord($row, $table)) {
 
-                       if ($BE_USER->checkLanguageAccess($row['sys_language_uid']))
-                               return true;
-                       else
-                               return false;
+                       if ($GLOBALS['BE_USER']->checkLanguageAccess($row['sys_language_uid'])) {
+                               return TRUE;
+                       } else {
+                               return FALSE;
+                       }
                }
 
                $rep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $languages = $rep->getLanguages();
-               foreach ( $languages as $language ) {
-                       if (tx_languagevisibility_beservices::isVisible($id, $table, $language->getUid())) {
-                               if (! $BE_USER->checkLanguageAccess($language->getUid())) {
-                                       //no access to a visible language: check fallbacks
+               foreach ($languages as $language) {
+                       if (self::isVisible($id, $table, $language->getUid())) {
+                               if (!$GLOBALS['BE_USER']->checkLanguageAccess($language->getUid())) {
+                                               // no access to a visible language: check fallbacks
                                        $isInFallback = FALSE;
                                        $fallbacks = $language->getFallbackOrder(self::getContextElement($table, $id));
-                                       foreach ( $fallbacks as $lId ) {
+                                       foreach ($fallbacks as $lId) {
                                                if ($GLOBALS['BE_USER']->checkLanguageAccess($lId)) {
-                                                       //TODO - write testcase - this can't be right
+                                                               // TODO - write testcase - this can't be right
                                                        $isInFallback = TRUE;
                                                        continue;
                                                }
                                        }
-                                       if (! $isInFallback)
-                                               return false;
+                                       if (!$isInFallback) {
+                                               return FALSE;
+                                       }
                                }
                        }
                }
-               return true;
+               return TRUE;
        }
 
        /**
-        *
-        * @param unknown_type $table
-        * @param unknown_type $id
-        * @return
+        * @param string $table
+        * @param int $id
+        * @return string
         */
        protected function getContextElement($table, $id) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                try {
-                       $element = $elementfactory->getElementForTable('pages', $uid);
+                       $element = $elementfactory->getElementForTable($table, $id);
                } catch ( Exception $e ) {
                        return '-';
                }
@@ -411,7 +370,7 @@ class tx_languagevisibility_beservices {
                if (is_array($confArr)) {
                        return ($confArr['inheritanceEnabled'] == 1);
                } else {
-                       return false;
+                       return FALSE;
                }
        }
 
@@ -425,7 +384,7 @@ class tx_languagevisibility_beservices {
                if (is_array($confArr)) {
                        return ($confArr['translatedAsDefaultEnabled'] == 1);
                } else {
-                       return false;
+                       return FALSE;
                }
        }
 
@@ -433,11 +392,13 @@ class tx_languagevisibility_beservices {
         * returns array with the visibility options that are allowed for the current user.
         *
         * @param tx_languagevisibility_language $language
+        * @param bool $isOverlay
+        * @param null $element
         * @return array
         */
-       public static function getAvailableOptionsForLanguage(tx_languagevisibility_language $language, $isOverlay = false, $element = null) {
+       public static function getAvailableOptionsForLanguage(tx_languagevisibility_language $language, $isOverlay = FALSE, $element = NULL) {
 
-               $element = $element === null ? self::getContextElement('pages', self::_guessCurrentPid()) : $element;
+               $element = $element === NULL ? self::getContextElement('pages', self::_guessCurrentPid()) : $element;
 
                $elementSupportsInheritance = $element->supportsInheritance();
 
@@ -464,11 +425,11 @@ class tx_languagevisibility_beservices {
                                $select['f'] = 'f';
                        }
 
-                       //check permissions, if user has no permission only no for the language is allowed
-                       // if the user has permissions for languages that act as fallbacklanguage: then the languages that falls back can have "-" in the options!
+                               //check permissions, if user has no permission only no for the language is allowed
+                               // if the user has permissions for languages that act as fallbacklanguage: then the languages that falls back can have "-" in the options!
                        if (! $GLOBALS['BE_USER']->checkLanguageAccess($uid)) {
 
-                               //check if the language falls back to one of the languages the user has permissions:
+                                       //check if the language falls back to one of the languages the user has permissions:
                                $isInFallback = FALSE;
                                $fallbacks = $language->getFallbackOrder($element);
                                foreach ( $fallbacks as $lId ) {
@@ -491,7 +452,7 @@ class tx_languagevisibility_beservices {
                                }
                        }
                } else {
-                       //overlays elements can only have "force to no" or "force to no inherited"
+                               //overlays elements can only have "force to no" or "force to no inherited"
                        $select['-'] = '-';
                        $select['no'] = 'no';
                        if ($useInheritance) {
@@ -503,7 +464,7 @@ class tx_languagevisibility_beservices {
                 * Get translations of labels from the locallang file
                 */
                if (is_object($GLOBALS['LANG'])) {
-                       //get value from locallang:
+                               //get value from locallang:
                        foreach ( $select as $k => $v ) {
                                $select[$k] = $GLOBALS['LANG']->sl('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.' . $v);
                        }
@@ -512,6 +473,9 @@ class tx_languagevisibility_beservices {
                return $select;
        }
 
+       /**
+        * @return mixed
+        */
        protected static function _guessCurrentPid() {
                return t3lib_div::_GP('id');
        }
@@ -528,7 +492,7 @@ class tx_languagevisibility_beservices {
                $languageList = $languageRep->getLanguages();
                $default = array();
                foreach ( $languageList as $language ) {
-                       $options = tx_languagevisibility_beservices::getAvailableOptionsForLanguage($language);
+                       $options = self::getAvailableOptionsForLanguage($language);
                        $default[$language->getUid()] = array_shift(array_keys($options));
 
                }
@@ -543,10 +507,7 @@ class tx_languagevisibility_beservices {
         * @return string
         */
        public static function getOriginalTableOfTranslation($table) {
-               global $TCA;
-               t3lib_div::loadTCA($table);
-
-               $translationTable = $TCA[$table]['ctrl']['transOrigPointerTable'];
+               $translationTable = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'];
                if ($translationTable != '') {
                        return $translationTable;
                } else {
@@ -562,14 +523,10 @@ class tx_languagevisibility_beservices {
         * @return string
         */
        public static function getOriginalUidOfTranslation($row, $table) {
-               global $TCA;
-               t3lib_div::loadTCA($table);
-
-               if (is_array($row) && is_array($TCA)) {
-                       return $row[$TCA[$table]['ctrl']['transOrigPointerField']];
+               if (is_array($row) && is_array($GLOBALS['TCA'])) {
+                       return $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];
                } else {
                        return 0;
                }
        }
 }
-?>
index e4565ec..1e06d29 100644 (file)
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_languagerepository.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_elementFactory.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_visibilityService.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/dao/class.tx_languagevisibility_daocommon.php');
-
 /**
  * exceptions are not handled here.
  * This class just provides simple services and uses the domainmodel in classes directory!
  *
  * Methods can be used uninstanciated
- **/
+ */
 class tx_languagevisibility_feservices {
 
+       /**
+        * @param $uid
+        * @param $table
+        * @param $lUid
+        * @return mixed
+        */
        public static function getFallbackOrderForElement($uid, $table, $lUid) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $element = $elementfactory->getElementForTable($table, $uid);
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $language = $languageRep->getLanguageById($lUid);
@@ -50,52 +46,59 @@ class tx_languagevisibility_feservices {
                return $language->getFallbackOrderElement($element);
        }
 
+       /**
+        * @param $uid
+        * @param $table
+        * @param $lUid
+        * @return mixed
+        */
        public static function checkVisiblityForElement($uid, $table, $lUid) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $element = $elementfactory->getElementForTable($table, $uid);
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $language = $languageRep->getLanguageById($lUid);
-
                $visibility = t3lib_div::makeInstance('tx_languagevisibility_visibilityService');
 
                return $visibility->isVisible($language, $element);
        }
 
+       /**
+        * @param $uid
+        * @param $table
+        * @return tx_languagevisibility_element
+        */
        public static function getElement($uid, $table) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       /* @var $elementfactory tx_languagevisibility_elementFactory */
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               /** @var $elementfactory tx_languagevisibility_elementFactory */
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $element = $elementfactory->getElementForTable($table, $uid);
+
                return $element;
        }
 
+       /**
+        * @param $element
+        * @param $lUid
+        * @return mixed
+        */
        public static function getOverlayLanguageIdForElement($element, $lUid) {
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $language = $languageRep->getLanguageById($lUid);
-
                $visibility = t3lib_div::makeInstance('tx_languagevisibility_visibilityService'); /** @var $visibility tx_languagevisibility_visibilityService */
+
                return $visibility->getOverlayLanguageIdForLanguageAndElement($language, $element);
        }
 
+       /**
+        * @param $uid
+        * @param $table
+        * @param $lUid
+        * @return mixed
+        */
        public static function getOverlayLanguageIdForElementRecord($uid, $table, $lUid) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $element = $elementfactory->getElementForTable($table, $uid);
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $language = $languageRep->getLanguageById($lUid);
@@ -104,14 +107,15 @@ class tx_languagevisibility_feservices {
                return $visibility->getOverlayLanguageIdForLanguageAndElement($language, $element);
        }
 
+       /**
+        * @param $uid
+        * @param $table
+        * @param $lUid
+        * @return mixed
+        */
        public static function getOverlayLanguageIdForElementRecordForced($uid, $table, $lUid) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $element = $elementfactory->getElementForTable($table, $uid);
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $language = $languageRep->getLanguageById($lUid);
@@ -123,7 +127,7 @@ class tx_languagevisibility_feservices {
 
        /**
         * Check if given element has traslation in given language
-        * 
+        *
         * @param int $elementUid
         * @param string $table
         * @param int $languageUid
@@ -131,25 +135,17 @@ class tx_languagevisibility_feservices {
         */
        public static function hasTranslation($elementUid, $table, $languageUid) {
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
 
-               $result = false;
+               $result = FALSE;
                try {
                        $element = $elementfactory->getElementForTable($table, $elementUid);
                        $result = $element->hasTranslation($languageUid);
-                       
                } catch ( UnexpectedValueException $e ) {
-                       //the element can not be handeld by language visibility
-                       $result = false;
+                               //the element can not be handeld by language visibility
+                       $result = FALSE;
                }
-               
+
                return $result;
-       }       
+       }
 }
-
-?>
index 58523c1..0ac9e1b 100644 (file)
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_languagerepository.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_elementFactory.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_visibilityService.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/dao/class.tx_languagevisibility_daocommon.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'class.tx_languagevisibility_beservices.php');
-
+/**
+ * Class tx_languagevisibility_fieldvisibility
+ */
 class tx_languagevisibility_fieldvisibility {
-       private $isNewElement = false;
+       private $isNewElement = FALSE;
        private $pageId = 0;
        private $modTSconfig = array();
 
-       function init() {
+       /**
+        * @return void
+        */
+       public function init() {
                $this->calcPerms = $GLOBALS['BE_USER']->calcPerms($pageInfoArr);
-
        }
 
+       /**
+        * @param $PA
+        * @param $fobj
+        * @return string
+        */
        public function user_fieldvisibility($PA, $fobj) {
                $this->init();
 
-               //init some class attributes
+                       //init some class attributes
                $this->pageId = $PA['row']['pid'];
                $uid = $PA['row']['uid'];
 
@@ -52,21 +56,13 @@ class tx_languagevisibility_fieldvisibility {
                        $this->pageId = $PA['row']['uid'];
                }
 
-               $_modTSconfig = $GLOBALS["BE_USER"]->getTSConfig('mod.languagevisibility', t3lib_BEfunc::getPagesTSconfig($this->pageId));
+               $_modTSconfig = $GLOBALS['BE_USER']->getTSConfig('mod.languagevisibility', t3lib_BEfunc::getPagesTSconfig($this->pageId));
                $this->modTSconfig = $_modTSconfig['properties'];
 
-               ###
-
-
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
 
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
 
                $value = $PA['row'][$PA['field']];
                $table = $PA['table'];
@@ -81,7 +77,7 @@ class tx_languagevisibility_fieldvisibility {
                        $uid = tx_languagevisibility_beservices::getOriginalUidOfTranslation($PA['row'], $table);
                        $table = tx_languagevisibility_beservices::getOriginalTableOfTranslation($table);
 
-                       //This element is an overlay therefore we need to render the visibility field just for the language of the overlay
+                               //This element is an overlay therefore we need to render the visibility field just for the language of the overlay
                        $overlayRecordsLanguage = $languageRep->getLanguageById($PA['row']['sys_language_uid']);
 
                        try {
@@ -90,9 +86,9 @@ class tx_languagevisibility_fieldvisibility {
                                return '';
                        }
 
-                       $infosStruct = $this->_getLanguageInfoStructurListForElementAndLanguageList($originalElement, array($overlayRecordsLanguage ), $PA['itemFormElName'], true);
+                       $infosStruct = $this->_getLanguageInfoStructurListForElementAndLanguageList($originalElement, array($overlayRecordsLanguage ), $PA['itemFormElName'], TRUE);
                } else {
-                       //This element is an original element (no overlay)
+                               //This element is an original element (no overlay)
                        try {
                                $originalElement = $elementfactory->getElementForTable($table, $uid);
                        } catch ( Exception $e ) {
@@ -106,10 +102,10 @@ class tx_languagevisibility_fieldvisibility {
                        }
 
                        $languageList = $languageRep->getLanguages();
-                       $infosStruct = $this->_getLanguageInfoStructurListForElementAndLanguageList($originalElement, $languageList, $PA['itemFormElName'], false);
+                       $infosStruct = $this->_getLanguageInfoStructurListForElementAndLanguageList($originalElement, $languageList, $PA['itemFormElName'], FALSE);
                }
 
-               $content .= $this->_renderLanguageInfos($infosStruct);
+               $content .= $this->renderLanguageInfos($infosStruct);
                return '<div id="fieldvisibility">' . $content . '<a href="#" onclick="resetSelectboxes()">reset</a></div>' . $this->_javascript();
        }
 
@@ -123,7 +119,7 @@ class tx_languagevisibility_fieldvisibility {
         * @param boolean $isOverlay
         * @return unknown
         */
-       function _getLanguageInfoStructurListForElementAndLanguageList($changeableElement, $languageList, $itemFormElName, $isOverlay) {
+       public function _getLanguageInfoStructurListForElementAndLanguageList($changeableElement, $languageList, $itemFormElName, $isOverlay) {
 
                $visibility = t3lib_div::makeInstance('tx_languagevisibility_visibilityService');
                $infosStruct = array();
@@ -132,8 +128,8 @@ class tx_languagevisibility_fieldvisibility {
 
                        $infoitem = array('visible' => $visibility->isVisible($language, $changeableElement), 'languageTitle' => $language->getTitle($this->pageId), 'languageFlag' => $language->getFlagImg($this->pageId), 'hasTranslation' => $changeableElement->hasTranslation($language->getUid()), 'isTranslation' => $isOverlay, 'isVisible' => $visibility->isVisible($language, $changeableElement), 'visibilityDescription' => $visibility->getVisibilityDescription($language, $changeableElement) );
 
-                       //if there is no access to language - and localsettings exist, then do not show select box
-                       //this is to not be able as an translator to override languagesetting
+                               // if there is no access to language - and localsettings exist, then do not show select box
+                               // this is to not be able as an translator to override languagesetting
                        $currentSetting = $changeableElement->getLocalVisibilitySetting($language->getUid());
                        $currentOptionsForUserAndLanguage = tx_languagevisibility_beservices::getAvailableOptionsForLanguage($language, $isOverlay, $changeableElement);
                        if ($currentSetting == '' || isset($currentOptionsForUserAndLanguage[$currentSetting])) {
@@ -155,7 +151,7 @@ class tx_languagevisibility_fieldvisibility {
                                                $defaultSelect = $this->modTSconfig['language.'][$language->getUid() . '.']['defaultVisibilityOnCreate'];
                                        }
                                }
-                               $selectBox = $this->_getSelectBox($language->getUid(), $currentOptionsForUserAndLanguage, $defaultSelect, $itemFormElName);
+                               $selectBox = $this->getSelectBox($language->getUid(), $currentOptionsForUserAndLanguage, $defaultSelect, $itemFormElName);
                        } else {
                                $selectBox = '<input type="hidden" name="' . $itemFormElName . '[' . $language->getUid() . ']" value="' . $currentSetting . '" ></input>(' . $currentSetting . ')';
                        }
@@ -183,7 +179,7 @@ class tx_languagevisibility_fieldvisibility {
         * @param string $name
         * @return string
         */
-       function _getSelectBox($languageid, $select, $current, $name) {
+       protected function getSelectBox($languageid, $select, $current, $name) {
                if (count($select) == 1) {
                        $addClassName = ' oneitem';
                }
@@ -207,7 +203,6 @@ class tx_languagevisibility_fieldvisibility {
         *
         * @param string
         * @return string
-        * @author Timo Schmidt <timo.schmidt@aoemedia.de>
         */
        protected function getCSSClassFromVisibilityKey($key) {
                switch ($key) {
@@ -225,7 +220,7 @@ class tx_languagevisibility_fieldvisibility {
                return $res;
        }
 
-       function _renderLanguageInfos($infosStruct) {
+       protected function renderLanguageInfos($infosStruct) {
                $content = '<style type="text/css">
                .visibilitytable  {margin: 10px 0 0 0}
                .visibilitytable  .bgColor4 {background-color: #C9B88B}
@@ -251,7 +246,7 @@ class tx_languagevisibility_fieldvisibility {
                foreach ( $infosStruct as $info ) {
                        $i ++;
 
-                       //toggle row class
+                               // toggle row class
                        $class = ($i % 2) ? ' class="bgColor"' : '';
                        $content .= '<tr' . $class . '>' . '<td>' . $info['languageFlag'] . $info['languageTitle'] . '</td>' . '<td>' . $info['originalVisibility'] . '</td>' . '<td>' . $info['overlayVisibility'] . '</td>' . '<td style="text-align: center">' . $this->_getStatusImage($info['hasTranslation'] || $info['isTranslation'], '') . '</td>' . '<td style="text-align: center"  class="lastcell">' . $this->_getStatusImage($info['isVisible'], $info['visibilityDescription']) . '</td>' . '</tr>';
                }
@@ -260,7 +255,11 @@ class tx_languagevisibility_fieldvisibility {
                return $content;
        }
 
-       function getLLL($key) {
+       /**
+        * @param $key
+        * @return mixed
+        */
+       public function getLLL($key) {
                return $GLOBALS['LANG']->sl('LLL:EXT:languagevisibility/locallang_db.xml:' . $key);
        }
 
@@ -268,6 +267,7 @@ class tx_languagevisibility_fieldvisibility {
         * Generated a little status icon
         *
         * @param boolean positive or negative state
+        * @param string $title
         * @return html tag to include the state image
         */
        protected function _getStatusImage($stat, $title = '') {
@@ -278,11 +278,9 @@ class tx_languagevisibility_fieldvisibility {
                }
        }
 
-       function _link_edit($table, $id) {
-               global $BACK_PATH;
+       protected function _link_edit($table, $id) {
                $params = '&table=' . $table . '&edit[' . $table . '][' . $id . ']=edit';
-               //$retUrl = 'returnUrl='.($requestUri==-1?"'+T3_THIS_LOCATION+'":rawurlencode($requestUri?$requestUri:t3lib_div::getIndpEnv('REQUEST_URI')));
-               $url = $BACK_PATH . "alt_doc.php?id=" . $id . $params;
+               $url = $GLOBALS['BACK_PATH'] . 'alt_doc.php?id=' . $id . $params;
                return '<a href="' . $url . '" target="blank">[edit]</a>';
        }
 
@@ -302,7 +300,7 @@ class tx_languagevisibility_fieldvisibility {
         * @return      string          HTML anchor tag containing the label and the correct link
         * @access protected
         */
-       function link_edit($label, $table, $uid, $forced = FALSE) {
+       public function link_edit($label, $table, $uid, $forced = FALSE) {
                if ($label) {
                        if (($table == 'pages' && ($this->calcPerms & 2) || $table != 'pages' && ($this->calcPerms & 16))) {
 
@@ -319,7 +317,10 @@ class tx_languagevisibility_fieldvisibility {
                return '';
        }
 
-       function _javascript() {
+       /**
+        * @return string
+        */
+       protected  function _javascript() {
 
                return '
 <script type="text/javascript">
@@ -356,9 +357,5 @@ function getElementsByClassName(class_name)
 }
 
 </script>';
-
        }
-
 }
-
-?>
index 00807ba..b3a4256 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_language.php');
-
 class tx_languagevisibility_cacheManager {
 
        /**
@@ -39,7 +38,7 @@ class tx_languagevisibility_cacheManager {
        /**
         * @var boolean
         */
-       protected static $enableCache = true;
+       protected static $enableCache = TRUE;
 
        /**
         * @var tx_languagevisibility_cacheManager
@@ -93,11 +92,10 @@ class tx_languagevisibility_cacheManager {
        /**
         * Use this method to force the cache usage.
         *
-        * @param $boolean
         * @return void
         */
        public static function enableCache() {
-               self::$enableCache = true;
+               self::$enableCache = TRUE;
        }
 
        /**
@@ -106,7 +104,7 @@ class tx_languagevisibility_cacheManager {
         * @return void
         */
        public static function disableCache() {
-               self::$enableCache = false;
+               self::$enableCache = FALSE;
        }
 
        /**
@@ -166,4 +164,3 @@ class tx_languagevisibility_cacheManager {
                trigger_error('Clone is not allowed for ' . get_class($this) . ' (Singleton)', E_USER_ERROR);
        }
 }
-?>
\ No newline at end of file
index 27e31c7..5b9ffca 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_recordelement.php');
-
 class tx_languagevisibility_celement extends tx_languagevisibility_recordelement {
 
        /**
@@ -38,7 +37,6 @@ class tx_languagevisibility_celement extends tx_languagevisibility_recordelement
         * @see classes/tx_languagevisibility_element#initialisations()
         */
        protected function initialisations() {
-
        }
 
        /**
@@ -50,4 +48,3 @@ class tx_languagevisibility_celement extends tx_languagevisibility_recordelement
                return $this->row['header'];
        }
 }
-?>
\ No newline at end of file
index 83231b9..4eef9ae 100644 (file)
@@ -21,6 +21,7 @@
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Abstract basis class for all elements (elements are any translateable records in the system)
  *
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_languagerepository.php');
-
-require_once (t3lib_extMgm::extPath('languagevisibility') . 'classes/class.tx_languagevisibility_cacheManager.php');
-
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/exceptions/class.tx_languagevisibility_InvalidRowException.php');
-
 abstract class tx_languagevisibility_element {
 
        /**
@@ -55,11 +50,10 @@ abstract class tx_languagevisibility_element {
         * @var array
         */
        private $overlayVisibilitySetting;
-         
 
        /**
-        *
         * @param $row
+        * @throws tx_languagevisibility_InvalidRowException
         * @return void
         */
        public function __construct($row) {
@@ -106,27 +100,23 @@ abstract class tx_languagevisibility_element {
         */
        protected function isRowOriginal($row) {
                if (!isset($row['l18n_parent']) && !isset($row['l10n_parent'])) {
-                          return true;
+                          return TRUE;
           }
           if (isset($row['l18n_parent']) && $row['l18n_parent'] == 0) {
-                          return true;
+                          return TRUE;
           }
           if (isset($row['l10n_parent']) && $row['l10n_parent'] == 0) {
-                               return true;
+                               return TRUE;
                }
-          return false;
+          return FALSE;
        }
 
        /**
         * possibility to add inits in subclasses
         **/
        protected function initialisations() {
-
        }
 
-       #############
-       # GET METHODS
-       #############
        /**
         * Returns the Uid of the Element
         *
@@ -208,8 +198,9 @@ abstract class tx_languagevisibility_element {
         * the default language record and the overlay record and returns the visibility. The visibility in the overlayrecord
         * can overwrite the visibility of its own language.
         *
+        * @param $languageid
         * @return string
-        **/
+        */
        public function getLocalVisibilitySetting($languageid) {
                $overlayVisibility = $this->getVisibilitySettingStoredInOverlayRecord($languageid);
                $localVisibility = $this->getVisibilitySettingStoredInDefaultRecord($languageid);
@@ -229,12 +220,11 @@ abstract class tx_languagevisibility_element {
        /**
         * Returns the global visibility setting for the element (saved in the overlay)
         *
+        * @param $languageid
         * @return string
         */
        public function getVisibilitySettingStoredInOverlayRecord($languageid) {
-               //if global visibility has not been determined, determine and cache it
-
-
+                       //if global visibility has not been determined, determine and cache it
                if (is_array($this->overlayVisibilitySetting)) {
                        if (! isset($this->overlayVisibilitySetting[$languageid])) {
                                $overlay = $this->getOverLayRecordForCertainLanguage($languageid);
@@ -280,26 +270,13 @@ abstract class tx_languagevisibility_element {
        }
 
        /**
-        * Returns all VisibilitySetting for this element.
-        *
-        * @todo we need to decide if local and global settings need to be merged
-        * @return array
-        */
-       #function getAllVisibilitySettings() {
-       #       return $this->allVisibilitySetting;
-       #}
-
-
-       /**
         * receive relevant fallbackOrder
         */
        function getFallbackOrder(tx_languagevisibility_language $language) {
                return $language->getFallbackOrder($this);
        }
 
-       ################
-       # STATE METHODS
-       ################
+
        /**
         * Check if the element is set to the default language
         *
@@ -316,9 +293,9 @@ abstract class tx_languagevisibility_element {
         */
        protected function isOrigElement() {
                if ($this->getOrigElementUid() > 0 ) {
-                          return false;
+                          return FALSE;
           }
-          return true;
+          return TRUE;
        }
 
        /**
@@ -328,9 +305,9 @@ abstract class tx_languagevisibility_element {
         */
        function isLanguageSetToAll() {
                if ($this->row['sys_language_uid'] == '-1') {
-                       return true;
+                       return TRUE;
                } else {
-                       return false;
+                       return FALSE;
                }
        }
 
@@ -359,8 +336,9 @@ abstract class tx_languagevisibility_element {
 
        /**
         * Compare element-language and foreign language.
+        * @ todo make this method work for pages
         *
-        * @todo make this method work for pages
+        * @param tx_languagevisibility_language $language
         * @return boolean
         */
        public function languageEquals(tx_languagevisibility_language $language) {
@@ -370,8 +348,9 @@ abstract class tx_languagevisibility_element {
        /**
         * Checks if this element has a translation, therefor several DB accesses are required
         *
+        * @param $languageid
         * @return boolean
-        **/
+        */
        public function hasTranslation($languageid) {
 
                $result = FALSE;
@@ -393,9 +372,9 @@ abstract class tx_languagevisibility_element {
         */
        public function hasAnyTranslationInAnyWorkspace() {
                if ($this->hasOverLayRecordForAnyLanguageInAnyWorkspace()) {
-                       return true;
+                       return TRUE;
                } else {
-                       return false;
+                       return FALSE;
                }
        }
 
@@ -406,7 +385,7 @@ abstract class tx_languagevisibility_element {
         * @param int $langid
         */
        protected function _hasOverlayRecordForLanguage($langid) {
-               $row = $this->getOverLayRecordForCertainLanguage($langid, true);
+               $row = $this->getOverLayRecordForCertainLanguage($langid, TRUE);
                return $row['uid'] != '';
        }
 
@@ -436,7 +415,7 @@ abstract class tx_languagevisibility_element {
         * @return boolean
         */
        public function supportsInheritance() {
-               return false;
+               return FALSE;
        }
 
        ################
@@ -458,7 +437,7 @@ abstract class tx_languagevisibility_element {
         * @param $onlyUid
         * @return array
         */
-       public function getOverLayRecordForCertainLanguage($languageId, $onlyUid = false) {
+       public function getOverLayRecordForCertainLanguage($languageId, $onlyUid = FALSE) {
                //get caching hints
                $table = $this->getTable();
                $uid = $this->getUid();
@@ -515,8 +494,8 @@ abstract class tx_languagevisibility_element {
         * certain language. The result is cached be the method getOverLayRecordForCertainLanguage.
         *
         * @param int $languageId
-        * @param int $onlyUid
+        * @return
+        * @internal param int $onlyUid
         */
        abstract protected function getOverLayRecordForCertainLanguageImplementation($languageId);
 }
-?>
index dc7dd92..26778b8 100644 (file)
@@ -27,8 +27,6 @@
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once t3lib_extMgm::extPath('languagevisibility') . 'classes/class.tx_languagevisibility_cacheManager.php';
-require_once (PATH_t3lib . 'class.t3lib_page.php');
 
 class tx_languagevisibility_elementFactory {
 
@@ -47,13 +45,13 @@ class tx_languagevisibility_elementFactory {
        /**
         * Returns ready initialised "element" object. Depending on the element the correct element class is used. (e.g. page/content/fce)
         *
-        * @param $table        table
-        * @param $uid  identifier
-        * @param $overlay_ids boolean parameter to overlay uids if the user is in workspace context
-        *
-        * @throws Unknown_Element_Exception
-        **/
-       function getElementForTable($table, $uid, $overlay_ids = true) {
+        * @param string $table table
+        * @param int $uid identifier
+        * @param bool $overlay_ids boolean parameter to overlay uids if the user is in workspace context
+        * @throws UnexpectedValueException
+        * @return \tx_languagevisibility_element
+        */
+       public function getElementForTable($table, $uid, $overlay_ids = TRUE) {
 
                if (!is_numeric($uid) || (intval($uid) === 0)) {
                                // no uid => maybe NEW element in BE
@@ -66,62 +64,32 @@ class tx_languagevisibility_elementFactory {
                        }
                }
 
-               //@todo isSupported table
-               /* @var $element tx_languagevisibility_element */
+               // @todo isSupported table
+               /** @var tx_languagevisibility_element $element*/
                switch ($table) {
                        case 'pages' :
-                               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                                       require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_pageelement.php');
-                                       $elementclass = t3lib_div::makeInstanceClassName('tx_languagevisibility_pageelement');
-                                       $element = new $elementclass($row);
-                               } else {
-                                       $element = t3lib_div::makeInstance('tx_languagevisibility_pageelement', $row);
-                               }
+                               $element = t3lib_div::makeInstance('tx_languagevisibility_pageelement', $row);
                                break;
                        case 'tt_news' :
-                               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                                       require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_ttnewselement.php');
-                                       $elementclass = t3lib_div::makeInstanceClassName('tx_languagevisibility_ttnewselement');
-                                       $element = new $elementclass($row);
-                               } else {
-                                       $element = t3lib_div::makeInstance('tx_languagevisibility_ttnewselement', $row);
-                               }
+                               $element = t3lib_div::makeInstance('tx_languagevisibility_ttnewselement', $row);
                                break;
                        case 'tt_content' :
                                if ($row['CType'] == 'templavoila_pi1') {
-                                       //read DS:
+                                               // read DS:
                                        $srcPointer = $row['tx_templavoila_ds'];
                                        $DS = $this->_getTVDS($srcPointer);
                                        if (is_array($DS)) {
                                                if ($DS['meta']['langDisable'] == 1 && $DS['meta']['langDatabaseOverlay'] == 1) {
-                                                       //handle as special FCE with normal tt_content overlay:
-                                                       if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                                                               require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_fceoverlayelement.php');
-                                                               $elementclass = t3lib_div::makeInstanceClassName('tx_languagevisibility_fceoverlayelement');
-                                                               $element = new $elementclass($row);
-                                                       } else {
-                                                               $element = t3lib_div::makeInstance('tx_languagevisibility_fceoverlayelement', $row);
-                                                       }
+                                                               // handle as special FCE with normal tt_content overlay:
+                                                       $element = t3lib_div::makeInstance('tx_languagevisibility_fceoverlayelement', $row);
                                                } else {
-                                                       if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                                                               require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_fceelement.php');
-                                                               $elementclass = t3lib_div::makeInstanceClassName('tx_languagevisibility_fceelement');
-                                                               $element = new $elementclass($row, $DS);
-                                                       } else {
-                                                               $element = t3lib_div::makeInstance('tx_languagevisibility_fceelement', $row, $DS);
-                                                       }
+                                                       $element = t3lib_div::makeInstance('tx_languagevisibility_fceelement', $row, $DS);
                                                }
                                        } else {
                                                throw new UnexpectedValueException($table . ' uid:' . $row['uid'] . ' has no valid Datastructure ', 1195039394);
                                        }
                                } else {
-                                       if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                                               require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_celement.php');
-                                               $elementclass = t3lib_div::makeInstanceClassName('tx_languagevisibility_celement');
-                                               $element = new $elementclass($row);
-                                       } else {
-                                               $element = t3lib_div::makeInstance('tx_languagevisibility_celement', $row);
-                                       }
+                                       $element = t3lib_div::makeInstance('tx_languagevisibility_celement', $row);
                                }
                                break;
                        default:
@@ -133,8 +101,7 @@ class tx_languagevisibility_elementFactory {
                                        }
                                } elseif (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['languagevisibility']['recordElementSupportedTables'][$table])) {
                                        $element = $this->getElementInstance('tx_languagevisibility_recordelement', $row);
-                               }
-                               else {
+                               } else {
                                        throw new UnexpectedValueException($table . ' not supported ', 1195039394);
                                }
                                break;
@@ -178,6 +145,7 @@ class tx_languagevisibility_elementFactory {
         * configured or is the first element of the rootline
         *
         * @param tx_languagevisibility_element $element
+        * @param $language
         * @return array $elements (collection of tx_languagevisibility_element)
         */
        public function getParentElementsFromElement(tx_languagevisibility_element $element, $language) {
@@ -216,8 +184,10 @@ class tx_languagevisibility_elementFactory {
         *
         * @todo The rooline can be build in a smarter way, once the rootline for a page has been created
         * same parts of the rootline not have to be calculated twice.
-        *
-        * @param       integer         The page uid for which to seek back to the page tree root.
+        * @param $uid
+        * @param $languageid
+        * @return array
+        * @internal param \The $integer page uid for which to seek back to the page tree root.
         * @see tslib_fe::getPageAndRootline()
         */
        protected function getOverlayedRootLine($uid, $languageid) {
@@ -232,15 +202,14 @@ class tx_languagevisibility_elementFactory {
 
                        $uid = intval($uid);
 
-                       // Initialize:
-                       $selFields = t3lib_div::uniqueList('pid,uid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_swapmode,title,alias,nav_title,media,layout,hidden,starttime,endtime,fe_group,extendToSubpages,doktype,TSconfig,storage_pid,is_siteroot,mount_pid,mount_pid_ol,fe_login_mode,' . $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields']);
+                               // Initialize:
+                       $selFields = t3lib_div::uniqueList('pid,uid,t3ver_oid,t3ver_wsid,t3ver_state,title,alias,nav_title,media,layout,hidden,starttime,endtime,fe_group,extendToSubpages,doktype,TSconfig,storage_pid,is_siteroot,mount_pid,mount_pid_ol,fe_login_mode,' . $GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields']);
 
                        $loopCheck = 0;
                        $theRowArray = Array();
 
                        while ($uid != 0 && $loopCheck < 20) { // Max 20 levels in the page tree.
 
-
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($selFields, 'pages', 'uid=' . intval($uid) . ' AND pages.deleted=0 AND pages.doktype!=255');
                                $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                                $GLOBALS['TYPO3_DB']->sql_free_result($res);
@@ -250,18 +219,14 @@ class tx_languagevisibility_elementFactory {
                                        $sys_page->fixVersioningPid('pages', $row);
 
                                        if (is_array($row)) {
-                                               // Mount Point page types are allowed ONLY a) if they are the outermost record in rootline and b) if the overlay flag is not set:
+                                                       // Mount Point page types are allowed ONLY a) if they are the outermost record in rootline and b) if the overlay flag is not set:
                                                $uid = $row['pid']; // Next uid
                                        }
-                                       // Add row to rootline with language overlaid:
-                                       if (version_compare(TYPO3_version, '4.3', '>')) {
-                                               $langvisHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'];
-                                               unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility']);
-                                               $theRowArray[] = $sys_page->getPageOverlay($row, $languageid);
-                                               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'] = $langvisHook;
-                                       } else {
-                                               $theRowArray[] = $sys_page->_original_getPageOverlay($row, $languageid);
-                                       }
+                                               // Add row to rootline with language overlaid:
+                                       $langvisHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'];
+                                       unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility']);
+                                       $theRowArray[] = $sys_page->getPageOverlay($row, $languageid);
+                                       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'] = $langvisHook;
                                } else {
                                        return array(); // broken rootline.
                                }
@@ -269,7 +234,7 @@ class tx_languagevisibility_elementFactory {
                                $loopCheck++;
                        }
 
-                       // Create output array (with reversed order of numeric keys):
+                               // Create output array (with reversed order of numeric keys):
                        $output = Array();
                        $c = count($theRowArray);
                        foreach ($theRowArray as $key => $val) {
@@ -298,11 +263,7 @@ class tx_languagevisibility_elementFactory {
 
                if (!$isCacheEnabled || !isset($cacheData[$srcPointer])) {
                        $DS = array();
-                       if (version_compare(TYPO3_version, '4.6.0', '>=')) {
-                               $srcPointerIsInteger = t3lib_utility_Math::convertToPositiveInteger($srcPointer);
-                       } else {
-                               $srcPointerIsInteger = t3lib_div::intval_positive($srcPointer);
-                       }
+                       $srcPointerIsInteger = t3lib_utility_Math::convertToPositiveInteger($srcPointer);
                        if ($srcPointerIsInteger) { // If integer, then its a record we will look up:
                                $sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
                                $DSrec = $sys_page->getRawRecord('tx_templavoila_datastructure', $srcPointer, 'dataprot');
@@ -328,15 +289,6 @@ class tx_languagevisibility_elementFactory {
         * @return tx_languagevisibility_element
         */
        private function getElementInstance($name, $row) {
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.' . $name . '.php');
-                       $elementclass = t3lib_div::makeInstanceClassName($name);
-                       return new $elementclass($row);
-               } else {
-                       return t3lib_div::makeInstance($name, $row);
-               }
+               return t3lib_div::makeInstance($name, $row);
        }
-
 }
-
-?>
index ff2421a..3ba3192 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_element.php');
-
-require_once (PATH_t3lib . 'class.t3lib_flexformtools.php');
-
 class tx_languagevisibility_fceelement extends tx_languagevisibility_recordelement {
 
        private $langIsoCodeForFlexFormCallback = '';
@@ -39,7 +36,7 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
        private $langDatabaseOverlay;
        private $disabledIsVisible;
 
-       //flags which are set during processings
+               // flags which are set during processings
        private $_callBackFoundOverlay = FALSE;
 
        public function __construct($row, $DS) {
@@ -79,13 +76,13 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
                $this->langIsoCodeForFlexFormCallback = strtoupper($language->getIsoCode());
                $this->_callBackFoundOverlay = FALSE;
 
-               // Get data structure:
+                       // Get data structure:
                if ($this->langDisabled == 1 && !$this->langDatabaseOverlay) {
-                       //the FCE has langDisabled: this means there is no overlay
+                               // the FCE has langDisabled: this means there is no overlay
                        if ($this->disabledIsVisible == 1) {
-                               return true;
+                               return TRUE;
                        } else {
-                               return false;
+                               return FALSE;
                        }
                }
 
@@ -94,9 +91,7 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
                }
 
                if ($this->langChildren == 1) {
-                       //the FCE has real overlay record
-
-
+                               // the FCE has real overlay record
                        $flexObj = t3lib_div::makeInstance('t3lib_flexformtools');
                        if ($this->row['tx_templavoila_flex']) {
                                $return = $flexObj->traverseFlexFormXMLData('tt_content', 'tx_templavoila_flex', $this->row, $this, '_hasOverlayRecordForLanguage_Inheritance_flexFormCallBack');
@@ -105,19 +100,18 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
                                }
                                return $this->_callBackFoundOverlay;
                        } else {
-                               //in case no xml yet (new created?)
-                               return false;
+                                       // in case no xml yet (new created?)
+                               return FALSE;
                        }
                } else {
-                       //the FCE has no real overlay record
+                               //      the FCE has no real overlay record
                        $flexObj = t3lib_div::makeInstance('t3lib_flexformtools');
                        $flexObj->traverseFlexFormXMLData('tt_content', 'tx_templavoila_flex', $this->row, $this, '_hasOverlayRecordForLanguage_Seperate_flexFormCallBack');
                        return $this->_callBackFoundOverlay;
                }
        }
 
-       function getOverLayRecordForCertainLanguageImplementation($languageId, $onlyUid = FALSE) {
-
+       public function getOverLayRecordForCertainLanguageImplementation($languageId, $onlyUid = FALSE) {
                $useDefaultLang = $this->langDisabled == 1 && !$this->langDatabaseOverlay;
                return parent::getOverLayRecordForCertainLanguageImplementation($useDefaultLang ? 0 : $languageId, $onlyUid);
        }
@@ -133,14 +127,13 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
         * @return      void
         */
        public function _hasOverlayRecordForLanguage_Inheritance_flexFormCallBack($dsArr, $dataValue, $PA, $structurePath, &$pObj) {
-
                if ($this->langIsoCodeForFlexFormCallback == '') {
-                       return false;
+                       return FALSE;
                }
 
-               // Only take lead from default values (since this is "Inheritance" localization we parse for)
-               if (substr($structurePath, - 5) == '/vDEF') {
-                       $baseStructPath = substr($structurePath, 0, - 3);
+                       // Only take lead from default values (since this is "Inheritance" localization we parse for)
+               if (substr($structurePath, -5) == '/vDEF') {
+                       $baseStructPath = substr($structurePath, 0, -3);
                        $structurePath = $baseStructPath . $this->langIsoCodeForFlexFormCallback;
                        $translValue = $pObj->getArrayValueByPath($structurePath, $pObj->traverseFlexFormXMLData_Data);
                        if ($this->_isFlexFieldFilled($dsArr['TCEforms']['config'], $translValue)) {
@@ -151,9 +144,9 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
 
        protected function _isFlexFieldFilled($cfg, $translValue) {
                if (($cfg['type'] == 'check' && $translValue != 0) || ($cfg['type'] != 'check' && $translValue != '')) {
-                       return true;
+                       return TRUE;
                } else {
-                       return false;
+                       return FALSE;
                }
 
        }
@@ -168,11 +161,11 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
         * @param       object          Reference to parent object
         * @return      void
         */
-       function _hasOverlayRecordForLanguage_Seperate_flexFormCallBack($dsArr, $dataValue, $PA, $structurePath, &$pObj) {
+       public function _hasOverlayRecordForLanguage_Seperate_flexFormCallBack($dsArr, $dataValue, $PA, $structurePath, &$pObj) {
                if ($this->langIsoCodeForFlexFormCallback == '') {
-                       return false;
+                       return FALSE;
                }
-               //path like: data/sDEF/lDEF/field_links/el/1/field_link/el/field_link_text/vDEF
+                       //path like: data/sDEF/lDEF/field_links/el/1/field_link/el/field_link_text/vDEF
                if (strpos($structurePath, '/lDEF/')) {
                        $structurePath = str_replace('/lDEF/', '/l' . $this->langIsoCodeForFlexFormCallback . '/', $structurePath);
                        $translValue = $pObj->getArrayValueByPath($structurePath, $pObj->traverseFlexFormXMLData_Data);
@@ -183,10 +176,6 @@ class tx_languagevisibility_fceelement extends tx_languagevisibility_recordeleme
                }
        }
 
-       function hasOverLayRecordForAnyLanguageInAnyWorkspace() {
-
+       public function hasOverLayRecordForAnyLanguageInAnyWorkspace() {
        }
-
 }
-
-?>
index ddbacb1..b2c1565 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_celement.php');
-
 class tx_languagevisibility_fceoverlayelement extends tx_languagevisibility_celement {
 
        function getInformativeDescription() {
                if ($this->isLanguageSetToAll()) {
-                        return 'Language is set to all. Visible in every language';
-                }
-
+                       return 'Language is set to all. Visible in every language';
+               }
                return 'this is a flexible content element but translations are handled with overlay records.';
        }
 
@@ -43,5 +41,3 @@ class tx_languagevisibility_fceoverlayelement extends tx_languagevisibility_cele
                return 'FCE-Overlay';
        }
 }
-
-?>
index 073dac4..5537456 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_languagerepository.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/dao/class.tx_languagevisibility_daocommon.php');
-
-/**
- * @author timo
- *
- */
 class tx_languagevisibility_language {
 
        /**
@@ -83,9 +77,9 @@ class tx_languagevisibility_language {
         * @return array
         */
        public function getFallbackOrder(tx_languagevisibility_element $contextElement) {
-               //determine and explode only once
+                       // determine and explode only once
                if (! isset($this->defaultFallBackOrderArray)) {
-                       //unfortunatly defaultlangauge is 999 instead of 0 (reason in formrendering of typo3):
+                               // unfortunatly defaultlangauge is 999 instead of 0 (reason in formrendering of typo3):
                        $tx_languagevisibility_fallbackorder = str_replace('999', '0', $this->row['tx_languagevisibility_fallbackorder']);
                        $this->defaultFallBackOrderArray = t3lib_div::trimExplode(',', $tx_languagevisibility_fallbackorder);
                }
@@ -99,7 +93,7 @@ class tx_languagevisibility_language {
         * @return array
         */
        public function getFallbackOrderElement(tx_languagevisibility_element $contextElement) {
-               //determine and explode only once
+                       // determine and explode only once
                if (! isset($this->elementFallBackOrderArray)) {
                        if ($this->usesComplexFallbackSettings()) {
                                $tx_languagevisibility_fallbackorderel = str_replace('999', '0', $this->row['tx_languagevisibility_fallbackorderel']);
@@ -119,7 +113,7 @@ class tx_languagevisibility_language {
         * @return array
         */
        public function getFallbackOrderTTNewsElement(tx_languagevisibility_element $contextElement) {
-               //determine and explode only once
+                       // determine and explode only once
                if (! isset($this->newsFallBackOrderArray)) {
                        if ($this->usesComplexFallbackSettings()) {
                                $tx_languagevisibility_fallbackorderttnewel = str_replace('999', '0', $this->row['tx_languagevisibility_fallbackorderttnewsel']);
@@ -173,6 +167,7 @@ class tx_languagevisibility_language {
        /**
         * Method to read the defaultVisibility setting of pages.
         *
+        * @param tx_languagevisibility_element $contextElement
         * @return string
         */
        public function getDefaultVisibilityForPage( tx_languagevisibility_element $contextElement) {
@@ -182,6 +177,7 @@ class tx_languagevisibility_language {
        /**
         * Method to read the defaultVisibility for elements
         *
+        * @param tx_languagevisibility_element $contextElement
         * @return string
         */
        public function getDefaultVisibilityForElement( tx_languagevisibility_element $contextElement) {
@@ -191,6 +187,7 @@ class tx_languagevisibility_language {
        /**
         * Method to read the visibility for tt news Elements.
         *
+        * @param tx_languagevisibility_element $contextElement
         * @return boolean
         */
        public function getDefaultVisibilityForTTNewsElement( tx_languagevisibility_element $contextElement) {
@@ -240,7 +237,7 @@ class tx_languagevisibility_language {
         */
        public function getIsoCode() {
                if (! isset($this->lg_iso_2)) {
-                       // Finding the ISO code:
+                               // Finding the ISO code:
                        $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('lg_iso_2', 'static_languages', 'uid=' . intval($this->row['static_lang_isocode']), '', '');
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
                        $this->lg_iso_2 = $row['lg_iso_2'];
@@ -257,8 +254,9 @@ class tx_languagevisibility_language {
         */
        public function getTitle($pidForDefault = '') {
                if ($this->getUid() == '0') {
-                       if ($pidForDefault == '')
+                       if ($pidForDefault == '') {
                                $pidForDefault = $this->_guessCurrentPid();
+                       }
                        $sharedTSconfig = t3lib_BEfunc::getModTSconfig($pidForDefault, 'mod.SHARED');
 
                        return strlen($sharedTSconfig['properties']['defaultLanguageLabel']) ? $sharedTSconfig['properties']['defaultLanguageLabel'] : 'Default';
@@ -275,26 +273,16 @@ class tx_languagevisibility_language {
         * @param  Optional the pid of the page. This can be used to get the correct flag for default language (which is set in tsconfig)
         **/
        public function getFlagImg($pidForDefault = '') {
-               global $BACK_PATH;
-
                $cache_key = 'pid:' . $pidForDefault . 'uid:' . $this->getUid();
                if ( !isset(self::$flagCache[$cache_key]) ) {
-                       if (version_compare(TYPO3_version,'4.5','<')) {
-                               $flagPath = $this->getFlagImgPath($pidForDefault, $BACK_PATH);
-                               if ($flagPath) {
-                                       self::$flagCache[$cache_key] = '<img src="' . $flagPath . '" title="' . $this->getTitle($pidForDefault) . '-' . $this->getIsoCode() . ' [' . $this->getUid() . ']">';
-                               } else {
-                                       self::$flagCache[$cache_key] = '';
-                               }
-                       } else {
-                               self::$flagCache[$cache_key] = t3lib_iconWorks::getSpriteIcon($this->getFlagName($pidForDefault));
-                       }
+                       self::$flagCache[$cache_key] = t3lib_iconWorks::getSpriteIcon($this->getFlagName($pidForDefault));
                }
 
                return self::$flagCache[$cache_key];
        }
 
        /**
+        * @param string $pidForDefault
         * @return string
         */
        protected function getFlagName($pidForDefault = '') {
@@ -319,7 +307,7 @@ class tx_languagevisibility_language {
                                $pidForDefault = $this->_guessCurrentPid();
                        }
                        $sharedTSconfig = t3lib_BEfunc::getModTSconfig($pidForDefault, 'mod.SHARED');
-                       $path = strlen($sharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath . $sharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath . $sharedTSconfig['properties']['defaultLanguageFlag'] : null;
+                       $path = strlen($sharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath . $sharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath . $sharedTSconfig['properties']['defaultLanguageFlag'] : NULL;
                } else {
                        $path = $flagIconPath . $this->row['flag'];
                }
@@ -331,12 +319,11 @@ class tx_languagevisibility_language {
         * (used for permission options in the backend)
         *
         * @param int uid
+        * @param tx_languagevisibility_element $el
         * @return boolean
-        **/
+        */
        public function isLanguageUidInFallbackOrder($uid, tx_languagevisibility_element $el) {
                $fallbacks = $this->getFallbackOrder($el);
                return in_array($uid, $fallbacks);
        }
 }
-
-?>
\ No newline at end of file
index 57880e4..391fb03 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_cacheManager.php');
-
 class tx_languagevisibility_languagerepository {
 
        protected static $instance;
@@ -87,7 +86,7 @@ class tx_languagevisibility_languagerepository {
         * @see tx_languagevisibility_language
         * @return array
         */
-       function getLanguages() {
+       public function getLanguages() {
                $return = array();
                $results = $this->getCachedOrUncacheResults();
 
@@ -106,7 +105,7 @@ class tx_languagevisibility_languagerepository {
         *
         * @return array
         */
-       function getLanguagesForBEUser() {
+       public function getLanguagesForBEUser() {
                $return = array();
                $results = $this->getCachedOrUncacheResults();
 
@@ -184,4 +183,3 @@ class tx_languagevisibility_languagerepository {
                return self::$instance;
        }
 }
-?>
\ No newline at end of file
index 4eb110e..ce8c6b6 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_element.php');
-
 class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
 
        /**
@@ -39,7 +38,7 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         * @return boolean
         */
        protected function isOrigElement() {
-               return true;
+               return TRUE;
        }
 
        /**
@@ -58,8 +57,8 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         *
         * @return boolean
         */
-       function isLanguageSetToDefault() {
-               return true;
+       public function isLanguageSetToDefault() {
+               return TRUE;
        }
 
        /**
@@ -67,7 +66,7 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         *
         * @return string
         */
-       function getInformativeDescription() {
+       public function getInformativeDescription() {
                return 'this is a normal page element (translations are managed with seperate overlay records)';
        }
 
@@ -75,16 +74,16 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         * Method to get an overlay of an element for a certain langugae
         *
         * @param int $lUid
-        * @param boolean $onlyUid
+        * @internal param bool $onlyUid
         * @return array return the database row
         */
        protected function getOverLayRecordForCertainLanguageImplementation($lUid) {
-               if ($lUid>0) {
+               if ($lUid > 0) {
                        $fieldArr = explode(',', $GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields']);
                        $page_id = $this->row['t3ver_oid']?$this->row['t3ver_oid']:$this->getUid();     // Was the whole record
                        $fieldArr = array_intersect($fieldArr,array_keys($this->row));          // Make sure that only fields which exist in the incoming record are overlaid!
 
-                       if (count($fieldArr))   {
+                       if (count($fieldArr)) {
                                $table = 'pages_language_overlay';
                                if (is_object($GLOBALS['TSFE']->sys_page)) {
                                        $enableFields = $GLOBALS['TSFE']->sys_page->enableFields($table);
@@ -94,13 +93,13 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
                                $fieldArr[] = 'deleted';
                                $fieldArr[] = 'hidden';
                                $fieldArr[] = 'tx_languagevisibility_visibility';
-                               
+
                                        // Selecting overlay record:
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
-                                       implode(',',$fieldArr),
+                                       implode(',', $fieldArr),
                                        'pages_language_overlay',
-                                       'pid='.intval($page_id).'
-                                               AND sys_language_uid='.intval($lUid).
+                                       'pid=' . intval($page_id) . '
+                                               AND sys_language_uid=' . intval($lUid) .
                                                $enableFields,
                                        '',
                                        '',
@@ -126,8 +125,8 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         * Returns which field in the language should be used to read the default visibility
         *
         * @return string (blank=default / page=page)
-        **/
-       function getFieldToUseForDefaultVisibility() {
+        */
+       public function getFieldToUseForDefaultVisibility() {
                return 'page';
        }
 
@@ -136,17 +135,16 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         *
         * @return boolean
         */
-       function hasOverLayRecordForAnyLanguageInAnyWorkspace() {
-
+       public function hasOverLayRecordForAnyLanguageInAnyWorkspace() {
                //if we handle a workspace record, we need to get it's live version
-               if ($this->row['pid'] == - 1) {
+               if ($this->row['pid'] == -1) {
                        $useUid = $this->row['t3ver_oid'];
                } else {
                        $useUid = $this->row['uid'];
                }
 
-               // if a workspace record has an overlay, an overlay also exists in the livews with versionstate = 1
-               // therefore we have to look for any undeleted overlays of the live version
+                       // if a workspace record has an overlay, an overlay also exists in the livews with versionstate = 1
+                       // therefore we have to look for any undeleted overlays of the live version
                $fields = 'count(uid) as anz';
                $table = 'pages_language_overlay';
                $where = 'deleted = 0 AND pid=' . $useUid;
@@ -164,7 +162,6 @@ class tx_languagevisibility_pageelement extends tx_languagevisibility_element {
         * @return boolean
         */
        public function supportsInheritance() {
-               return true;
+               return TRUE;
        }
 }
-?>
\ No newline at end of file
index 4bc7f4d..8dbb39e 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_element.php');
-
 class tx_languagevisibility_recordelement extends tx_languagevisibility_element {
 
        /**
@@ -60,19 +59,19 @@ class tx_languagevisibility_recordelement extends tx_languagevisibility_element
                }
 
 
-               if (isset($ctrl['versioningWS'])  && $ctrl['versioningWS'] > 0) {
+               if (isset($ctrl['versioningWS']) && $ctrl['versioningWS'] > 0) {
                        $workspaces = '0,' . $GLOBALS['BE_USER']->workspace;
                        $workspaceCondition = 't3ver_wsid IN (' . rtrim($workspaces, ',') . ') AND ';
                } else {
                        $workspaceCondition = '';
-               }
+               }
 
                        // Select overlay record (Live workspace, initial placeholders included):
                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                        '*',
                        $this->table,
-                       //from the current pid and only records from the live workspace or initial placeholder
-                       'pid='.intval($this->getPid()). ' AND ' .
+                               // from the current pid and only records from the live workspace or initial placeholder
+                       'pid=' . intval($this->getPid()) . ' AND ' .
                                $workspaceCondition .
                                $ctrl['languageField'] . '=' . intval($languageId) .
                                        // With L=0 transOrigPointerField is not set, so uid should be used instead (see #31607)
@@ -99,20 +98,19 @@ class tx_languagevisibility_recordelement extends tx_languagevisibility_element
         *
         * @return boolean
         */
-       function hasOverLayRecordForAnyLanguageInAnyWorkspace() {
-               global $TCA;
+       public function hasOverLayRecordForAnyLanguageInAnyWorkspace() {
                $table = $this->table;
 
                if ($this->isOrigElement()) {
                        $fields = 'count(*) as ANZ';
 
-                       $where = 'deleted = 0 AND ' . $TCA[$table]['ctrl']['transOrigPointerField'] . '=' . $this->getUid();
+                       $where = 'deleted = 0 AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . $this->getUid();
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($fields, $table, $where);
 
                        return ($res[0]['ANZ'] > 0);
                } else {
-                       //if this is a translation is clear that an overlay must exist
-                       return true;
+                               // if this is a translation is clear that an overlay must exist
+                       return TRUE;
                }
        }
 
@@ -122,8 +120,7 @@ class tx_languagevisibility_recordelement extends tx_languagevisibility_element
         * (non-PHPdoc)
         * @see classes/tx_languagevisibility_element#getFallbackOrder($language)
         */
-       function getFallbackOrder(tx_languagevisibility_language $language) {
+       public function getFallbackOrder(tx_languagevisibility_language $language) {
                return $language->getFallbackOrderElement($this);
        }
 }
-?>
\ No newline at end of file
index 449a741..bca1dc2 100644 (file)
@@ -32,7 +32,7 @@ class tx_languagevisibility_reports_ConfigurationStatus implements tx_reports_St
         */
        public function getStatus() {
                $statuses = array(
-                       'LangMode'                 => $this->getLangModes(),
+                       'LangMode' => $this->getLangModes(),
                );
 
                return $statuses;
@@ -53,32 +53,32 @@ class tx_languagevisibility_reports_ConfigurationStatus implements tx_reports_St
 
                $rootTpls = t3lib_BEfunc::getRecordsByField('sys_template', 'root', '1', '', 'pid');
 
-               foreach($rootTpls as $tpl) {
+               foreach ($rootTpls as $tpl) {
                        /**
                         * @var t3lib_tsparser_ext
                         */
-                       $tmpl = t3lib_div::makeInstance("t3lib_tsparser_ext");
+                       $tmpl = t3lib_div::makeInstance('t3lib_tsparser_ext');
                        $tmpl->tt_track = 0;
                        $tmpl->init();
 
                                // Gets the rootLine
-                       $sys_page = t3lib_div::makeInstance("t3lib_pageSelect");
+                       $sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
                        $rootLine = $sys_page->getRootLine($tpl['pid']);
                        $tmpl->runThroughTemplates($rootLine, $tpl['uid']);
 
                        $tplRow = $tmpl->ext_getFirstTemplate($tpl['pid'], $tpl['uid']);
                        $tmpl->generateConfig();
 
-                       if(!isset($tmpl->setup['config.']['sys_language_mode']) || $tmpl->setup['config.']['sys_language_mode'] != 'ignore') {
+                       if (!isset($tmpl->setup['config.']['sys_language_mode']) || $tmpl->setup['config.']['sys_language_mode'] != 'ignore') {
                                $checked['fail'][] = array($tpl['pid'], $tpl['uid'], $tmpl->setup['config.']['sys_language_mode']);
                        }
                }
 
-               if(count($checked['fail'])) {
+               if (count($checked['fail'])) {
                        $severity = tx_reports_reports_status_Status::WARNING;
                        $value = $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.fail.value');
                        $message .= $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.fail.message') . '<br/>';
-                       foreach($checked['fail'] as $fail) {
+                       foreach ($checked['fail'] as $fail) {
                                $message .= vsprintf($GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:reports.fail.message.detail'), $fail) . '<br />';
                        }
                }
@@ -92,9 +92,6 @@ class tx_languagevisibility_reports_ConfigurationStatus implements tx_reports_St
        }
 }
 
-
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/languagevisibility/classes/class.tx_languagevisibility_reports_ConfigurationStatus.php'])     {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/languagevisibility/classes/class.tx_languagevisibility_reports_ConfigurationStatus.php']);
 }
-
-?>
\ No newline at end of file
index 8297090..e74d029 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_recordelement.php');
-
 class tx_languagevisibility_ttnewselement extends tx_languagevisibility_recordelement {
 
        /**
@@ -65,8 +64,7 @@ class tx_languagevisibility_ttnewselement extends tx_languagevisibility_recordel
         * (non-PHPdoc)
         * @see classes/tx_languagevisibility_recordelement#getFallbackOrder($language)
         */
-       function getFallbackOrder(tx_languagevisibility_language $language) {
+       public function getFallbackOrder(tx_languagevisibility_language $language) {
                return $language->getFallbackOrderTTNewsElement($this);
        }
 }
-?>
\ No newline at end of file
index fb20fcd..23fcef8 100644 (file)
@@ -85,4 +85,3 @@ class tx_languagevisibility_visibility {
                return $this;
        }
 }
-?>
\ No newline at end of file
index 5d26704..cd1f18a 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once t3lib_extMgm::extPath('languagevisibility') . 'classes/class.tx_languagevisibility_visibility.php';
-require_once t3lib_extMgm::extPath('languagevisibility') . 'classes/class.tx_languagevisibility_cacheManager.php';
-
 class tx_languagevisibility_visibilityService {
        /**
         * @var boolean holds the state if inheritance is enabled or not
@@ -66,22 +64,22 @@ class tx_languagevisibility_visibilityService {
         *
         * @param boolean $useInheritance
         */
-       public static function setUseInheritance($useInheritance = true) {
+       public static function setUseInheritance($useInheritance = TRUE) {
                self::$useInheritance = $useInheritance;
        }
 
        /**
-        * returns relevant languageid for overlay record or false if element is not visible for guven language
+        * returns relevant languageid for overlay record or FALSE if element is not visible for guven language
         *
         * @param tx_languagevisibility_language $language
         * @param tx_languagevisibility_element $element
         * @return mixed
-        **/
+        */
        function getOverlayLanguageIdForLanguageAndElement(tx_languagevisibility_language $language, tx_languagevisibility_element $element) {
                if ($this->isVisible($language, $element)) {
                        return $this->_relevantOverlayLanguageId;
                } else {
-                       return false;
+                       return FALSE;
                }
        }
 
@@ -92,7 +90,7 @@ class tx_languagevisibility_visibilityService {
         * @todo can this resolved diffrent? the relevantOverlayLanguageId is set in isVisible
         * @return int
         */
-       function getLastRelevantOverlayLanguageId() {
+       public function getLastRelevantOverlayLanguageId() {
                return $this->_relevantOverlayLanguageId;
        }
 
@@ -101,7 +99,6 @@ class tx_languagevisibility_visibilityService {
         * @return array with all supported tables
         */
        public static function getSupportedTables() {
-
                $tables = array('pages', 'tt_content', 'tt_news', 'pages_language_overlay');
 
                if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['languagevisibility']['getElementForTable'])
@@ -119,15 +116,16 @@ class tx_languagevisibility_visibilityService {
        }
 
        /**
-        * Returns true or false wether the element is visible in the certain language.
+        * Returns true or FALSE wether the element is visible in the certain language.
         * (sets for internal access only $this->_relevantOverlayLanguageId which holds the overlay languageid)
         *
         * @param tx_languagevisibility_language $language
-        * @param tx_languagevisibility_element
-        * @param boolean
+        * @param \tx_languagevisibility_element $element
+        * @param bool $omitLocal
+        * @throws Exception
         * @return boolean
-        **/
-       public function isVisible(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = false) {
+        */
+       public function isVisible(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = FALSE) {
                $this->_relevantOverlayLanguageId = $language->getUid();
 
                $visibility = $this->getVisibilitySetting($language, $element, $omitLocal);
@@ -135,43 +133,43 @@ class tx_languagevisibility_visibilityService {
                        if (!$element->hasTranslation($language->getUid())) {
                                $this->_relevantOverlayLanguageId = 0;
                        }
-                       $result = true;
+                       $result = TRUE;
                } elseif ($visibility == 'no+') {
-                       $result = false;
+                       $result = FALSE;
                } elseif ($visibility == 'no') {
-                       $result = false;
+                       $result = FALSE;
                } elseif ($visibility == 't') {
                        if ($element->hasTranslation($language->getUid())) {
-                               $result = true;
+                               $result = TRUE;
                        } else {
-                               $result = false;
+                               $result = FALSE;
                        }
                } elseif ($visibility == 'f') {
                        if ($element->hasTranslation($language->getUid())) {
-                               $result = true;
+                               $result = TRUE;
                        } else {
-                               $result = false;
+                               $result = FALSE;
 
-                               //there is no direct translation for this element, therefore check languages in fallback
+                                       // there is no direct translation for this element, therefore check languages in fallback
                                $fallBackOrder = $element->getFallbackOrder($language);
                                if (!is_array($fallBackOrder)) {
-                                       throw new Exception(print_r($element, true));
+                                       throw new Exception(print_r($element, TRUE));
                                }
 
                                foreach ($fallBackOrder as $languageid) {
                                        if ($element->hasTranslation($languageid)) {
                                                $this->_relevantOverlayLanguageId = $languageid;
-                                               $result = true;
+                                               $result = TRUE;
                                                break;
                                        }
                                }
                        }
                } else {
-                       //no setting or default:
+                               // no setting or default:
                        if ($language->getUid() == '0') {
-                               $result = true;
+                               $result = TRUE;
                        } else {
-                               $result = false;
+                               $result = FALSE;
                        }
                }
                return $result;
@@ -189,13 +187,7 @@ class tx_languagevisibility_visibilityService {
        protected function getInheritedVisibility(tx_languagevisibility_language $language, tx_languagevisibility_element $element) {
 
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactoryName = t3lib_div::makeInstanceClassName('tx_languagevisibility_elementFactory');
-                       $elementfactory = new $elementfactoryName($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
-
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $elements = $elementfactory->getParentElementsFromElement($element, $language);
 
                if (is_array($elements) && count($elements) > 0) {
@@ -203,7 +195,7 @@ class tx_languagevisibility_visibilityService {
                                /* @var $element tx_languagevisibility_pageelement */
                                $visibility = new tx_languagevisibility_visibility();
                                $visibility->setVisibilityString($element->getLocalVisibilitySetting($language->getUid()));
-                               //is the setting a inheritable setting:
+                                       // is the setting a inheritable setting:
                                if ($visibility->getVisibilityString() == 'no+' || $visibility->getVisibilityString() == 'yes+') {
                                        $visibility->setVisibilityDescription('inherited from uid ' . $element->getUid());
                                        return $visibility;
@@ -240,7 +232,7 @@ class tx_languagevisibility_visibilityService {
         * @param boolean
         * @return string
         */
-       public function getVisibilitySetting(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = false) {
+       public function getVisibilitySetting(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = FALSE) {
                $cacheManager = tx_languagevisibility_cacheManager::getInstance();
                $cacheData = $cacheManager->get('visibilitySettingCache');
                $isCacheEnabled = $cacheManager->isCacheEnabled();
@@ -276,7 +268,7 @@ class tx_languagevisibility_visibilityService {
         * @param boolean $omitLocal
         * @return tx_languagevisibility_visibility
         */
-       protected function getVisibility(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = false) {
+       protected function getVisibility(tx_languagevisibility_language $language, tx_languagevisibility_element $element, $omitLocal = FALSE) {
                $visibility = new tx_languagevisibility_visibility();
                $local = $element->getLocalVisibilitySetting($language->getUid());
 
@@ -301,12 +293,12 @@ class tx_languagevisibility_visibilityService {
 
                        if ($element->getFieldToUseForDefaultVisibility() == 'page') {
                                if ($this->getUseInheritance()) {
-                                       // gibt es in der rootline das visibiklitysetting no+ für die sprache dann return 'no'
+                                               // gibt es in der rootline das visibiklitysetting no+ für die sprache dann return 'no'
                                        $inheritedVisibility = $this->getInheritedVisibility($language, $element);
 
                                        switch ($inheritedVisibility->getVisibilityString()) {
                                                case 'no+' :
-                                                       //if no+ is found it means the current element should be threated as if it has no set
+                                                               // if no+ is found it means the current element should be threated as if it has no set
                                                        $visibility->setVisibilityString('no')->setVisibilityDescription('force to no (' . $inheritedVisibility->getVisibilityDescription() . ')');
                                                        break;
                                                case 'yes+' :
@@ -318,7 +310,7 @@ class tx_languagevisibility_visibilityService {
                                                        break;
                                        }
                                } else {
-                                       //inheritance is disabled
+                                               // inheritance is disabled
                                        $setting = $language->getDefaultVisibilityForPage($element);
                                        $visibility->setVisibilityString($setting)->setVisibilityDescription('default visibility  for page (' . $setting . ')');
                                }
@@ -338,5 +330,3 @@ class tx_languagevisibility_visibilityService {
                }
        }
 }
-
-?>
index 6ab41a4..5d0314a 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-require_once t3lib_extMgm::extPath('languagevisibility') . 'classes/class.tx_languagevisibility_cacheManager.php';
-
 class tx_languagevisibility_daocommon {
 
        protected static $recordCache;
@@ -50,7 +49,7 @@ class tx_languagevisibility_daocommon {
 
                if ($isCacheEnabled) {
                        if (! isset(self::$recordCache[$table][$uid])) {
-                               //!TODO we're still running two queries - this can be reduced to one with a tricky search criteria
+                                       // !TODO we're still running two queries - this can be reduced to one with a tricky search criteria
                                $row = self::getRequestedRecord($uid, $table);
 
                                if ($row) {
@@ -79,10 +78,10 @@ class tx_languagevisibility_daocommon {
         * @return array
         */
        protected static function getRequestedRecord($uid, $table) {
-               // fix settings
+                       // fix settings
                $fields = '*';
                $table = $table;
-               $groupBy = null;
+               $groupBy = NULL;
                $orderBy = '';
                $where = 'uid=' . intval($uid);
 
@@ -96,8 +95,9 @@ class tx_languagevisibility_daocommon {
        /**
         * Returns a record by table and uid.
         *
-        * @param $uid
         * @param $table
+        * @param $where
+        * @internal param $uid
         * @return array
         */
        public static function getRecords($table, $where) {
@@ -108,7 +108,7 @@ class tx_languagevisibility_daocommon {
 
                if ($isCacheEnabled) {
                        if (! isset(self::$recordCache[$table][$where])) {
-                               //!TODO we're still running two queries - this can be reduced to one with a tricky search criteria
+                                       // !TODO we're still running two queries - this can be reduced to one with a tricky search criteria
                                $rows = self::getRequestedRecords($table, $where);
 
                                if ($rows) {
@@ -134,16 +134,16 @@ class tx_languagevisibility_daocommon {
         * @return array
         */
        protected static function getRequestedRecords($table, $where) {
-               // fix settings
+                       // fix settings
                $fields = '*';
                $table = $table;
-               $groupBy = null;
+               $groupBy = NULL;
                $orderBy = '';
                $where = $where;
 
                $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, $where, $groupBy, $orderBy);
                $rows = array();
-               while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
+               while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
                        $rows[] = $row;
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($result);
@@ -165,17 +165,13 @@ class tx_languagevisibility_daocommon {
                        $fields = '*';
                        $tablename = $table;
                        $orderBy = '';
-                       $groupBy = null;
+                       $groupBy = NULL;
 
                        $uidsInCache = implode(',', array_keys(self::$recordCache[$table]));
-                       //get deleted hidden and workspace field from tca
 
-
-                       global $TCA;
-                       t3lib_div::loadTCA($table);
-
-                       if (is_array($TCA[$table]['ctrl'])) {
-                               $deleteField = $TCA[$table]['ctrl']['delete'];
+                               // get deleted hidden and workspace field from tca
+                       if (is_array($GLOBALS['TCA'][$table]['ctrl'])) {
+                               $deleteField = $GLOBALS['TCA'][$table]['ctrl']['delete'];
                        }
 
                        $where = 'uid !=' . $row['uid'] . ' AND pid = ' . $row['pid'] . ' AND uid NOT IN (' . $uidsInCache . ')';
@@ -196,5 +192,3 @@ class tx_languagevisibility_daocommon {
                }
        }
 }
-
-?>
\ No newline at end of file
index b50ec4f..4a394f8 100644 (file)
@@ -21,6 +21,7 @@
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * used to test the objects which needs simple database access:
  * just replace the real daocommon with this stub.
@@ -30,7 +31,6 @@
  * @coauthor Tolleiv Nietsch <nietsch@aoemedia.de>
  * @coauthor Timo Schmidt <schmidt@aoemedia.de>
  */
-
 class tx_languagevisibility_daocommon_stub {
        var $row;
 
@@ -39,10 +39,6 @@ class tx_languagevisibility_daocommon_stub {
        }
 
        function getRecord($uid, $table) {
-
                return $this->row[$table][$uid];
-
        }
-
 }
-?>
\ No newline at end of file
index f1273d0..2af1c43 100644 (file)
@@ -21,6 +21,7 @@
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  *
  * @author     Daniel Poetzinger <poetzinger@aoemedia.de>
@@ -30,4 +31,3 @@
 class tx_languagevisibility_InvalidRowException extends Exception {
 
 }
-?>
\ No newline at end of file
index 36df4d7..9743610 100644 (file)
@@ -7,14 +7,14 @@
 
        <body>
 
-               <table border="0" cellpadding="2" cellspacing="2"><tr bgcolor=""><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Extend existing Tables</span></strong></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add custom fields to existing tables, such as the "pages", "tt_content", "fe_users" or "be_users" table.</span></td></tr><tr><td></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Which table:<br /></strong><a name="17a138ea6c"></a><select name="kickstarter[wizArray_upd][fields][1][which_table]" onchange="setFormAnchorPoint('17a138ea6c');" title="WOP: [fields][1][which_table]"><option value="be_groups">be_groups (Backend Groups)</option><option value="be_users">be_users (Backend Users)</option><option value="fe_groups">fe_groups (Frontend Groups)</option><option value="fe_users">fe_users (Frontend Users)</option><option value="index_config">index_config (Indexing Configuration)</option><option value="pages">pages (Pages)</option><option value="pages_language_overlay">pages_language_overlay (Alternative Page Language)</option><option value="static_countries">static_countries (Countries)</option><option value="static_country_zones">static_country_zones (Country subdivisions)</option><option value="static_currencies">static_currencies (Currencies)</option><option value="static_languages">static_languages (Languages)</option><option value="static_markets">static_markets (Markets)</option><option value="static_taxes">static_taxes (Static taxes)</option><option value="static_template">static_template (Static templates)</option><option value="static_territories">static_territories (Territory)</option><option value="sys_domain">sys_domain (Domain)</option><option value="sys_filemounts">sys_filemounts (Filemount)</option><option value="sys_language" selected="selected">sys_language (Website Language)</option><option value="sys_note">sys_note (Internal note)</option><option value="sys_template">sys_template (Template)</option><option value="sys_workspace">sys_workspace (Workspace)</option><option value="tt_content">tt_content (Content)</option><option value="tt_news">tt_news (News)</option><option value="tt_news_cat">tt_news_cat (News category)</option><option value="tx_aoewebex_regions">tx_aoewebex_regions (additional Regions)</option><option value="tx_ccdevlog">tx_ccdevlog (DevLog)</option><option value="tx_l10nmgr_cfg">tx_l10nmgr_cfg (L10N Manager Configuration)</option><option value="tx_l10nmgr_priorities">tx_l10nmgr_priorities (Localization Priority)</option><option value="tx_rtehtmlarea_acronym">tx_rtehtmlarea_acronym (Acronym)</option><option value="tx_templavoila_datastructure">tx_templavoila_datastructure (TemplaVoilà Data Structure)</option><option value="tx_templavoila_tmplobj">tx_templavoila_tmplobj (TemplaVoilà Template Object)</option></select> <a href="#" title="Select the table which should be extended with these extra fields." style="cursor:help" onclick="alert(String.fromCharCode(83,101,108,101,99,116,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,115,104,111,117,108,100,32,98,101,32,101,120,116,101,110,100,101,100,32,119,105,116,104,32,116,104,101,115,101,32,101,120,116,114,97,32,102,105,101,108,100,115,46));return false;">(What is this?)</a></span><input type="hidden" name="kickstarter[wizArray_upd][fields][1][title]" value="sys_language (Website Language)" /></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>fallbackorder</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
+               <table border="0" cellpadding="2" cellspacing="2"><tr bgcolor=""><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Extend existing Tables</span></strong></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add custom fields to existing tables, such as the "pages", "tt_content", "fe_users" or "be_users" table.</span></td></tr><tr><td></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Which table:<br /></strong><a name="17a138ea6c"></a><select name="kickstarter[wizArray_upd][fields][1][which_table]" onchange="setFormAnchorPoint('17a138ea6c');" title="WOP: [fields][1][which_table]"><option value="be_groups">be_groups (Backend Groups)</option><option value="be_users">be_users (Backend Users)</option><option value="fe_groups">fe_groups (Frontend Groups)</option><option value="fe_users">fe_users (Frontend Users)</option><option value="index_config">index_config (Indexing Configuration)</option><option value="pages">pages (Pages)</option><option value="pages_language_overlay">pages_language_overlay (Alternative Page Language)</option><option value="static_countries">static_countries (Countries)</option><option value="static_country_zones">static_country_zones (Country subdivisions)</option><option value="static_currencies">static_currencies (Currencies)</option><option value="static_languages">static_languages (Languages)</option><option value="static_markets">static_markets (Markets)</option><option value="static_taxes">static_taxes (Static taxes)</option><option value="static_template">static_template (Static templates)</option><option value="static_territories">static_territories (Territory)</option><option value="sys_domain">sys_domain (Domain)</option><option value="sys_filemounts">sys_filemounts (Filemount)</option><option value="sys_language" selected="selected">sys_language (Website Language)</option><option value="sys_note">sys_note (Internal note)</option><option value="sys_template">sys_template (Template)</option><option value="sys_workspace">sys_workspace (Workspace)</option><option value="tt_content">tt_content (Content)</option><option value="tt_news">tt_news (News)</option><option value="tt_news_cat">tt_news_cat (News category)</option><option value="tx_aoewebex_regions">tx_aoewebex_regions (additional Regions)</option><option value="tx_ccdevlog">tx_ccdevlog (DevLog)</option><option value="tx_l10nmgr_cfg">tx_l10nmgr_cfg (L10N Manager Configuration)</option><option value="tx_l10nmgr_priorities">tx_l10nmgr_priorities (Localization Priority)</option><option value="tx_rtehtmlarea_acronym">tx_rtehtmlarea_acronym (Acronym)</option><option value="tx_templavoila_datastructure">tx_templavoila_datastructure (TemplaVoilà Data Structure)</option><option value="tx_templavoila_tmplobj">tx_templavoila_tmplobj (TemplaVoilà Template Object)</option></select> <a href="#" title="Select the table which should be extended with these extra fields." style="cursor:help" onclick="alert(String.fromCharCode(83,101,108,101,99,116,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,115,104,111,117,108,100,32,98,101,32,101,120,116,101,110,100,101,100,32,119,105,116,104,32,116,104,101,115,101,32,101,120,116,114,97,32,102,105,101,108,100,115,46));return FALSE;">(What is this?)</a></span><input type="hidden" name="kickstarter[wizArray_upd][fields][1][title]" value="sys_language (Website Language)" /></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>fallbackorder</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="0bf4c30b40"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][1][fieldname]" value="fallbackorder" style="width:200px;" onchange="setFormAnchorPoint('0bf4c30b40');" title="WOP: [fields][1][fields][1][fieldname]"> (Remove:<a name="029161de68"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][_DELETE]" value="1" onclick="setFormAnchorPoint('029161de68');" title="WOP: [fields][1][fields][1][_DELETE]">)<input type="image" hspace="2" src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_fallbackorder_UP" onclick="setFormAnchorPoint('0bf4c30b40');" /><input type="image" hspace="2" src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_fallbackorder_DOWN" onclick="setFormAnchorPoint('0bf4c30b40');" /><input type="image" hspace="2" src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_fallbackorder_SAVE" onclick="setFormAnchorPoint('0bf4c30b40');" title="Save this field setting as a preset." /></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="ef019e0013"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][1][title]" value="fallback order" style="width:200px;" onchange="setFormAnchorPoint('ef019e0013');" title="WOP: [fields][1][fields][1][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="10950e8f6c"></a><select name="kickstarter[wizArray_upd][fields][1][fields][1][type]" onchange="setFormAnchorPoint('10950e8f6c');" title="WOP: [fields][1][fields][1][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel" selected="selected">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="fade33f50a"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][excludeField]" value="1" onclick="setFormAnchorPoint('fade33f50a');" title="WOP: [fields][1][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_rel_selmulti.png" width="433" height="67" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><br />Create relation to table:<br /><a name="7683a2528e"></a><select name="kickstarter[wizArray_upd][fields][1][fields][1][conf_rel_table]" onchange="setFormAnchorPoint('7683a2528e');" title="WOP: [fields][1][fields][1][conf_rel_table]"><option value="pages" selected="selected">Pages table, (pages)</option><option value="fe_users">Frontend Users, (fe_users)</option><option value="fe_groups">Frontend Usergroups, (fe_groups)</option><option value="tt_content">Content elements, (tt_content)</option><option value="_CUSTOM">Custom table (enter name below)</option></select><br /><br />Type:<br /><a name="df09f40547"></a><select name="kickstarter[wizArray_upd][fields][1][fields][1][conf_rel_type]" onchange="setFormAnchorPoint('df09f40547');" title="WOP: [fields][1][fields][1][conf_rel_type]"><option value="group">Field with Element Browser</option><option value="select">Selectorbox, select global</option><option value="select_cur">Selectorbox, select from current page</option><option value="select_root" selected="selected">Selectorbox, select from root page</option><option value="select_storage">Selectorbox, select from storage page</option></select><br /><a name="1a467cbf0a"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations]" value="10" style="width:50px;" onchange="setFormAnchorPoint('1a467cbf0a');" title="WOP: [fields][1][fields][1][conf_relations]"> Max number of relations<br /><a name="259b05829b"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations_selsize]" value="10" style="width:50px;" onchange="setFormAnchorPoint('259b05829b');" title="WOP: [fields][1][fields][1][conf_relations_selsize]"> Size of selector box<br /><a name="44c44f96da"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations_mm]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations_mm]" value="1" onclick="setFormAnchorPoint('44c44f96da');" title="WOP: [fields][1][fields][1][conf_relations_mm]">True M-M relations (otherwise commalist of values)<br /><br /><a name="9efd7d5eb4"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_addrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_addrec]" value="1" onclick="setFormAnchorPoint('9efd7d5eb4');" title="WOP: [fields][1][fields][1][conf_wiz_addrec]">Add "Add record" link<br /><a name="d49e527ffe"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_listrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_listrec]" value="1" onclick="setFormAnchorPoint('d49e527ffe');" title="WOP: [fields][1][fields][1][conf_wiz_listrec]">Add "List records" link<br /><a name="781c12101b"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_editrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_editrec]" value="1" onclick="setFormAnchorPoint('781c12101b');" title="WOP: [fields][1][fields][1][conf_wiz_editrec]">Add "Edit record" link<br /><img src="../../../../typo3conf/ext/kickstarter/res/t_rel_wizards.png" width="71" height="62" hspace="20" vspace="5" border="1" style="border:solid 1px;" /><br /><br /></blockquote></span></td></tr>
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="10950e8f6c"></a><select name="kickstarter[wizArray_upd][fields][1][fields][1][type]" onchange="setFormAnchorPoint('10950e8f6c');" title="WOP: [fields][1][fields][1][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel" selected="selected">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="fade33f50a"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][excludeField]" value="1" onclick="setFormAnchorPoint('fade33f50a');" title="WOP: [fields][1][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_rel_selmulti.png" width="433" height="67" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><br />Create relation to table:<br /><a name="7683a2528e"></a><select name="kickstarter[wizArray_upd][fields][1][fields][1][conf_rel_table]" onchange="setFormAnchorPoint('7683a2528e');" title="WOP: [fields][1][fields][1][conf_rel_table]"><option value="pages" selected="selected">Pages table, (pages)</option><option value="fe_users">Frontend Users, (fe_users)</option><option value="fe_groups">Frontend Usergroups, (fe_groups)</option><option value="tt_content">Content elements, (tt_content)</option><option value="_CUSTOM">Custom table (enter name below)</option></select><br /><br />Type:<br /><a name="df09f40547"></a><select name="kickstarter[wizArray_upd][fields][1][fields][1][conf_rel_type]" onchange="setFormAnchorPoint('df09f40547');" title="WOP: [fields][1][fields][1][conf_rel_type]"><option value="group">Field with Element Browser</option><option value="select">Selectorbox, select global</option><option value="select_cur">Selectorbox, select from current page</option><option value="select_root" selected="selected">Selectorbox, select from root page</option><option value="select_storage">Selectorbox, select from storage page</option></select><br /><a name="1a467cbf0a"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations]" value="10" style="width:50px;" onchange="setFormAnchorPoint('1a467cbf0a');" title="WOP: [fields][1][fields][1][conf_relations]"> Max number of relations<br /><a name="259b05829b"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations_selsize]" value="10" style="width:50px;" onchange="setFormAnchorPoint('259b05829b');" title="WOP: [fields][1][fields][1][conf_relations_selsize]"> Size of selector box<br /><a name="44c44f96da"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations_mm]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_relations_mm]" value="1" onclick="setFormAnchorPoint('44c44f96da');" title="WOP: [fields][1][fields][1][conf_relations_mm]">True M-M relations (otherwise commalist of values)<br /><br /><a name="9efd7d5eb4"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_addrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_addrec]" value="1" onclick="setFormAnchorPoint('9efd7d5eb4');" title="WOP: [fields][1][fields][1][conf_wiz_addrec]">Add "Add record" link<br /><a name="d49e527ffe"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_listrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_listrec]" value="1" onclick="setFormAnchorPoint('d49e527ffe');" title="WOP: [fields][1][fields][1][conf_wiz_listrec]">Add "List records" link<br /><a name="781c12101b"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_editrec]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][1][conf_wiz_editrec]" value="1" onclick="setFormAnchorPoint('781c12101b');" title="WOP: [fields][1][fields][1][conf_wiz_editrec]">Add "Edit record" link<br /><img src="../../../../typo3conf/ext/kickstarter/res/t_rel_wizards.png" width="71" height="62" hspace="20" vspace="5" border="1" style="border:solid 1px;" /><br /><br /></blockquote></span></td></tr>
 </table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>defaultvisibility</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="f6347c858f"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][2][fieldname]" value="defaultvisibility" style="width:200px;" onchange="setFormAnchorPoint('f6347c858f');" title="WOP: [fields][1][fields][2][fieldname]"> (Remove:<a name="f148854720"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][2][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][2][_DELETE]" value="1" onclick="setFormAnchorPoint('f148854720');" title="WOP: [fields][1][fields][2][_DELETE]">)<input type="image" hspace="2" src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_defaultvisibility_UP" onclick="setFormAnchorPoint('f6347c858f');" /><input type="image" hspace="2" src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_defaultvisibility_DOWN" onclick="setFormAnchorPoint('f6347c858f');" /><input type="image" hspace="2" src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_defaultvisibility_SAVE" onclick="setFormAnchorPoint('f6347c858f');" title="Save this field setting as a preset." /></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="c08282a61f"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][2][title]" value="" style="width:200px;" onchange="setFormAnchorPoint('c08282a61f');" title="WOP: [fields][1][fields][2][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="593c263afd"></a><select name="kickstarter[wizArray_upd][fields][1][fields][2][type]" onchange="setFormAnchorPoint('593c263afd');" title="WOP: [fields][1][fields][2][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select" selected="selected">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="e51eb201e1"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][2][excludeField]" value="1" onclick="setFormAnchorPoint('e51eb201e1');" title="WOP: [fields][1][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_sel.png" width="73" height="84" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><br /><strong>Define values:</strong><br /><table border="0" cellpadding="2" cellspacing="2"><tr>
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="593c263afd"></a><select name="kickstarter[wizArray_upd][fields][1][fields][2][type]" onchange="setFormAnchorPoint('593c263afd');" title="WOP: [fields][1][fields][2][type]"><option value=""></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select" selected="selected">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="e51eb201e1"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][2][excludeField]" value="1" onclick="setFormAnchorPoint('e51eb201e1');" title="WOP: [fields][1][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_sel.png" width="73" height="84" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><br /><strong>Define values:</strong><br /><table border="0" cellpadding="2" cellspacing="2"><tr>
                                <td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Item label:</span></td>
                                <td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Item value:</span></td>
                        </tr><tr>
 </table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>NEW FIELD:</strong></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="83adc8daad"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][3][fieldname]" value="" style="width:200px;" onchange="setFormAnchorPoint('83adc8daad');" title="WOP: [fields][1][fields][3][fieldname]"></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="a7d4e579a1"></a><input type="text" name="kickstarter[wizArray_upd][fields][1][fields][3][title]" value="" style="width:200px;" onchange="setFormAnchorPoint('a7d4e579a1');" title="WOP: [fields][1][fields][3][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="686c4afed4"></a><select name="kickstarter[wizArray_upd][fields][1][fields][3][type]" onchange="setFormAnchorPoint('686c4afed4');" title="WOP: [fields][1][fields][3][type]"><option value="" selected="selected"></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="904eaf2903"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][3][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][3][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('904eaf2903');" title="WOP: [fields][1][fields][3][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /></span></td></tr>
-</table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><br /><br />Load preset fields: <br /><select name="kickstarter[_PRESET][]" size="5" multiple="multiple"><option value="">__Fields picked up in this session__:</option><option value="languagevisibility-fields-1.fallbackorder">languagevisibility-fields-1: fallback order (fallbackorder, type: rel)</option><option value="languagevisibility-fields-1.defaultvisibility">languagevisibility-fields-1:  (defaultvisibility, type: select)</option><option value="languagevisibility-fields-2.visibility">languagevisibility-fields-2: language visibility (visibility, type: input)</option><option value="languagevisibility-fields-3.visibility">languagevisibility-fields-3: language visibility (visibility, type: input)</option></select></span></td></tr></table><hr /><table border="0" cellpadding="2" cellspacing="2"><tr bgcolor=""><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Extend existing Tables</span></strong></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add custom fields to existing tables, such as the "pages", "tt_content", "fe_users" or "be_users" table.</span></td></tr><tr><td></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Which table:<br /></strong><a name="9f88443241"></a><select name="kickstarter[wizArray_upd][fields][2][which_table]" onchange="setFormAnchorPoint('9f88443241');" title="WOP: [fields][2][which_table]"><option value="be_groups">be_groups (Backend Groups)</option><option value="be_users">be_users (Backend Users)</option><option value="fe_groups">fe_groups (Frontend Groups)</option><option value="fe_users">fe_users (Frontend Users)</option><option value="index_config">index_config (Indexing Configuration)</option><option value="pages" selected="selected">pages (Pages)</option><option value="pages_language_overlay">pages_language_overlay (Alternative Page Language)</option><option value="static_countries">static_countries (Countries)</option><option value="static_country_zones">static_country_zones (Country subdivisions)</option><option value="static_currencies">static_currencies (Currencies)</option><option value="static_languages">static_languages (Languages)</option><option value="static_markets">static_markets (Markets)</option><option value="static_taxes">static_taxes (Static taxes)</option><option value="static_template">static_template (Static templates)</option><option value="static_territories">static_territories (Territory)</option><option value="sys_domain">sys_domain (Domain)</option><option value="sys_filemounts">sys_filemounts (Filemount)</option><option value="sys_language">sys_language (Website Language)</option><option value="sys_note">sys_note (Internal note)</option><option value="sys_template">sys_template (Template)</option><option value="sys_workspace">sys_workspace (Workspace)</option><option value="tt_content">tt_content (Content)</option><option value="tt_news">tt_news (News)</option><option value="tt_news_cat">tt_news_cat (News category)</option><option value="tx_aoewebex_regions">tx_aoewebex_regions (additional Regions)</option><option value="tx_ccdevlog">tx_ccdevlog (DevLog)</option><option value="tx_l10nmgr_cfg">tx_l10nmgr_cfg (L10N Manager Configuration)</option><option value="tx_l10nmgr_priorities">tx_l10nmgr_priorities (Localization Priority)</option><option value="tx_rtehtmlarea_acronym">tx_rtehtmlarea_acronym (Acronym)</option><option value="tx_templavoila_datastructure">tx_templavoila_datastructure (TemplaVoilà Data Structure)</option><option value="tx_templavoila_tmplobj">tx_templavoila_tmplobj (TemplaVoilà Template Object)</option></select> <a href="#" title="Select the table which should be extended with these extra fields." style="cursor:help" onclick="alert(String.fromCharCode(83,101,108,101,99,116,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,115,104,111,117,108,100,32,98,101,32,101,120,116,101,110,100,101,100,32,119,105,116,104,32,116,104,101,115,101,32,101,120,116,114,97,32,102,105,101,108,100,115,46));return false;">(What is this?)</a></span><input type="hidden" name="kickstarter[wizArray_upd][fields][2][title]" value="pages (Pages)" /></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>visibility</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="686c4afed4"></a><select name="kickstarter[wizArray_upd][fields][1][fields][3][type]" onchange="setFormAnchorPoint('686c4afed4');" title="WOP: [fields][1][fields][3][type]"><option value="" selected="selected"></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="904eaf2903"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][1][fields][3][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][1][fields][3][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('904eaf2903');" title="WOP: [fields][1][fields][3][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /></span></td></tr>
+</table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><br /><br />Load preset fields: <br /><select name="kickstarter[_PRESET][]" size="5" multiple="multiple"><option value="">__Fields picked up in this session__:</option><option value="languagevisibility-fields-1.fallbackorder">languagevisibility-fields-1: fallback order (fallbackorder, type: rel)</option><option value="languagevisibility-fields-1.defaultvisibility">languagevisibility-fields-1:  (defaultvisibility, type: select)</option><option value="languagevisibility-fields-2.visibility">languagevisibility-fields-2: language visibility (visibility, type: input)</option><option value="languagevisibility-fields-3.visibility">languagevisibility-fields-3: language visibility (visibility, type: input)</option></select></span></td></tr></table><hr /><table border="0" cellpadding="2" cellspacing="2"><tr bgcolor=""><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Extend existing Tables</span></strong></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add custom fields to existing tables, such as the "pages", "tt_content", "fe_users" or "be_users" table.</span></td></tr><tr><td></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Which table:<br /></strong><a name="9f88443241"></a><select name="kickstarter[wizArray_upd][fields][2][which_table]" onchange="setFormAnchorPoint('9f88443241');" title="WOP: [fields][2][which_table]"><option value="be_groups">be_groups (Backend Groups)</option><option value="be_users">be_users (Backend Users)</option><option value="fe_groups">fe_groups (Frontend Groups)</option><option value="fe_users">fe_users (Frontend Users)</option><option value="index_config">index_config (Indexing Configuration)</option><option value="pages" selected="selected">pages (Pages)</option><option value="pages_language_overlay">pages_language_overlay (Alternative Page Language)</option><option value="static_countries">static_countries (Countries)</option><option value="static_country_zones">static_country_zones (Country subdivisions)</option><option value="static_currencies">static_currencies (Currencies)</option><option value="static_languages">static_languages (Languages)</option><option value="static_markets">static_markets (Markets)</option><option value="static_taxes">static_taxes (Static taxes)</option><option value="static_template">static_template (Static templates)</option><option value="static_territories">static_territories (Territory)</option><option value="sys_domain">sys_domain (Domain)</option><option value="sys_filemounts">sys_filemounts (Filemount)</option><option value="sys_language">sys_language (Website Language)</option><option value="sys_note">sys_note (Internal note)</option><option value="sys_template">sys_template (Template)</option><option value="sys_workspace">sys_workspace (Workspace)</option><option value="tt_content">tt_content (Content)</option><option value="tt_news">tt_news (News)</option><option value="tt_news_cat">tt_news_cat (News category)</option><option value="tx_aoewebex_regions">tx_aoewebex_regions (additional Regions)</option><option value="tx_ccdevlog">tx_ccdevlog (DevLog)</option><option value="tx_l10nmgr_cfg">tx_l10nmgr_cfg (L10N Manager Configuration)</option><option value="tx_l10nmgr_priorities">tx_l10nmgr_priorities (Localization Priority)</option><option value="tx_rtehtmlarea_acronym">tx_rtehtmlarea_acronym (Acronym)</option><option value="tx_templavoila_datastructure">tx_templavoila_datastructure (TemplaVoilà Data Structure)</option><option value="tx_templavoila_tmplobj">tx_templavoila_tmplobj (TemplaVoilà Template Object)</option></select> <a href="#" title="Select the table which should be extended with these extra fields." style="cursor:help" onclick="alert(String.fromCharCode(83,101,108,101,99,116,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,115,104,111,117,108,100,32,98,101,32,101,120,116,101,110,100,101,100,32,119,105,116,104,32,116,104,101,115,101,32,101,120,116,114,97,32,102,105,101,108,100,115,46));return FALSE;">(What is this?)</a></span><input type="hidden" name="kickstarter[wizArray_upd][fields][2][title]" value="pages (Pages)" /></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>visibility</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="8f349b2cc4"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][1][fieldname]" value="visibility" style="width:200px;" onchange="setFormAnchorPoint('8f349b2cc4');" title="WOP: [fields][2][fields][1][fieldname]"> (Remove:<a name="982591feb7"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][_DELETE]" value="1" onclick="setFormAnchorPoint('982591feb7');" title="WOP: [fields][2][fields][1][_DELETE]">)<input type="image" hspace="2" src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_visibility_UP" onclick="setFormAnchorPoint('8f349b2cc4');" /><input type="image" hspace="2" src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_visibility_DOWN" onclick="setFormAnchorPoint('8f349b2cc4');" /><input type="image" hspace="2" src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_visibility_SAVE" onclick="setFormAnchorPoint('8f349b2cc4');" title="Save this field setting as a preset." /></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="e0a16f2ddf"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][1][title]" value="language visibility" style="width:200px;" onchange="setFormAnchorPoint('e0a16f2ddf');" title="WOP: [fields][2][fields][1][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="c9516b188c"></a><select name="kickstarter[wizArray_upd][fields][2][fields][1][type]" onchange="setFormAnchorPoint('c9516b188c');" title="WOP: [fields][2][fields][1][type]"><option value=""></option><option value="input" selected="selected">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="9f063575e9"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('9f063575e9');" title="WOP: [fields][2][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input.png" width="297" height="32" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><a name="0e63a6bc18"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_size]" value="" style="width:50px;" onchange="setFormAnchorPoint('0e63a6bc18');" title="WOP: [fields][2][fields][1][conf_size]"> Field width (5-48 relative, 30 default)<br /><a name="cd237097a6"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_max]" value="" style="width:50px;" onchange="setFormAnchorPoint('cd237097a6');" title="WOP: [fields][2][fields][1][conf_max]"> Max characters<br /><a name="e85eeae63c"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_required]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_required]" value="1" onclick="setFormAnchorPoint('e85eeae63c');" title="WOP: [fields][2][fields][1][conf_required]">Required<br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input_required.png" width="129" height="34" hspace=20 vspace="5" border="1" style="border:solid 1px;" /><br /><br /><a name="942801eb09"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_varchar]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_varchar]" value="1" onclick="setFormAnchorPoint('942801eb09');" title="WOP: [fields][2][fields][1][conf_varchar]">Create VARCHAR, not TINYTEXT field<br /></blockquote></span></td></tr>
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="c9516b188c"></a><select name="kickstarter[wizArray_upd][fields][2][fields][1][type]" onchange="setFormAnchorPoint('c9516b188c');" title="WOP: [fields][2][fields][1][type]"><option value=""></option><option value="input" selected="selected">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="9f063575e9"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('9f063575e9');" title="WOP: [fields][2][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input.png" width="297" height="32" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><a name="0e63a6bc18"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_size]" value="" style="width:50px;" onchange="setFormAnchorPoint('0e63a6bc18');" title="WOP: [fields][2][fields][1][conf_size]"> Field width (5-48 relative, 30 default)<br /><a name="cd237097a6"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_max]" value="" style="width:50px;" onchange="setFormAnchorPoint('cd237097a6');" title="WOP: [fields][2][fields][1][conf_max]"> Max characters<br /><a name="e85eeae63c"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_required]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_required]" value="1" onclick="setFormAnchorPoint('e85eeae63c');" title="WOP: [fields][2][fields][1][conf_required]">Required<br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input_required.png" width="129" height="34" hspace=20 vspace="5" border="1" style="border:solid 1px;" /><br /><br /><a name="942801eb09"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_varchar]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][1][conf_varchar]" value="1" onclick="setFormAnchorPoint('942801eb09');" title="WOP: [fields][2][fields][1][conf_varchar]">Create VARCHAR, not TINYTEXT field<br /></blockquote></span></td></tr>
 </table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>NEW FIELD:</strong></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="bbf3ce18c2"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][2][fieldname]" value="" style="width:200px;" onchange="setFormAnchorPoint('bbf3ce18c2');" title="WOP: [fields][2][fields][2][fieldname]"></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="7ea574dba7"></a><input type="text" name="kickstarter[wizArray_upd][fields][2][fields][2][title]" value="" style="width:200px;" onchange="setFormAnchorPoint('7ea574dba7');" title="WOP: [fields][2][fields][2][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="3f7d9f2467"></a><select name="kickstarter[wizArray_upd][fields][2][fields][2][type]" onchange="setFormAnchorPoint('3f7d9f2467');" title="WOP: [fields][2][fields][2][type]"><option value="" selected="selected"></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="c0d40dad70"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][2][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('c0d40dad70');" title="WOP: [fields][2][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /></span></td></tr>
-</table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><br /><br />Load preset fields: <br /><select name="kickstarter[_PRESET][]" size="5" multiple="multiple"><option value="">__Fields picked up in this session__:</option><option value="languagevisibility-fields-1.fallbackorder">languagevisibility-fields-1: fallback order (fallbackorder, type: rel)</option><option value="languagevisibility-fields-1.defaultvisibility">languagevisibility-fields-1:  (defaultvisibility, type: select)</option><option value="languagevisibility-fields-2.visibility">languagevisibility-fields-2: language visibility (visibility, type: input)</option><option value="languagevisibility-fields-3.visibility">languagevisibility-fields-3: language visibility (visibility, type: input)</option></select></span></td></tr></table><hr /><table border="0" cellpadding="2" cellspacing="2"><tr bgcolor=""><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Extend existing Tables</span></strong></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add custom fields to existing tables, such as the "pages", "tt_content", "fe_users" or "be_users" table.</span></td></tr><tr><td></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Which table:<br /></strong><a name="06eef7379a"></a><select name="kickstarter[wizArray_upd][fields][3][which_table]" onchange="setFormAnchorPoint('06eef7379a');" title="WOP: [fields][3][which_table]"><option value="be_groups">be_groups (Backend Groups)</option><option value="be_users">be_users (Backend Users)</option><option value="fe_groups">fe_groups (Frontend Groups)</option><option value="fe_users">fe_users (Frontend Users)</option><option value="index_config">index_config (Indexing Configuration)</option><option value="pages">pages (Pages)</option><option value="pages_language_overlay">pages_language_overlay (Alternative Page Language)</option><option value="static_countries">static_countries (Countries)</option><option value="static_country_zones">static_country_zones (Country subdivisions)</option><option value="static_currencies">static_currencies (Currencies)</option><option value="static_languages">static_languages (Languages)</option><option value="static_markets">static_markets (Markets)</option><option value="static_taxes">static_taxes (Static taxes)</option><option value="static_template">static_template (Static templates)</option><option value="static_territories">static_territories (Territory)</option><option value="sys_domain">sys_domain (Domain)</option><option value="sys_filemounts">sys_filemounts (Filemount)</option><option value="sys_language">sys_language (Website Language)</option><option value="sys_note">sys_note (Internal note)</option><option value="sys_template">sys_template (Template)</option><option value="sys_workspace">sys_workspace (Workspace)</option><option value="tt_content" selected="selected">tt_content (Content)</option><option value="tt_news">tt_news (News)</option><option value="tt_news_cat">tt_news_cat (News category)</option><option value="tx_aoewebex_regions">tx_aoewebex_regions (additional Regions)</option><option value="tx_ccdevlog">tx_ccdevlog (DevLog)</option><option value="tx_l10nmgr_cfg">tx_l10nmgr_cfg (L10N Manager Configuration)</option><option value="tx_l10nmgr_priorities">tx_l10nmgr_priorities (Localization Priority)</option><option value="tx_rtehtmlarea_acronym">tx_rtehtmlarea_acronym (Acronym)</option><option value="tx_templavoila_datastructure">tx_templavoila_datastructure (TemplaVoilà Data Structure)</option><option value="tx_templavoila_tmplobj">tx_templavoila_tmplobj (TemplaVoilà Template Object)</option></select> <a href="#" title="Select the table which should be extended with these extra fields." style="cursor:help" onclick="alert(String.fromCharCode(83,101,108,101,99,116,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,115,104,111,117,108,100,32,98,101,32,101,120,116,101,110,100,101,100,32,119,105,116,104,32,116,104,101,115,101,32,101,120,116,114,97,32,102,105,101,108,100,115,46));return false;">(What is this?)</a></span><input type="hidden" name="kickstarter[wizArray_upd][fields][3][title]" value="tt_content (Content)" /></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>visibility</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="3f7d9f2467"></a><select name="kickstarter[wizArray_upd][fields][2][fields][2][type]" onchange="setFormAnchorPoint('3f7d9f2467');" title="WOP: [fields][2][fields][2][type]"><option value="" selected="selected"></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="c0d40dad70"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][2][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][2][fields][2][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('c0d40dad70');" title="WOP: [fields][2][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /></span></td></tr>
+</table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><br /><br />Load preset fields: <br /><select name="kickstarter[_PRESET][]" size="5" multiple="multiple"><option value="">__Fields picked up in this session__:</option><option value="languagevisibility-fields-1.fallbackorder">languagevisibility-fields-1: fallback order (fallbackorder, type: rel)</option><option value="languagevisibility-fields-1.defaultvisibility">languagevisibility-fields-1:  (defaultvisibility, type: select)</option><option value="languagevisibility-fields-2.visibility">languagevisibility-fields-2: language visibility (visibility, type: input)</option><option value="languagevisibility-fields-3.visibility">languagevisibility-fields-3: language visibility (visibility, type: input)</option></select></span></td></tr></table><hr /><table border="0" cellpadding="2" cellspacing="2"><tr bgcolor=""><td><strong><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Extend existing Tables</span></strong></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Add custom fields to existing tables, such as the "pages", "tt_content", "fe_users" or "be_users" table.</span></td></tr><tr><td></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>Which table:<br /></strong><a name="06eef7379a"></a><select name="kickstarter[wizArray_upd][fields][3][which_table]" onchange="setFormAnchorPoint('06eef7379a');" title="WOP: [fields][3][which_table]"><option value="be_groups">be_groups (Backend Groups)</option><option value="be_users">be_users (Backend Users)</option><option value="fe_groups">fe_groups (Frontend Groups)</option><option value="fe_users">fe_users (Frontend Users)</option><option value="index_config">index_config (Indexing Configuration)</option><option value="pages">pages (Pages)</option><option value="pages_language_overlay">pages_language_overlay (Alternative Page Language)</option><option value="static_countries">static_countries (Countries)</option><option value="static_country_zones">static_country_zones (Country subdivisions)</option><option value="static_currencies">static_currencies (Currencies)</option><option value="static_languages">static_languages (Languages)</option><option value="static_markets">static_markets (Markets)</option><option value="static_taxes">static_taxes (Static taxes)</option><option value="static_template">static_template (Static templates)</option><option value="static_territories">static_territories (Territory)</option><option value="sys_domain">sys_domain (Domain)</option><option value="sys_filemounts">sys_filemounts (Filemount)</option><option value="sys_language">sys_language (Website Language)</option><option value="sys_note">sys_note (Internal note)</option><option value="sys_template">sys_template (Template)</option><option value="sys_workspace">sys_workspace (Workspace)</option><option value="tt_content" selected="selected">tt_content (Content)</option><option value="tt_news">tt_news (News)</option><option value="tt_news_cat">tt_news_cat (News category)</option><option value="tx_aoewebex_regions">tx_aoewebex_regions (additional Regions)</option><option value="tx_ccdevlog">tx_ccdevlog (DevLog)</option><option value="tx_l10nmgr_cfg">tx_l10nmgr_cfg (L10N Manager Configuration)</option><option value="tx_l10nmgr_priorities">tx_l10nmgr_priorities (Localization Priority)</option><option value="tx_rtehtmlarea_acronym">tx_rtehtmlarea_acronym (Acronym)</option><option value="tx_templavoila_datastructure">tx_templavoila_datastructure (TemplaVoilà Data Structure)</option><option value="tx_templavoila_tmplobj">tx_templavoila_tmplobj (TemplaVoilà Template Object)</option></select> <a href="#" title="Select the table which should be extended with these extra fields." style="cursor:help" onclick="alert(String.fromCharCode(83,101,108,101,99,116,32,116,104,101,32,116,97,98,108,101,32,119,104,105,99,104,32,115,104,111,117,108,100,32,98,101,32,101,120,116,101,110,100,101,100,32,119,105,116,104,32,116,104,101,115,101,32,101,120,116,114,97,32,102,105,101,108,100,115,46));return FALSE;">(What is this?)</a></span><input type="hidden" name="kickstarter[wizArray_upd][fields][3][title]" value="tt_content (Content)" /></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>FIELD:</strong> <em>visibility</em></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="36228c274d"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][1][fieldname]" value="visibility" style="width:200px;" onchange="setFormAnchorPoint('36228c274d');" title="WOP: [fields][3][fields][1][fieldname]"> (Remove:<a name="1a67a8bbd8"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][_DELETE]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][_DELETE]" value="1" onclick="setFormAnchorPoint('1a67a8bbd8');" title="WOP: [fields][3][fields][1][_DELETE]">)<input type="image" hspace="2" src="../../../../typo3/gfx/pil2up.gif" name="kickstarter_CMD_visibility_UP" onclick="setFormAnchorPoint('36228c274d');" /><input type="image" hspace="2" src="../../../../typo3/gfx/pil2down.gif" name="kickstarter_CMD_visibility_DOWN" onclick="setFormAnchorPoint('36228c274d');" /><input type="image" hspace="2" src="../../../../typo3/gfx/savesnapshot.gif" name="kickstarter_CMD_visibility_SAVE" onclick="setFormAnchorPoint('36228c274d');" title="Save this field setting as a preset." /></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="c8d9c54018"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][1][title]" value="language visibility" style="width:200px;" onchange="setFormAnchorPoint('c8d9c54018');" title="WOP: [fields][3][fields][1][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="970c8df5fb"></a><select name="kickstarter[wizArray_upd][fields][3][fields][1][type]" onchange="setFormAnchorPoint('970c8df5fb');" title="WOP: [fields][3][fields][1][type]"><option value=""></option><option value="input" selected="selected">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="22a929a290"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('22a929a290');" title="WOP: [fields][3][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input.png" width="297" height="32" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><a name="dc95634219"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_size]" value="" style="width:50px;" onchange="setFormAnchorPoint('dc95634219');" title="WOP: [fields][3][fields][1][conf_size]"> Field width (5-48 relative, 30 default)<br /><a name="9dd67d9b69"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_max]" value="" style="width:50px;" onchange="setFormAnchorPoint('9dd67d9b69');" title="WOP: [fields][3][fields][1][conf_max]"> Max characters<br /><a name="9ef6daaa7c"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_required]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_required]" value="1" onclick="setFormAnchorPoint('9ef6daaa7c');" title="WOP: [fields][3][fields][1][conf_required]">Required<br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input_required.png" width="129" height="34" hspace=20 vspace="5" border="1" style="border:solid 1px;" /><br /><br /><a name="9e5b22b36f"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_varchar]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_varchar]" value="1" onclick="setFormAnchorPoint('9e5b22b36f');" title="WOP: [fields][3][fields][1][conf_varchar]">Create VARCHAR, not TINYTEXT field<br /></blockquote></span></td></tr>
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="970c8df5fb"></a><select name="kickstarter[wizArray_upd][fields][3][fields][1][type]" onchange="setFormAnchorPoint('970c8df5fb');" title="WOP: [fields][3][fields][1][type]"><option value=""></option><option value="input" selected="selected">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="22a929a290"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('22a929a290');" title="WOP: [fields][3][fields][1][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input.png" width="297" height="32" vspace="5" border="1" style="border:solid 1px;" /><br /><blockquote><a name="dc95634219"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_size]" value="" style="width:50px;" onchange="setFormAnchorPoint('dc95634219');" title="WOP: [fields][3][fields][1][conf_size]"> Field width (5-48 relative, 30 default)<br /><a name="9dd67d9b69"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_max]" value="" style="width:50px;" onchange="setFormAnchorPoint('9dd67d9b69');" title="WOP: [fields][3][fields][1][conf_max]"> Max characters<br /><a name="9ef6daaa7c"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_required]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_required]" value="1" onclick="setFormAnchorPoint('9ef6daaa7c');" title="WOP: [fields][3][fields][1][conf_required]">Required<br /><img src="../../../../typo3conf/ext/kickstarter/res/t_input_required.png" width="129" height="34" hspace=20 vspace="5" border="1" style="border:solid 1px;" /><br /><br /><a name="9e5b22b36f"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_varchar]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][1][conf_varchar]" value="1" onclick="setFormAnchorPoint('9e5b22b36f');" title="WOP: [fields][3][fields][1][conf_varchar]">Create VARCHAR, not TINYTEXT field<br /></blockquote></span></td></tr>
 </table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><strong>NEW FIELD:</strong></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><table border="0" cellpadding="0" cellspacing="0">
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field name:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="922f3eb3c1"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][2][fieldname]" value="" style="width:200px;" onchange="setFormAnchorPoint('922f3eb3c1');" title="WOP: [fields][3][fields][2][fieldname]"></span></td></tr>
        <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field title:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="dcc7b1d034"></a><input type="text" name="kickstarter[wizArray_upd][fields][3][fields][2][title]" value="" style="width:200px;" onchange="setFormAnchorPoint('dcc7b1d034');" title="WOP: [fields][3][fields][2][title]"> [English]</span></td></tr>
-       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="97d5b45b10"></a><select name="kickstarter[wizArray_upd][fields][3][fields][2][type]" onchange="setFormAnchorPoint('97d5b45b10');" title="WOP: [fields][3][fields][2][type]"><option value="" selected="selected"></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="ea341ef41b"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][2][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('ea341ef41b');" title="WOP: [fields][3][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return false;">(What is this?)</a><br /></span></td></tr>
+       <tr><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;">Field type:</span></td><td valign="top"><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><a name="97d5b45b10"></a><select name="kickstarter[wizArray_upd][fields][3][fields][2][type]" onchange="setFormAnchorPoint('97d5b45b10');" title="WOP: [fields][3][fields][2][type]"><option value="" selected="selected"></option><option value="input">String input</option><option value="input+">String input, advanced</option><option value="textarea">Text area</option><option value="textarea_rte">Text area with RTE</option><option value="textarea_nowrap">Text area, No wrapping</option><option value="check">Checkbox, single</option><option value="check_4">Checkbox, 4 boxes in a row</option><option value="check_10">Checkbox, 10 boxes in two rows (max)</option><option value="link">Link</option><option value="date">Date</option><option value="datetime">Date and time</option><option value="integer">Integer, 10-1000</option><option value="select">Selectorbox</option><option value="radio">Radio buttons</option><option value="rel">Database relation</option><option value="files">Files</option><option value="none">Not editable, only displayed</option><option value="passthrough">[Passthrough]</option></select><a name="ea341ef41b"></a><input type="hidden" name="kickstarter[wizArray_upd][fields][3][fields][2][excludeField]" value="0"><input type="checkbox" name="kickstarter[wizArray_upd][fields][3][fields][2][excludeField]" value="1" checked="checked" onclick="setFormAnchorPoint('ea341ef41b');" title="WOP: [fields][3][fields][2][excludeField]"> Is Exclude-field  <a href="#" title="If a field is marked &quot;Exclude-field&quot;, users can edit it ONLY if the field is specifically listed in one of the backend user groups of the user.\nIn other words, if a field is marked &quot;Exclude-field&quot; you can control which users can edit it and which cannot." style="cursor:help" onclick="alert(String.fromCharCode(73,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,44,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,79,78,76,89,32,105,102,32,116,104,101,32,102,105,101,108,100,32,105,115,32,115,112,101,99,105,102,105,99,97,108,108,121,32,108,105,115,116,101,100,32,105,110,32,111,110,101,32,111,102,32,116,104,101,32,98,97,99,107,101,110,100,32,117,115,101,114,32,103,114,111,117,112,115,32,111,102,32,116,104,101,32,117,115,101,114,46,92,110,73,110,32,111,116,104,101,114,32,119,111,114,100,115,44,32,105,102,32,97,32,102,105,101,108,100,32,105,115,32,109,97,114,107,101,100,32,34,69,120,99,108,117,100,101,45,102,105,101,108,100,34,32,121,111,117,32,99,97,110,32,99,111,110,116,114,111,108,32,119,104,105,99,104,32,117,115,101,114,115,32,99,97,110,32,101,100,105,116,32,105,116,32,97,110,100,32,119,104,105,99,104,32,99,97,110,110,111,116,46));return FALSE;">(What is this?)</a><br /></span></td></tr>
 </table></span></td></tr><tr bgcolor=""><td><span style="font-family:verdana,arial,sans-serif; font-size:10px;"><br /><br />Load preset fields: <br /><select name="kickstarter[_PRESET][]" size="5" multiple="multiple"><option value="">__Fields picked up in this session__:</option><option value="languagevisibility-fields-1.fallbackorder">languagevisibility-fields-1: fallback order (fallbackorder, type: rel)</option><option value="languagevisibility-fields-1.defaultvisibility">languagevisibility-fields-1:  (defaultvisibility, type: select)</option><option value="languagevisibility-fields-2.visibility">languagevisibility-fields-2: language visibility (visibility, type: input)</option><option value="languagevisibility-fields-3.visibility">languagevisibility-fields-3: language visibility (visibility, type: input)</option></select></span></td></tr></table>
        </body>
        </html>
\ No newline at end of file
index 9635a77..3987c36 100644 (file)
@@ -22,9 +22,12 @@ return array(
        'tx_languagevisibility_ttnewselement' => $extensionClassesPath . 'class.tx_languagevisibility_ttnewselement.php',
        'tx_languagevisibility_visibility' => $extensionClassesPath . 'class.tx_languagevisibility_visibility.php',
        'tx_languagevisibility_visibilityservice' => $extensionClassesPath . 'class.tx_languagevisibility_visibilityService.php',
+
        'tx_languagevisibility_daocommon' => $extensionClassesPath . 'dao/class.tx_languagevisibility_daocommon.php',
        'tx_languagevisibility_daocommon_stub' => $extensionClassesPath . 'dao/class.tx_languagevisibility_daocommon_stub.php',
+
        'tx_languagevisibility_invalidrowexception' => $extensionClassesPath . 'exceptions/class.tx_languagevisibility_InvalidRowException.php',
+
        'tx_languagevisibility_hooks_alt_doc' => $extensionPath . 'hooks/class.tx_languagevisibility_hooks_alt_doc.php',
        'tx_languagevisibility_hooks_aoe_wspreview' => $extensionPath . 'hooks/class.tx_languagevisibility_hooks_aoe_wspreview.php',
        'tx_languagevisibility_hooks_crawler' => $extensionPath . 'hooks/class.tx_languagevisibility_hooks_crawler.php',
@@ -32,11 +35,13 @@ return array(
        'tx_languagevisibility_hooks_t3lib_tcemain' => $extensionPath . 'hooks/class.tx_languagevisibility_hooks_t3lib_tcemain.php',
        'tx_languagevisibility_hooks_t3lib_userauthgroup' => $extensionPath . 'hooks/class.tx_languagevisibility_hooks_t3lib_userauthgroup.php',
        'tx_languagevisibility_hooks_templavoila_pi1' => $extensionPath . 'hooks/class.tx_languagevisibility_hooks_templavoila_pi1.php',
+
        'tx_languagevisibility_modfunc1' => $extensionPath . 'modfunc1/class.tx_languagevisibility_modfunc1.php',
+
        'tx_languagevisibility_beuser' => $extensionPath . 'patch/lib/class.tx_languagevisibility_beUser.php',
-       'tx_languagevisibility_commandmap' => $extensionPath . 'patch/lib/class.tx_languagevisibility_commandMap.php',
+
        'tx_languagevisibility_basetestcase' => $extensionPath . 'tests/tx_languagevisibility_baseTestcase.php',
        'tx_languagevisibility_databasetestcase' => $extensionPath . 'tests/tx_languagevisibility_databaseTestcase.php',
+       'tx_languagevisibility_databaseTtContentTestcase' => $extensionPath . 'tests/tx_languagevisibility_databaseTtContentTestcase.php',
        'tx_languagevisibility_tests_helper_environmenthelper' => $extensionPath . 'tests/classes/class.tx_languagevisibility_tests_helper_environmentSaver.php',
 );
-?>
\ No newline at end of file
index a3a48ac..a0b87a3 100644 (file)
@@ -1,17 +1,8 @@
   # cat=basic//20; type=boolean; label=Inheritance: Enable inherited settings for pages
 inheritanceEnabled = 0
 
-  # cat=basic//20; type=boolean; label=Use "if translated" as default: relevant if user creates a record without having access to the default-lang - if disabled "no" will be choosen
+  # cat=basic//20; type=boolean; label=Use "if translated" as default: Relevant if user creates a record without having access to the default language - if disabled "no" will be chosen
 translatedAsDefaultEnabled = 0
 
-  # cat=basic//30; type=boolean; label=Cache Layer: Enable this option to use the refetching and caching of records (less db querys, more memory usage)
+  # cat=basic//30; type=boolean; label=Cache Layer: Enable this option to use the refetching and caching of records (less db queries, more memory usage)
 useCache = 0
-
-  # cat=basic//30; type=boolean; label=Enable Cut Copy and Move restrictioons: Option makes sure this user has the rights to perform C,C&M actions on elements before the action is triggered (not relevant if used with TYPO3 4.3+)
-observeCutCopyMoveAction = true
-
-  # cat=basic//30; type=boolean; label=Restrict Cut Copy and Move: This option disables cut, copy and move for elements with overlays (not relevant if used with TYPO3 4.3+)
-restrictCutCopyMoveForOverlays = 0
-
-  # cat=basic//10; type=boolean; label=Apply Patch: Add PATCH to TemplaVoila PageModul (not relevant if used with TemplaVoila 1.4+)
-applyPatchTV = 0
index 1c2bfe6..61b7578 100644 (file)
@@ -42,5 +42,3 @@ $EM_CONF[$_EXTKEY] = array(
                ),
        ),
 );
-
-?>
index bc22016..e71e788 100644 (file)
@@ -1,97 +1,33 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
-
-
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['languagevisibility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_tcemain.php:tx_languagevisibility_hooks_t3lib_tcemain';
-
-if (version_compare(TYPO3_version,'4.4','>')) {
-               // assuming that we get our patch into the TYPO3 core
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_page.php:tx_languagevisibility_hooks_t3lib_page';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_page.php:tx_languagevisibility_hooks_t3lib_page';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['checkFullLanguagesAccess']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_userauthgroup.php:tx_languagevisibility_hooks_t3lib_userauthgroup->checkFullLanguagesAccess';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_tslib_fe.php:tx_languagevisibility_hooks_tslib_fe->settingLanguage_preProcess';
-
-       $TYPO3_CONF_VARS['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_alt_doc.php:tx_languagevisibility_hooks_alt_doc->makeEditForm_accessCheck';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['cms/tslib/class.tslib_menu.php']['filterMenuPages']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_tslib_menu.php:tx_languagevisibility_hooks_tslib_menu';
-
-} else if (version_compare(TYPO3_version,'4.3','>')) {
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_page.php:tx_languagevisibility_hooks_t3lib_page';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_page.php:tx_languagevisibility_hooks_t3lib_page';
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_page.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_t3lib_page.php';
-       include_once(t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_t3lib_page.php');
-
-               // that's really odd - due to inheritance we've to XCLASS beuserauth to introduce functionality which is meant to exists in t3lib_userauthgroup
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_beuserauth.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_t3lib_beuserauth.php';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['checkFullLanguagesAccess']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_userauthgroup.php:tx_languagevisibility_hooks_t3lib_userauthgroup->checkFullLanguagesAccess';
-
-       $TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.tslib_fe.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_tslib_fe.php';
-       $TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_tslib_fe.php:tx_languagevisibility_hooks_tslib_fe->settingLanguage_preProcess';
-
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tcemain.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_t3lib_tcemain.php';
-
-               //modify permission check for creating pages
-       $TYPO3_CONF_VARS['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_alt_doc.php:tx_languagevisibility_hooks_alt_doc->makeEditForm_accessCheck';
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_doc.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_SCalt_doc.php';
-
-       if ($TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.tslib_menu.php']) {
-               $TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.ux_tslib_menu.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_ux_tslib_menu.php';
-       } else {
-               $TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.tslib_menu.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.3/class.ux_tslib_menu.php';
-       }
-       $TYPO3_CONF_VARS['SC_OPTIONS']['cms/tslib/class.tslib_menu.php']['filterMenuPages']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_tslib_menu.php:tx_languagevisibility_hooks_tslib_menu';
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
-} else {
-       require_once(t3lib_extMgm::extPath($_EXTKEY) . 'class.tx_languagevisibility_fieldvisibility.php');
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_page.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_t3lib_page.php';
-       include_once(t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_t3lib_page.php');
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['languagevisibility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_tcemain.php:tx_languagevisibility_hooks_t3lib_tcemain';
 
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_beuserauth.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_t3lib_beuserauth.php';
 
-       $TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.tslib_fe.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_tslib_fe.php';
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tcemain.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_t3lib_tcemain.php';
+       // assuming that we get our patch into the TYPO3 core
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPageOverlay']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_page.php:tx_languagevisibility_hooks_t3lib_page';
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getRecordOverlay']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_page.php:tx_languagevisibility_hooks_t3lib_page';
+$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_userauthgroup.php']['checkFullLanguagesAccess']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_t3lib_userauthgroup.php:tx_languagevisibility_hooks_t3lib_userauthgroup->checkFullLanguagesAccess';
+$TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['settingLanguage_preProcess']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_tslib_fe.php:tx_languagevisibility_hooks_tslib_fe->settingLanguage_preProcess';
 
-               //modify permission check for creating pages
-       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/alt_doc.php']=t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_SCalt_doc.php';
+$TYPO3_CONF_VARS['SC_OPTIONS']['typo3/alt_doc.php']['makeEditForm_accessCheck']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_alt_doc.php:tx_languagevisibility_hooks_alt_doc->makeEditForm_accessCheck';
+$TYPO3_CONF_VARS['SC_OPTIONS']['cms/tslib/class.tslib_menu.php']['filterMenuPages']['languagevisility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_tslib_menu.php:tx_languagevisibility_hooks_tslib_menu';
 
-       if ($TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.tslib_menu.php']) {
-               $TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.ux_tslib_menu.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_ux_tslib_menu.php';
-       } else {
-               $TYPO3_CONF_VARS['FE']['XCLASS']['tslib/class.tslib_menu.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/core_4.2/class.ux_tslib_menu.php';
-       }
-}
 
        // overriding option because this is done by languagevisibility and will not work if set
 $TYPO3_CONF_VARS['FE']['hidePagesIfNotTranslatedByDefault'] = 0;
 
-       // TemplaVoila is a bit complicated here - there are optional and non-optional parts
-       // most of the aren't really relevant if used with TemplaVoila 1.4.2 or AOE_TemplaVoila
-$confArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['languagevisibility']);
-if (t3lib_extMgm::isLoaded('templavoila')) {
-       $realExtKey = $_EXTKEY;
-       $_EXTKEY = 'templavoila';
-       include(t3lib_extMgm::extPath($_EXTKEY) . 'ext_emconf.php');
-       $version = $EM_CONF[$_EXTKEY]['version'];
-               // Restore the extension key
-       $_EXTKEY = $realExtKey;
-       $versionNumberCheck = (version_compare(TYPO3_version, '4.6.0', '>=') ? t3lib_div::int_from_ver($version) : t3lib_utility_VersionNumber::convertVersionNumberToInteger($version)) < 1004003;
-       if ($versionNumberCheck) {
-               if($confArr['applyPatchTV']==1 && !t3lib_extMgm::isLoaded('aoe_templavoila')) {
-                       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/templavoila/mod1/index.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/tv/class.ux_tx_templavoila_module1.php';
-                       $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/templavoila/class.tx_templavoila_api.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/tv/class.ux_tx_templavoila_api.php';
-               }
-               $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/templavoila/pi1/class.tx_templavoila_pi1.php'] = t3lib_extMgm::extPath($_EXTKEY) . 'patch/tv/class.ux_tx_templavoila_pi1.php';
-       }
-}
-
        //adding inheriatance flag to the addRootlineField
-$rootlinefields = &$GLOBALS["TYPO3_CONF_VARS"]["FE"]["addRootLineFields"];
-$NewRootlinefields = "tx_languagevisibility_inheritanceflag_original, tx_languagevisibility_inheritanceflag_overlayed";
-$rootlinefields .= (empty($rootlinefields))? $NewRootlinefields : ','.$NewRootlinefields;
+$rootlinefields = &$GLOBALS['TYPO3_CONF_VARS']['FE']['addRootLineFields'];
+$newRootlinefields = 'tx_languagevisibility_inheritanceflag_original, tx_languagevisibility_inheritanceflag_overlayed';
+$rootlinefields .= (empty($rootlinefields))? $newRootlinefields : ',' . $newRootlinefields;
 
        // adding the inheritance flag to the pageOverlayFields
-$pagesOverlayfields = &$GLOBALS["TYPO3_CONF_VARS"]["FE"]["pageOverlayFields"];
-$NewPagesOverlayfields = "tx_languagevisibility_inheritanceflag_overlayed";
-$pagesOverlayfields .= (empty($pagesOverlayfields)) ? $NewPagesOverlayfields : ','.$NewPagesOverlayfields;
+$pagesOverlayfields = &$GLOBALS['TYPO3_CONF_VARS']['FE']['pageOverlayFields'];
+$newPagesOverlayfields = 'tx_languagevisibility_inheritanceflag_overlayed';
+$pagesOverlayfields .= (empty($pagesOverlayfields)) ? $newPagesOverlayfields : ',' . $newPagesOverlayfields;
 
 /**
  * Extension-Hooks
@@ -108,4 +44,3 @@ if (t3lib_extMgm::isLoaded('phpunit')) {
 if (t3lib_extMgm::isLoaded('aoe_wspreview')) {
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['aoe_wspreview/system/class.tx_aoewspreview_system_workspaceService.php']['createDiff']['languagevisibility'] = 'EXT:languagevisibility/hooks/class.tx_languagevisibility_hooks_aoe_wspreview.php:tx_languagevisibility_hooks_aoe_wspreview->aoewspreview_createDiff';
 }
-?>
\ No newline at end of file
index 65228f4..7b5f9de 100644 (file)
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
-
-
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 
-$tempColumns = Array (
-       "tx_languagevisibility_fallbackorder" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorder",
-               'l10n_display'=>'hideDiff',
-               "config" => Array (
-                       "type" => "select",
-                       "foreign_table" => "sys_language",
-                       "foreign_table_where" => " ORDER BY sys_language.title",
-                       "items" => Array (
-                               Array("default", "999"),
+$tempColumns = array(
+       'tx_languagevisibility_fallbackorder' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorder',
+               'l10n_display' => 'hideDiff',
+               'config' => array(
+                       'type' => 'select',
+                       'foreign_table' => 'sys_language',
+                       'foreign_table_where' => ' ORDER BY sys_language.title',
+                       'items' => array(
+                               array('default', '999'),
                        ),
-                       "size" => 10,
-                       "minitems" => 0,
-                       "maxitems" => 10,
+                       'size' => 10,
+                       'minitems' => 0,
+                       'maxitems' => 10,
                )
        ),
-       "tx_languagevisibility_fallbackorderel" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorderel",
-        "displayCond" => "FIELD:tx_languagevisibility_complexfallbacksetting:>=:1",
-               'l10n_display'=>'hideDiff',
-               "config" => Array (
-                       "type" => "select",
-                       "foreign_table" => "sys_language",
-                       "foreign_table_where" => " ORDER BY sys_language.title",
-                       "items" => Array (
-                               Array("default", "999"),
+       'tx_languagevisibility_fallbackorderel' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorderel',
+               'displayCond' => 'FIELD:tx_languagevisibility_complexfallbacksetting:>=:1',
+               'l10n_display' => 'hideDiff',
+               'config' => array(
+                       'type' => 'select',
+                       'foreign_table' => 'sys_language',
+                       'foreign_table_where' => ' ORDER BY sys_language.title',
+                       'items' => array(
+                               array('default', '999'),
                        ),
-                       "size" => 10,
-                       "minitems" => 0,
-                       "maxitems" => 10,
+                       'size' => 10,
+                       'minitems' => 0,
+                       'maxitems' => 10,
                )
        ),
-       "tx_languagevisibility_fallbackorderttnewsel" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorderttnewsel",
-        "displayCond" => "FIELD:tx_languagevisibility_complexfallbacksetting:>=:1",
-               'l10n_display'=>'hideDiff',
-               "config" => Array (
-                       "type" => "select",
-                       "foreign_table" => "sys_language",
-                       "foreign_table_where" => " ORDER BY sys_language.title",
-                       "items" => Array (
-                               Array("default", "999"),
+       'tx_languagevisibility_fallbackorderttnewsel' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_fallbackorderttnewsel',
+               'displayCond' => 'FIELD:tx_languagevisibility_complexfallbacksetting:>=:1',
+               'l10n_display' => 'hideDiff',
+               'config' => array(
+                       'type' => 'select',
+                       'foreign_table' => 'sys_language',
+                       'foreign_table_where' => ' ORDER BY sys_language.title',
+                       'items' => array(
+                               array('default', '999'),
                        ),
-                       "size" => 10,
-                       "minitems" => 0,
-                       "maxitems" => 10,
+                       'size' => 10,
+                       'minitems' => 0,
+                       'maxitems' => 10,
                )
        ),
-       "tx_languagevisibility_defaultvisibility" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibility",
-               "config" => Array (
-                       "type" => "select",
-                       "items" => Array (
-                               Array('',''),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes", "yes"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no", "no"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t", "t"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f", "f"),
+       'tx_languagevisibility_defaultvisibility' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibility',
+               'config' => array(
+                       'type' => 'select',
+                       'items' => array(
+                               array('',''),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes', 'yes'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no', 'no'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t', 't'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f', 'f'),
                        ),
-                       'default'=>'f',
-                       "size" => 1,
-                       "maxitems" => 1,
+                       'default' => 'f',
+                       'size' => 1,
+                       'maxitems' => 1,
                )
        ),
-       "tx_languagevisibility_defaultvisibilityel" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibilityel",
-               "config" => Array (
-                       "type" => "select",
-                       "items" => Array (
-                               Array('',''),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes", "yes"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no", "no"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t", "t"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f", "f"),
+       'tx_languagevisibility_defaultvisibilityel' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibilityel',
+               'config' => array(
+                       'type' => 'select',
+                       'items' => array(
+                               array('',''),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes', 'yes'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no', 'no'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t', 't'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f', 'f'),
                        ),
-                       'default'=>'f',
-                       "size" => 1,
-                       "maxitems" => 1,
+                       'default' => 'f',
+                       'size' => 1,
+                       'maxitems' => 1,
                )
        ),
-       "tx_languagevisibility_defaultvisibilityttnewsel" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibilityttnewsel",
-               "config" => Array (
-                       "type" => "select",
-                       "items" => Array (
-                               Array('',''),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes", "yes"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no", "no"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t", "t"),
-                               Array("LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f", "f"),
+       'tx_languagevisibility_defaultvisibilityttnewsel' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_defaultvisibilityttnewsel',
+               'config' => array(
+                       'type' => 'select',
+                       'items' => array(
+                               array('',''),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.yes', 'yes'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.no', 'no'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.t', 't'),
+                               array('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.f', 'f'),
                        ),
-                       'default'=>'f',
-                       "size" => 1,
-                       "maxitems" => 1,
+                       'default' => 'f',
+                       'size' => 1,
+                       'maxitems' => 1,
                )
        ),
-       "tx_languagevisibility_complexfallbacksetting" => Array (
-               "exclude" => 0,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_complexfallbacksetting",
-               "config" => Array (
-                       "type" => "check"
+       'tx_languagevisibility_complexfallbacksetting' => array(
+               'exclude' => 0,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:sys_language.tx_languagevisibility_complexfallbacksetting',
+               'config' => array(
+                       'type' => 'check'
                )
        ),
-
 );
 
-
-t3lib_div::loadTCA("sys_language");
-t3lib_extMgm::addTCAcolumns("sys_language",$tempColumns,1);
-t3lib_extMgm::addToAllTCAtypes("sys_language","tx_languagevisibility_defaultvisibility, tx_languagevisibility_fallbackorder;;;;1-1-1,tx_languagevisibility_complexfallbacksetting, tx_languagevisibility_defaultvisibilityttnewsel, tx_languagevisibility_fallbackorderttnewsel;;;;1-1-1, tx_languagevisibility_defaultvisibilityel, tx_languagevisibility_fallbackorderel;;;;1-1-1");
-$tempColumnsElements = Array (
-       "tx_languagevisibility_visibility" => Array (
-               "exclude" => 1,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:pages.tx_languagevisibility_visibility",
-               "config" => Array (
-                       "type" => "user",
-                       "size" => "30",
-                       "userFunc" => 'tx_languagevisibility_fieldvisibility->user_fieldvisibility',
+t3lib_extMgm::addTCAcolumns('sys_language', $tempColumns, 1);
+t3lib_extMgm::addToAllTCAtypes('sys_language', 'tx_languagevisibility_defaultvisibility, tx_languagevisibility_fallbackorder;;;;1-1-1,tx_languagevisibility_complexfallbacksetting, tx_languagevisibility_defaultvisibilityttnewsel, tx_languagevisibility_fallbackorderttnewsel;;;;1-1-1, tx_languagevisibility_defaultvisibilityel, tx_languagevisibility_fallbackorderel;;;;1-1-1');
+$tempColumnsElements = array(
+       'tx_languagevisibility_visibility' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'config' => array(
+                       'type' => 'user',
+                       'size' => '30',
+                       'userFunc' => 'tx_languagevisibility_fieldvisibility->user_fieldvisibility',
                )
        )
 );
 
-
-$tempColumnsPages = Array (
-       "tx_languagevisibility_visibility" => Array (
-               "exclude" => 1,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:pages.tx_languagevisibility_visibility",
-               "config" => Array (
-                       "type" => "user",
-                       "size" => "30",
-                       "userFunc" => 'tx_languagevisibility_fieldvisibility->user_fieldvisibility',
+$tempColumnsPages = array(
+       'tx_languagevisibility_visibility' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'config' => array(
+                       'type' => 'user',
+                       'size' => '30',
+                       'userFunc' => 'tx_languagevisibility_fieldvisibility->user_fieldvisibility',
                )
        ),
-       "tx_languagevisibility_inheritanceflag_original" => Array (
-               "exclude" => 1,
-               "label" => "LLL:EXT:l10nmgr/locallang_db.xml:pages.tx_languagevisibility_visibility",
-               "config" => Array (
-                       "type" => "check",
-                       "default" => "0"
+       'tx_languagevisibility_inheritanceflag_original' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:l10nmgr/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'config' => array(
+                       'type' => 'check',
+                       'default' => '0'
                )
        ),
-       "tx_languagevisibility_inheritanceflag_overlayed" => Array (
-               "exclude" => 1,
-               "label" => "LLL:EXT:l10nmgr/locallang_db.xml:pages.tx_languagevisibility_visibility",
-               "config" => Array (
-                       "type" => "check",
-                       "default" => "0"
+       'tx_languagevisibility_inheritanceflag_overlayed' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:l10nmgr/locallang_db.xml:pages.tx_languagevisibility_visibility',
+               'config' => array(
+                       'type' => 'check',
+                       'default' => '0'
                )
        ),
 );
 
+t3lib_extMgm::addTCAcolumns('pages', $tempColumnsPages, 1);
+t3lib_extMgm::addToAllTCAtypes('pages', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1', '', 'after:php_tree_stop');
 
-t3lib_div::loadTCA("pages");
-t3lib_extMgm::addTCAcolumns("pages",$tempColumnsPages,1);
-if (version_compare(TYPO3_version,'4.5','<')) {
-       t3lib_extMgm::addToAllTCAtypes("pages","tx_languagevisibility_visibility;;;;1-1-1", '', 'after:l18n_cfg');
-       t3lib_extMgm::addToAllTCAtypes("pages","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname", '', 'before:l18n_cfg');
-} else {
-       t3lib_extMgm::addToAllTCAtypes("pages","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1", '', 'after:php_tree_stop');
-}
+t3lib_extMgm::addTCAcolumns('pages_language_overlay', $tempColumnsPages,1);
+t3lib_extMgm::addToAllTCAtypes('pages_language_overlay', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1', '', '');
 
-t3lib_div::loadTCA("pages_language_overlay");
-t3lib_extMgm::addTCAcolumns("pages_language_overlay",$tempColumnsPages,1);
-if (version_compare(TYPO3_version,'4.5','<')) {
-       t3lib_extMgm::addToAllTCAtypes("pages_language_overlay","tx_languagevisibility_visibility;;;;1-1-1", '', 'after:l18n_cfg');
-       t3lib_extMgm::addToAllTCAtypes("pages_language_overlay","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname", '', 'before:l18n_cfg');
-} else {
-       t3lib_extMgm::addToAllTCAtypes("pages_language_overlay","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1", '', '');
-}
+t3lib_extMgm::addTCAcolumns('tt_news', $tempColumnsElements,1);
+t3lib_extMgm::addToAllTCAtypes('tt_news', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1');
 
-t3lib_div::loadTCA("tt_news");
-t3lib_extMgm::addTCAcolumns("tt_news",$tempColumnsElements,1);
-t3lib_extMgm::addToAllTCAtypes("tt_news","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1");
+t3lib_extMgm::addTCAcolumns('tt_content', $tempColumnsElements,1);
+t3lib_extMgm::addToAllTCAtypes('tt_content', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1,sys_language_uid,l18n_parent', '', 'before:--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended');
 
-t3lib_div::loadTCA("tt_content");
-t3lib_extMgm::addTCAcolumns("tt_content",$tempColumnsElements,1);
-if (version_compare(TYPO3_version,'4.5','<')) {
-       t3lib_extMgm::addToAllTCAtypes('tt_content', "--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1,sys_language_uid,l18n_parent", '', 'before:sys_language_uid');
-       $GLOBALS['TCA']['tt_content']['palettes']['4']['showitem'] = str_replace('sys_language_uid,','',$GLOBALS['TCA']['tt_content']['palettes']['4']['showitem']);
-       $GLOBALS['TCA']['tt_content']['palettes']['4']['showitem'] = str_replace('l18n_parent,','',$GLOBALS['TCA']['tt_content']['palettes']['4']['showitem']);
-} else {
-       t3lib_extMgm::addToAllTCAtypes("tt_content","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_visibility;;;;1-1-1,sys_language_uid,l18n_parent", '', 'before:--div--;LLL:EXT:cms/locallang_ttc.xml:tabs.extended');
-       $GLOBALS['TCA']['tt_content']['palettes']['general']['showitem'] = str_replace('sys_language_uid;LLL:EXT:cms/locallang_ttc.xml:sys_language_uid_formlabel','',$GLOBALS['TCA']['tt_content']['palettes']['general']['showitem']);
-}
+$GLOBALS['TCA']['tt_content']['palettes']['general']['showitem'] = str_replace('sys_language_uid;LLL:EXT:cms/locallang_ttc.xml:sys_language_uid_formlabel', '', $GLOBALS['TCA']['tt_content']['palettes']['general']['showitem']);
 
-$GLOBALS['TCA']['tt_content']['ctrl']['dividers2tabs']=TRUE;
+$GLOBALS['TCA']['tt_content']['ctrl']['dividers2tabs'] = TRUE;
 
-$tempColumns = Array(
-       "tx_languagevisibility_allow_movecutdelete_foroverlays" => Array(
-               "exclude" => 1,
-               "label" => "LLL:EXT:languagevisibility/locallang_db.xml:be_groups.allow_movecutdelete_foroverlays:",
-               "config" => Array(
-                       "type" => "check"
+$tempColumns = array(
+       'tx_languagevisibility_allow_movecutdelete_foroverlays' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:languagevisibility/locallang_db.xml:be_groups.allow_movecutdelete_foroverlays:',
+               'config' => array(
+                       'type' => 'check'
                )
        ),
 );
 
-t3lib_div::loadTCA("be_groups");
-t3lib_extMgm::addTCAcolumns("be_groups",$tempColumns,1);
-t3lib_extMgm::addToAllTCAtypes("be_groups","--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_allow_movecutdelete_foroverlays;;;;1-1-1");
+t3lib_extMgm::addTCAcolumns('be_groups', $tempColumns, 1);
+t3lib_extMgm::addToAllTCAtypes('be_groups', '--div--;LLL:EXT:languagevisibility/locallang_db.xml:tabname,tx_languagevisibility_allow_movecutdelete_foroverlays;;;;1-1-1');
 
-if (TYPO3_MODE=="BE")    {
-    t3lib_extMgm::insertModuleFunction(
-        "web_info",
-        "tx_languagevisibility_modfunc1",
-        t3lib_extMgm::extPath($_EXTKEY)."modfunc1/class.tx_languagevisibility_modfunc1.php",
-        "LLL:EXT:languagevisibility/locallang_db.xml:moduleFunction.tx_languagevisibility_modfunc1"
-    );
+if (TYPO3_MODE=='BE') {
+       t3lib_extMgm::insertModuleFunction(
+               'web_info',
+               'tx_languagevisibility_modfunc1',
+               t3lib_extMgm::extPath($_EXTKEY) . 'modfunc1/class.tx_languagevisibility_modfunc1.php',
+               'LLL:EXT:languagevisibility/locallang_db.xml:moduleFunction.tx_languagevisibility_modfunc1'
+       );
 }
 
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['configuration'][] = 'tx_languagevisibility_reports_ConfigurationStatus';
-?>
\ No newline at end of file
index 819d51f..48483f7 100644 (file)
@@ -11,15 +11,13 @@ CREATE TABLE sys_language (
        tx_languagevisibility_defaultvisibilityttnewsel varchar(11) DEFAULT 't' NOT NULL
 );
 
-
-
 #
 # Table structure for table 'pages'
 #
 CREATE TABLE pages (
        tx_languagevisibility_visibility text NOT NULL,
        tx_languagevisibility_inheritanceflag_original tinyint(1) DEFAULT '0' NOT NULL,
-       tx_languagevisibility_inheritanceflag_overlayed tinyint(1) DEFAULT '0' NOT NULL,
+       tx_languagevisibility_inheritanceflag_overlayed tinyint(1) DEFAULT '0' NOT NULL
 );
 
 #
@@ -31,7 +29,6 @@ CREATE TABLE pages_language_overlay (
        tx_languagevisibility_inheritanceflag_overlayed tinyint(1) DEFAULT '0' NOT NULL
 );
 
-
 #
 # Table structure for table 'tt_content'
 #
@@ -39,7 +36,6 @@ CREATE TABLE tt_content (
        tx_languagevisibility_visibility text NOT NULL
 );
 
-
 #
 # Table structure for table 'tt_news'
 #
@@ -47,10 +43,9 @@ CREATE TABLE tt_news (
        tx_languagevisibility_visibility text NOT NULL
 );
 
-
 #
 # Table structure for table 'be_groups'
 #
 CREATE TABLE be_groups (
        tx_languagevisibility_allow_movecutdelete_foroverlays tinyint(1) DEFAULT '0' NOT NULL
-);
\ No newline at end of file
+);
index d938362..7038fd3 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Class/Function which manipulates the item-array for the  listing (see piFlexform).
  *
  * @author     Fabrizio Brance
  * @author     Timo Schmidt
  */
-
 class tx_languagevisibility_hooks_alt_doc {
 
+       /**
+        * @param $params
+        * @param $ref
+        * @return bool
+        */
        public function makeEditForm_accessCheck($params, &$ref) {
-               if (! $params['hasAccess'])
-                       return false;
+               if ( $params['hasAccess']) {
+                       return FALSE;
+               }
                $hasAccess = TRUE;
-               // if user wants to edit/create page record but has no access to default language!
+                       // if user wants to edit/create page record but has no access to default language!
                if ($params['table'] == 'pages' && ! $GLOBALS['BE_USER']->checkLanguageAccess(0)) {
                        $visibilityservice = t3lib_div::makeInstance('tx_languagevisibility_beservices');
                        if (! $visibilityservice->hasUserAccessToPageRecord($params['uid'], $params['cmd'])) {
@@ -44,5 +50,3 @@ class tx_languagevisibility_hooks_alt_doc {
                return $hasAccess;
        }
 }
-
-?>
\ No newline at end of file
index 7d2823c..881be64 100644 (file)
  *
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Class/Function which manipulates the item-array for the  listing (see piFlexform).
  *
  * @author     Fabrizio Brance
  * @author     Timo Schmidt
  */
-
 class tx_languagevisibility_hooks_aoe_wspreview {
 
        /**
@@ -35,13 +35,11 @@ class tx_languagevisibility_hooks_aoe_wspreview {
         *
         * @param array params
         * @return array element
-        * @author Fabrizio Branca <fabrizio.branca@aoemedia.de>
         */
        public function aoewspreview_createDiff(array $params) {
-
                $element = $params['element'];
 
-               if (/* ($params['table'] == 'tt_content') && */ ($params['fieldName'] == 'tx_languagevisibility_visibility')) {
+               if (($params['fieldName'] == 'tx_languagevisibility_visibility')) {
                        $diff = array();
 
                        $recordNew = unserialize($params['newRecord'][$params['fieldName']]);
@@ -58,34 +56,31 @@ class tx_languagevisibility_hooks_aoe_wspreview {
                        if (is_array($keyOfChangedLanguageSettings) && (count($keyOfChangedLanguageSettings) > 0)) {
                                foreach ( $keyOfChangedLanguageSettings as $key ) {
                                        if (empty($recordOld[$key]) && ($recordNew[$key] == '-')) {
-                                               // this is equal, too!
-                                               //we need to inform the user what happens because he doesn't understand
-                                               //what happend if the field tx_languagevisibility_visibility was configured as critical field
-                                               //and if was just initialized with default values.
+                                                       // this is equal, too!
+                                                       // we need to inform the user what happens because he doesn't understand
+                                                       // what happend if the field tx_languagevisibility_visibility was configured as critical field
+                                                       // and if was just initialized with default values.
                                                $diff[] = sprintf('%s Visibility was initialized with the default value (%s)', tx_mvc_common_typo3::getLanguageFlag($key, $params['newRecord']['pid']), $recordNew[$key]);
                                        } elseif (empty($recordNew[$key])) {
-                                               //in this case an old visibility setting has been changed to an empty value,
-                                               //this can happen when a new workspace version is created
+                                                       // in this case an old visibility setting has been changed to an empty value,
+                                                       // this can happen when a new workspace version is created
                                                $diff[0] = 'Languagevisibility was changed from ' . serialize($recordOld) . ' to ' . serialize($recordNew);
                                        } else {
-
                                                $diff[] = sprintf('%s Visibility changed from <span class="diff-r">%s</span> to <span class="diff-g">%s</span>', tx_mvc_common_typo3::getLanguageFlag($key, $params['newRecord']['pid']), $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.' . $recordOld[$key]), $GLOBALS['LANG']->sL('LLL:EXT:languagevisibility/locallang_db.xml:tx_languagevisibility_visibility.I.' . $recordNew[$key]));
                                        }
                                }
                        } else {
-                               //in this case the structure of the languagevisibility was changed but no visibility setting
+                               // in this case the structure of the languagevisibility was changed but no visibility setting
                        }
 
                        if (count($diff) > 0) {
                                $element['diffResult'] = implode('<br />', $diff);
                        } else {
-                               // element will be removed when returning "false"
-                               $element = false;
+                                       // element will be removed when returning "false"
+                               $element = FALSE;
                        }
                }
 
                return $element;
        }
 }
-
-?>
\ No newline at end of file
index 845ebb8..30fa993 100644 (file)
@@ -22,8 +22,6 @@
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once (t3lib_extMgm::extPath('languagevisibility') . 'class.tx_languagevisibility_feservices.php');
-
 class tx_languagevisibility_hooks_crawler {
 
        /**
@@ -55,15 +53,16 @@ class tx_languagevisibility_hooks_crawler {
        /**
         *
         * @param string $url   guess what
+        * @return array
         */
        protected static function extractIdAndLangFromUrl($url) {
 
-               // retrieving the id this way is save because that part is hardcoded in the crawler
+                       // retrieving the id this way is save because that part is hardcoded in the crawler
                $matches = array();
                preg_match('/\?id=(\d+)&?/', $url, $matches);
                $id = $matches[1];
 
-               // TODO: might need domain if no "L" is given
+                       // TODO: might need domain if no "L" is given
                $matches = array();
                if (! preg_match('/L=(\d+)&?/', $url, $matches)) {
                        $lang = 0;
@@ -74,5 +73,3 @@ class tx_languagevisibility_hooks_crawler {
                return array($id, $lang );
        }
 }
-
-?>
\ No newline at end of file
index b4574fd..258dea5 100644 (file)
@@ -46,7 +46,6 @@ class tx_languagevisibility_hooks_t3lib_page implements t3lib_pageSelect_getPage
         * @return void
         */
        public function getPageOverlay_preProcess(&$pageInput, &$lUid, t3lib_pageSelect $parent) {
-       
                if (is_int($pageInput)) {
                        $page_id = $pageInput;
                } elseif ( is_array($pageInput) && isset($pageInput['uid']) ) {
@@ -55,15 +54,15 @@ class tx_languagevisibility_hooks_t3lib_page implements t3lib_pageSelect_getPage
                        return;
                }
 
-               //call service to know if element is visible and which overlay language to use
+                       //call service to know if element is visible and which overlay language to use
                $overlayLanguage = tx_languagevisibility_feservices::getOverlayLanguageIdForElementRecord($page_id, 'pages', $lUid);
-               if ($overlayLanguage === false) {
+               if ($overlayLanguage === FALSE) {
                        $overlayLanguageForced = tx_languagevisibility_feservices::getOverlayLanguageIdForElementRecordForced($page_id, 'pages', $lUid);
-                       // don't use this recursion without further checks!!!!
-                       // this isn't used because there  seems to be no reason why we should overlay an invisible page...
-                       // $pageInput = $parent->getPageOverlay ( &$pageInput, $overlayLanguageForced );
+                               // don't use this recursion without further checks!!!!
+                               // this isn't used because there  seems to be no reason why we should overlay an invisible page...
+                               // $pageInput = $parent->getPageOverlay ( &$pageInput, $overlayLanguageForced );
                        $pageInput['_NOTVISIBLE'] = TRUE;
-                       $lUid = null;
+                       $lUid = BULL;
                } else {
                        $lUid = $overlayLanguage;
                }
@@ -94,26 +93,26 @@ class tx_languagevisibility_hooks_t3lib_page implements t3lib_pageSelect_getPage
                        $row['uid'] = 0;
                        $row['pid'] = 0;
                        return;
-          }
-          catch ( Exception $e ) {
+               }
+               catch ( Exception $e ) {
                        return;
                }
 
-               if ($overlayLanguage === false) {
+               if ($overlayLanguage === FALSE) {
                        $row['uid'] = 0;
                        $row['pid'] = 0;
                        return;
                } elseif (!$element->isMonolithicTranslated()) {
-                       // for monolytic elements the tx_languagevisibility_feservices::getOverlayLanguageIdForElement return 0 to "tell" us that no overlay is required
-                       // but since the TYPO3 Core interprets a language with id 0 to not return anything we need to leave the $sys_language_content untouched for MonolithicTranslated elements
+                               // for monolytic elements the tx_languagevisibility_feservices::getOverlayLanguageIdForElement return 0 to "tell" us that no overlay is required
+                               // but since the TYPO3 Core interprets a language with id 0 to not return anything we need to leave the $sys_language_content untouched for MonolithicTranslated elements
                        $sys_language_content = $overlayLanguage;
                }
 
                        /**
-                        *      the original value will be replaced by the original getRecordOverlay process
-                        *      therefore we've to store this elsewhere to make sure that the flexdata is available 
-                        *      for the postProcess
-                        **/
+                        * the original value will be replaced by the original getRecordOverlay process
+                        * therefore we've to store this elsewhere to make sure that the flexdata is available
+                        * for the postProcess
+                        */
                if ($element instanceof tx_languagevisibility_fceoverlayelement) {
                        $row['_ORIG_tx_templavoila_flex'] = $row['tx_templavoila_flex'];
                }
@@ -170,13 +169,16 @@ class tx_languagevisibility_hooks_t3lib_page implements t3lib_pageSelect_getPage
                        if ($sys_language_content != $overlayLanguage) {
                                $row = $parent->getRecordOverlay($table, $row, $overlayLanguage, $OLmode);
                        }
-                       $row['tx_templavoila_flex'] = t3lib_div::array2xml_cs($this->_callbackVar_overlayXML, 'T3FlexForms', array('useCDATA' => true));
+                       $row['tx_templavoila_flex'] = t3lib_div::array2xml_cs($this->_callbackVar_overlayXML, 'T3FlexForms', array('useCDATA' => TRUE));
                }
        }
 
        /**
-        *
-        *
+        * @param $dsArr
+        * @param $dataValue
+        * @param $PA
+        * @param $structurePath
+        * @param $pObj
         */
        public function _callback_checkXMLFieldsForFallback($dsArr, $dataValue, $PA, $structurePath, &$pObj) {
                if ($dsArr['TCEforms']['l10n_mode'] == 'exclude') {
@@ -189,10 +191,15 @@ class tx_languagevisibility_hooks_t3lib_page implements t3lib_pageSelect_getPage
                }
        }
 
+       /**
+        * @param $table
+        * @param $row
+        * @param $languageId
+        * @return mixed
+        */
        protected function _getDatabaseTranslationOverlayRecord($table, $row, $languageId) {
-               global $TCA;
-               // Select overlay record:
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'pid=' . intval($row['pid']) . ' AND ' . $TCA[$table]['ctrl']['languageField'] . '=' . intval($languageId) . ' AND ' . $TCA[$table]['ctrl']['transOrigPointerField'] . '=' . intval($row['uid']) . $GLOBALS['TSFE']->sys_page->enableFields($table), '', '', '1');
+                       // Select overlay record:
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'pid=' . intval($row['pid']) . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '=' . intval($languageId) . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($row['uid']) . $GLOBALS['TSFE']->sys_page->enableFields($table), '', '', '1');
                $olrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                $GLOBALS['TSFE']->sys_page->versionOL($table, $olrow);
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
index 43f6882..a9e979e 100644 (file)
 class tx_languagevisibility_hooks_t3lib_tcemain {
 
        /**
-        *
-        * @param string         $table
-        * @param integer        $id
-        * @param array          $data
-        * @param integer        $res (but only 0 and 1 is relevant so it's boolean technically)
-        * @param object         $this
+        * @param string $table
+        * @param integer $id
+        * @param array $data
+        * @param integer $res (but only 0 and 1 is relevant so it's boolean technically)
+        * @param $tcemain
+        * @internal param object $this
         * @return integer
         */
        public function checkRecordUpdateAccess($table, $id, $data, $res, $tcemain) {
-               /**
-                * @var tx_languagevisibility_beservices $visibilityservice
-                */
+               /** @var tx_languagevisibility_beservices $visibilityservice */
                $visibilityservice = t3lib_div::makeInstance('tx_languagevisibility_beservices');
                if ($table == 'pages' && ! $visibilityservice->hasUserAccessToPageRecord($id, 'edit')) {
                        $result = 0;
@@ -64,10 +62,11 @@ class tx_languagevisibility_hooks_t3lib_tcemain {
        public function processDatamap_preProcessFieldArray(&$incomingFieldArray, $table, $id, &$reference) {
                $data = $incomingFieldArray;
 
-               if (! is_array($data))
-                       return; /* some strange DB situation */
+               if (! is_array($data)) {
+                       return; /** some strange DB situation */
+               }
 
-               if(in_array($table, tx_languagevisibility_visibilityService::getSupportedTables())) {
+               if (in_array($table, tx_languagevisibility_visibilityService::getSupportedTables())) {
                        /**
                         * NOTE: This code does not affect new records because the field 'tx_languagevisibility_visibility' is not set
                         */
@@ -82,7 +81,7 @@ class tx_languagevisibility_hooks_t3lib_tcemain {
 
                                $incomingFieldArray['tx_languagevisibility_visibility'] = serialize($incomingFieldArray['tx_languagevisibility_visibility']);
 
-                               //flush all caches
+                                       // flush all caches
                                tx_languagevisibility_cacheManager::getInstance()->flushAllCaches();
                        }
                }
@@ -111,7 +110,6 @@ class tx_languagevisibility_hooks_t3lib_tcemain {
                                        $row = t3lib_BEfunc::getWorkspaceVersionOfRecord($fieldArray['t3ver_wsid'], $table, $row['uid'], $fields = '*');
                                }
 
-                               require_once (t3lib_extMgm::extPath("languagevisibility") . 'class.tx_languagevisibility_beservices.php');
                                $newdata = array('tx_languagevisibility_visibility' => serialize(tx_languagevisibility_beservices::getDefaultVisibilityArray()));
                                $where = "tx_languagevisibility_visibility = '' AND uid=" . $row['uid'];
 
@@ -123,5 +121,3 @@ class tx_languagevisibility_hooks_t3lib_tcemain {
 
        }
 }
-
-?>
index 983560a..f848516 100644 (file)
@@ -35,10 +35,11 @@ class tx_languagevisibility_hooks_t3lib_userauthgroup {
         *
         * @param array $params
         * @param object $ref
+        * @return bool
         */
        public function checkFullLanguagesAccess($params, $ref) {
                if (isset($params['recordLocalizationAccess']) && $params['recordLocalizationAccess']) {
-                       // so far the user had access to all existing overlay-languages
+                               // so far the user had access to all existing overlay-languages
                        return tx_languagevisibility_beservices::hasUserAccessToEditRecord($params['table'], $params['row']['uid']);
                } else {
                        return $params['recordLocalizationAccess'];
index 4be1b43..5c5748f 100644 (file)
@@ -35,9 +35,10 @@ class tx_languagevisibility_hooks_templavoila_pi1 {
         * @param array $row
         * @param string $table
         * @param string $lKey
-        * @param boolean $langDisable
+        * @param $langDisabled
         * @param boolean $langChildren
         * @param object $object
+        * @internal param bool $langDisable
         * @return string
         */
        public function renderElement_preProcessLanguageKey($row, $table, $lKey, $langDisabled, $langChildren, &$object) {
@@ -53,9 +54,10 @@ class tx_languagevisibility_hooks_templavoila_pi1 {
         * @param array $row
         * @param string $table
         * @param string $vKey
-        * @param boolean $langDisable
+        * @param $langDisabled
         * @param boolean $langChildren
         * @param object $object
+        * @internal param bool $langDisable
         * @return string
         */
        public function renderElement_preProcessValueKey($row, $table, $vKey, $langDisabled, $langChildren, &$object) {
@@ -64,7 +66,4 @@ class tx_languagevisibility_hooks_templavoila_pi1 {
                }
                return $vKey;
        }
-
 }
-
-?>
\ No newline at end of file
index dfb9051..ecc350e 100644 (file)
 class tx_languagevisibility_hooks_tslib_fe {
 
        /**
-        *
+        * @param $params
         * @param tslib_fe $ref
         * @return void
         */
        public function settingLanguage_preProcess($params, &$ref) {
-
-               // Get values from TypoScript:
+                       // Get values from TypoScript:
                $lUid = intval($ref->config['config']['sys_language_uid']);
 
-               //works only with "ignore" setting
-               //need to check access for current page and show error:
+                       // works only with "ignore" setting
+                       // need to check access for current page and show error:
                if (! tx_languagevisibility_feservices::checkVisiblityForElement($ref->page['uid'], 'pages', $lUid)) {
                        $GLOBALS['TSFE']->pageNotFoundAndExit('Page is not visible in requested language [' . $lUid . '/' . $ref->page['uid'] . ']');
                }
        }
 }
-
-?>
\ No newline at end of file
index dfbc5de..535ce67 100644 (file)
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-if (!interface_exists('tslib_menu_filterMenuPagesHook') && version_compare(TYPO3_version, '4.4', '>')) {
-       // @todo this should be loaded with the Core's autoloader but obviously that doesn't happen in 4.4.0
-       require_once PATH_tslib . 'interfaces/interface.tslib_menu_filterMenuPagesHook.php';
-}
-
+/**
+ *
+ * @author      Tolleiv
+ * @package     TYPO3
+ * @version $Id:$
+ */
+class tx_languagevisibility_hooks_tslib_menu implements tslib_menu_filterMenuPagesHook {
 
-if (!(version_compare(TYPO3_version, '4.5.2', '>') XOR (version_compare(TYPO3_version, '4.5', '<') && version_compare(TYPO3_version, '4.4.6', '>')))) {
        /**
+        * Checks if a page is OK to include in the final menu item array.
         *
-        * @author       Tolleiv
-        * @package      TYPO3
-        * @version $Id:$
+        * @param       array           Array of menu items
+        * @param       array           Array of page uids which are to be excluded
+        * @param       boolean         If set, then the page is a spacer.
+        * @param       tslib_menu      The menu object
+        * @return      boolean         Returns TRUE if the page can be safely included.
         */
-       class tx_languagevisibility_hooks_tslib_menu implements tslib_menu_filterMenuPagesHook
-       {
-
-               /**
-                * Checks if a page is OK to include in the final menu item array.
-                *
-                * @param       array           Array of menu items
-                * @param       array           Array of page uids which are to be excluded
-                * @param       boolean         If set, then the page is a spacer.
-                * @param       tslib_menu      The menu object
-                * @return      boolean         Returns TRUE if the page can be safely included.
-                */
-               public function tslib_menu_filterMenuPagesHook(array &$data, array $banUidArray, $spacer, tslib_tmenu $obj)
-               {
-                       if ($data['_NOTVISIBLE']) {
-                               return false;
-                       } else {
-                               return true;
-                       }
+       public function tslib_menu_filterMenuPagesHook(array &$data, array $banUidArray, $spacer, tslib_menu $obj) {
+               if ($data['_NOTVISIBLE']) {
+                       return FALSE;
+               } else {
+                       return TRUE;
                }
        }
-} else {
+
        /**
+        * Checks if a page is OK to include in the final menu item array.
         *
-        * @author       Tolleiv
-        * @package      TYPO3
-        * @version $Id:$
+        * @param       array           Array of menu items
+        * @param       array           Array of page uids which are to be excluded
+        * @param       boolean         If set, then the page is a spacer.
+        * @param       tslib_menu      The menu object
+        * @return      boolean         Returns TRUE if the page can be safely included.
         */
-       class tx_languagevisibility_hooks_tslib_menu implements tslib_menu_filterMenuPagesHook
-       {
-
-               /**
-                * Checks if a page is OK to include in the final menu item array.
-                *
-                * @param       array           Array of menu items
-                * @param       array           Array of page uids which are to be excluded
-                * @param       boolean         If set, then the page is a spacer.
-                * @param       tslib_menu      The menu object
-                * @return      boolean         Returns TRUE if the page can be safely included.
-                */
-               public function tslib_menu_filterMenuPagesHook(array &$data, array $banUidArray, $spacer, tslib_menu $obj)
-               {
-                       if ($data['_NOTVISIBLE']) {
-                               return false;
-                       } else {
-                               return true;
-                       }
-               }
-
-               /**
-                * Checks if a page is OK to include in the final menu item array.
-                *
-                * @param       array           Array of menu items
-                * @param       array           Array of page uids which are to be excluded
-                * @param       boolean         If set, then the page is a spacer.
-                * @param       tslib_menu      The menu object
-                * @return      boolean         Returns TRUE if the page can be safely included.
-                */
-               public function processFilter(array &$data, array $banUidArray, $spacer, tslib_menu $obj)
-               {
-                       return $this->tslib_menu_filterMenuPagesHook($data, $banUidArray, $spacer, $obj);
-               }
+       public function processFilter(array &$data, array $banUidArray, $spacer, tslib_menu $obj) {
+               return $this->tslib_menu_filterMenuPagesHook($data, $banUidArray, $spacer, $obj);
        }
 }
\ No newline at end of file
index e1b8ad2..3003679 100644 (file)
                        <label index="sys_language.tx_languagevisibility_defaultvisibilityel">default visibility for other elements</label>
                        <label index="sys_language.tx_languagevisibility_defaultvisibilityttnewsel">default visibility for tt_news elements</label>
                        <label index="sys_language.tx_languagevisibility_complexfallbacksetting">Use multiple fallbacks for Pages/Elements/TTNews</label>
-                       
+
                        <!-- Field titles -->
                        <label index="pages.tx_languagevisibility_visibility">Language visibility:</label>
                        <label index="tt_content.tx_languagevisibility_visibility">Language visibility:</label>
-                       
+
                        <!-- Field value labels -->
                        <label index="tx_languagevisibility_visibility.I.">empty</label>
                        <label index="tx_languagevisibility_visibility.I.yes">forced to YES</label>
@@ -25,7 +25,7 @@
                        <label index="tx_languagevisibility_visibility.I.no+">forced to NO inherited</label>
                        <label index="tx_languagevisibility_visibility.I.f">if translation in fallback</label>
                        <label index="tx_languagevisibility_visibility.I.t">if translated</label>
-                       
+
                        <label index="tabname">Language</label>
                        <label index="language">Language</label>
                        <label index="visibility">visibility setting</label>
@@ -46,4 +46,4 @@
                        <label index="reports.ok.value">OK</label>
                </languageKey>
        </data>
-</T3locallang>
\ No newline at end of file
+</T3locallang>
index ea9cdfc..fc65a8d 100644 (file)
  * This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
 
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_languagerepository.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_elementFactory.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/class.tx_languagevisibility_visibilityService.php');
-require_once (t3lib_extMgm::extPath("languagevisibility") . 'classes/dao/class.tx_languagevisibility_daocommon.php');
-require_once (PATH_t3lib . 'class.t3lib_extobjbase.php');
 /**
  * Module extension (addition to function menu) 'Language Visibility Overview' for the 'testtt' extension.
  *
@@ -41,14 +36,17 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
         *
         * @return      array
         */
-       function modMenu() {
-               global $LANG;
-
-               $menuArray = array('depth' => array(0 => $LANG->getLL('depth_0'), 1 => $LANG->getLL('depth_1'), 2 => $LANG->getLL('depth_2'), 3 => $LANG->getLL('depth_3') ) );
-
-               // Languages:
-
-
+       public function modMenu() {
+               $menuArray = array(
+                       'depth' => array(
+                               0 => $GLOBALS['LANG']->getLL('depth_0'),
+                               1 => $GLOBALS['LANG']->getLL('depth_1'),
+                               2 => $GLOBALS['LANG']->getLL('depth_2'),
+                               3 => $GLOBALS['LANG']->getLL('depth_3')
+                       )
+               );
+
+                       // Languages:
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $languageList = $languageRep->getLanguages();
                $menuArray['lang'] = array(0 => '[All]' );
@@ -64,42 +62,39 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
         *
         * @return      string          Output HTML for the module.
         */
-       function main() {
-               global $BACK_PATH, $LANG, $SOBE;
-
+       public function main() {
                if ($this->pObj->id) {
                        $theOutput = '';
 
-                       // Depth selector:
+                               // Depth selector:
                        $h_func = t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[depth]', $this->pObj->MOD_SETTINGS['depth'], $this->pObj->MOD_MENU['depth'], 'index.php');
                        $h_func .= t3lib_BEfunc::getFuncMenu($this->pObj->id, 'SET[lang]', $this->pObj->MOD_SETTINGS['lang'], $this->pObj->MOD_MENU['lang'], 'index.php');
                        $theOutput .= $h_func;
 
-                       // Add CSH:
+                               // Add CSH:
                        $theOutput .= t3lib_BEfunc::cshItem('_MOD_web_info', 'lang', $GLOBALS['BACK_PATH'], '|<br/>');
 
-                       // Showing the tree:
-                       // Initialize starting point of page tree:
+                               // Showing the tree:
+                               // Initialize starting point of page tree:
                        $treeStartingPoint = intval($this->pObj->id);
                        $treeStartingRecord = t3lib_BEfunc::getRecordWSOL('pages', $treeStartingPoint);
                        $depth = $this->pObj->MOD_SETTINGS['depth'];
 
-                       // Initialize tree object:
+                               // Initialize tree object:
                        $tree = t3lib_div::makeInstance('t3lib_pageTree');
                        $tree->init('AND ' . $GLOBALS['BE_USER']->getPagePermsClause(1));
                        $tree->addField('l18n_cfg');
 
-                       // Creating top icon; the current page
+                               // Creating top icon; the current page
                        $HTML = t3lib_iconWorks::getIconImage('pages', $treeStartingRecord, $GLOBALS['BACK_PATH'], 'align="top"');
                        $tree->tree[] = array('row' => $treeStartingRecord, 'HTML' => $HTML );
 
-                       // Create the tree from starting point:
-                       if ($depth)
+                               // Create the tree from starting point:
+                       if ($depth) {
                                $tree->getTree($treeStartingPoint, $depth, '');
-                               #debug($tree->tree);
-
+                       }
 
-                       // Add CSS needed:
+                               // Add CSS needed:
                        $css_content = '
                                TABLE#langTable {
                                        margin-top: 10px;
@@ -119,7 +114,7 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
                        $marker = '/*###POSTCSSMARKER###*/';
                        $this->pObj->content = str_replace($marker, $css_content . chr(10) . $marker, $this->pObj->content);
 
-                       // Render information table:
+                               // Render information table:
                        $theOutput .= $this->renderL10nTable($tree);
                }
 
@@ -132,39 +127,32 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
         * @param       array           The Page tree data
         * @return      string          HTML for the localization information table.
         */
-       function renderL10nTable(&$tree) {
-               global $LANG;
-
-               // Title length:
+       public function renderL10nTable(&$tree) {
+                       // Title length:
                $titleLen = $GLOBALS['BE_USER']->uc['titleLen'];
 
-               // Put together the TREE:
+                       // Put together the tree:
                $output = '';
                $newOL_js = array();
                $langRecUids = array();
 
-               //Init DDD
+                       // Init DAO
                $dao = t3lib_div::makeInstance('tx_languagevisibility_daocommon');
-               if (version_compare(TYPO3_version, '4.3.0', '<')) {
-                       $elementfactory = new tx_languagevisibility_elementFactory($dao);
-               } else {
-                       $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
-               }
+               $elementfactory = t3lib_div::makeInstance('tx_languagevisibility_elementFactory', $dao);
                $languageRep = t3lib_div::makeInstance('tx_languagevisibility_languagerepository');
                $languageList = $languageRep->getLanguages();
-
                $visibility = t3lib_div::makeInstance('tx_languagevisibility_visibilityService');
 
-               //traverse Tree:
+                       //traverse tree:
                foreach ( $tree->tree as $data ) {
                        $tCells = array();
 
                        $element = $elementfactory->getElementForTable('pages', $data['row']['uid']);
 
-                       //first cell (tree):
-                       // Page icons / titles etc.
+                               // first cell (tree):
+                               // Page icons / titles etc.
                        $tCells[] = '<td' . ($data['row']['_CSSCLASS'] ? ' class="' . $data['row']['_CSSCLASS'] . '"' : '') . '>' . $data['HTML'] . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['title'], $titleLen)) . (strcmp($data['row']['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($data['row']['nav_title'], $titleLen)) . '</em>]' : '') . '</td>';
-                       //language cells:
+                               // language cells:
                        foreach ( $languageList as $language ) {
                                $info = '';
                                $editUid = $data['row']['uid'];
@@ -184,41 +172,42 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
                                }
 
                                if ($language->getUid() == 0) {
-                                       //Default
-                                       //"View page" link is created:
-                                       $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/zoom.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_viewPage', '1') . '" border="0" alt="" />' . '</a>';
-                                       $info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editDefaultLanguagePage', '1') . '" border="0" alt="" />' . '</a>';
-                                       $info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=0"); return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit_page.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editPage', '1') . '" border="0" alt="" />' . '</a>';
+                                               // Default
+                                               // "View page" link is created:
+                                       $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/zoom.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_viewPage', '1') . '" border="0" alt="" />' . '</a>';
+                                       $info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_editDefaultLanguagePage', '1') . '" border="0" alt="" />' . '</a>';
+                                       $info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=0"); return FALSE;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit_page.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_editPage', '1') . '" border="0" alt="" />' . '</a>';
                                        $info .= str_replace('###LANG_UID###', '0', $viewPageLink);
-                                       $info .= $data['row']['l18n_cfg'] & 1 ? '<span title="' . $LANG->sL('LLL:EXT:cms/locallang_tca.php:pages.l18n_cfg.I.1', '1') . '">D</span>' : '&nbsp;';
-                                       // Put into cell:
+                                       $info .= $data['row']['l18n_cfg'] & 1 ? '<span title="' . $GLOBALS['LANG']->sL('LLL:EXT:cms/locallang_tca.php:pages.l18n_cfg.I.1', '1') . '">D</span>' : '&nbsp;';
+                                               // Put into cell:
                                        $tCells[] = '<td class="' . $statusTrans . ' c-leftLine">' . $info . '</td>';
-                                       $tCells[] = '<td class="' . $statusTrans . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
+                                       $tCells[] = '<td class="' . $statusTrans . '" title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], 0) . '</td>';
 
                                } else {
-                                       //Normal Language:
+                                               // Normal Language:
                                        if ($element->hasTranslation($langId)) {
+                                               $viewPageLink = '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::viewOnClick($data['row']['uid'], $GLOBALS['BACK_PATH'], '', '', '', '&L=###LANG_UID###')) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/zoom.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_viewPage', '1') . '" border="0" alt="" />' . '</a>';
 
                                                $status = 'c-ok';
                                                $overLayRow = $element->getOverLayRecordForCertainLanguage($langId);
-                                               //add uid of overlay to list of editable records:
+                                                       // add uid of overlay to list of editable records:
                                                $langRecUids[$langId][] = $overLayRow['uid'];
                                                $icon = t3lib_iconWorks::getIconImage('pages_language_overlay', $overLayRow, $GLOBALS['BACK_PATH'], 'align="top" class="c-recIcon"');
 
-                                               $info = $icon . htmlspecialchars(t3lib_div::fixed_lgd_cs($overLayRow['title'], $titleLen)) . (strcmp($overLayRow['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($overLayRow['nav_title'], $titleLen)) . '</em>]' : '') . ($row['_COUNT'] > 1 ? '<div>' . $LANG->getLL('lang_renderl10n_badThingThereAre', '1') . '</div>' : '');
+                                               $info = $icon . htmlspecialchars(t3lib_div::fixed_lgd_cs($overLayRow['title'], $titleLen)) . (strcmp($overLayRow['nav_title'], '') ? ' [Nav: <em>' . htmlspecialchars(t3lib_div::fixed_lgd_cs($overLayRow['nav_title'], $titleLen)) . '</em>]' : '') . ($overLayRow['_COUNT'] > 1 ? '<div>' . $GLOBALS['LANG']->getLL('lang_renderl10n_badThingThereAre', '1') . '</div>' : '');
                                                $tCells[] = '<td class="' . $statusTrans . ' c-leftLine">' . $info . '</td>';
 
-                                               // Edit whole record:
+                                                       // Edit whole record:
                                                $info = '';
                                                $editUid = $overLayRow['uid'];
                                                $params = '&edit[pages_language_overlay][' . $editUid . ']=edit';
-                                               $info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editLanguageOverlayRecord', '1') . '" border="0" alt="" />' . '</a>';
+                                               $info .= '<a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_editLanguageOverlayRecord', '1') . '" border="0" alt="" />' . '</a>';
 
-                                               $info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=' . $langId . '"); return false;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit_page.gif', 'width="12" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editPageLang', '1') . '" border="0" alt="" />' . '</a>';
+                                               $info .= '<a href="#" onclick="' . htmlspecialchars('top.loadEditId(' . intval($data['row']['uid']) . ',"&SET[language]=' . $langId . '"); return FALSE;') . '">' . '<img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit_page.gif', 'width="12" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_editPageLang', '1') . '" border="0" alt="" />' . '</a>';
                                                $info .= str_replace('###LANG_UID###', $langId, $viewPageLink);
 
                                                $tCells[] = '<td class="' . $statusTrans . '">' . $info . '</td>';
-                                               $tCells[] = '<td class="' . $statusTrans . '" title="' . $LANG->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], $langId) . '</td>';
+                                               $tCells[] = '<td class="' . $statusTrans . '" title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_CEcount', '1') . '" align="center">' . $this->getContentElementCount($data['row']['uid'], $langId) . '</td>';
                                        } else {
                                                $status = t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg'] & 1 ? 'c-blocked' : 'c-fallback';
                                                $tCells[] = '<td class="' . $statusTrans . ' c-leftLine">&nbsp;</td>';
@@ -242,9 +231,8 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
                        </tr>';
                }
 
-               //first ROW:
-               //****************
-               $firstRowCells[] = '<td>' . $LANG->getLL('lang_renderl10n_page', '1') . ':</td>';
+                       // first ROW:
+               $firstRowCells[] = '<td>' . $GLOBALS['LANG']->getLL('lang_renderl10n_page', '1') . ':</td>';
                foreach ( $languageList as $language ) {
                        $langId = $language->getUid();
                        if ($this->pObj->MOD_SETTINGS['lang'] == 0 || ( int ) $this->pObj->MOD_SETTINGS['lang'] === ( int ) $langId) {
@@ -260,7 +248,7 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
                                        if (is_array($langRecUids[$langId])) {
                                                $params = '&edit[pages_language_overlay][' . implode(',', $langRecUids[$langId]) . ']=edit&columnsOnly=title,nav_title,hidden';
                                                $firstRowCells[] = '<td><a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">
-                                                       <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('lang_renderl10n_editLangOverlays', '1') . '" border="0" alt="" />
+                                                       <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_renderl10n_editLangOverlays', '1') . '" border="0" alt="" />
                                                        </a></td>';
                                        } else {
                                                $firstRowCells[] = '<td>&nbsp;</td>';
@@ -269,7 +257,7 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
                                        // Create new overlay records:
                                        $params = "'" . $newOL_js[$langId] . "+'&columnsOnly=title,hidden,sys_language_uid&defVals[pages_language_overlay][sys_language_uid]=" . $langId;
                                        $firstRowCells[] = '<td><a href="#" onclick="' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $GLOBALS['BACK_PATH'])) . '">
-                                               <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_el.gif', 'width="11" height="12"') . ' title="' . $LANG->getLL('lang_getlangsta_createNewTranslationHeaders', '1') . '" border="0" alt="" />
+                                               <img' . t3lib_iconWorks::skinImg($GLOBALS['BACK_PATH'], 'gfx/new_el.gif', 'width="11" height="12"') . ' title="' . $GLOBALS['LANG']->getLL('lang_getlangsta_createNewTranslationHeaders', '1') . '" border="0" alt="" />
                                                </a></td>';
                                        $firstRowCells[] = '<td></td>';
                                }
@@ -290,12 +278,11 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
                return $output;
        }
 
-       function _getStatusImage($stat) {
-               global $BACK_PATH;
+       protected function _getStatusImage($stat) {
                if ($stat) {
-                       return '<img src="' . $BACK_PATH . '../typo3conf/ext/languagevisibility/res/ok.gif">';
+                       return '<img src="' . $GLOBALS['BACK_PATH'] . '../typo3conf/ext/languagevisibility/res/ok.gif">';
                } else {
-                       return '<img src="' . $BACK_PATH . '../typo3conf/ext/languagevisibility/res/nok.gif">';
+                       return '<img src="' . $GLOBALS['BACK_PATH'] . '../typo3conf/ext/languagevisibility/res/nok.gif">';
                }
        }
 
@@ -319,7 +306,7 @@ class tx_languagevisibility_modfunc1 extends t3lib_extobjbase {
 /**
  * Module extension (addition to function menu) 'Language Visibility Overview' for the 'testtt' extension.
  *
- * @author     <Daniel Ptzinger>
+ * @author     <Daniel P?tzinger>
  * @package    TYPO3
  * @subpackage    tx_languagevisibility
  */
@@ -331,8 +318,6 @@ class sstx_languagevisibility_modfunc1 extends t3lib_extobjbase {
         * @return    Array with menuitems
         */
        function modMenu() {
-               global $LANG;
-
                return Array("tx_languagevisibility_modfunc1_check" => "" );
        }
 
@@ -343,15 +328,13 @@ class sstx_languagevisibility_modfunc1 extends t3lib_extobjbase {
         */
        function main() {
                // Initializes the module. Done in this function because we may need to re-initialize if data is submitted!
-               global $SOBE, $BE_USER, $LANG, $BACK_PATH, $TCA_DESCR, $TCA, $CLIENT, $TYPO3_CONF_VARS;
-
-               $theOutput .= $this->pObj->doc->spacer(5);
-               $theOutput .= $this->pObj->doc->section($LANG->getLL("title"), "Dummy content here...", 0, 1);
+               $theOutput = $this->pObj->doc->spacer(5);
+               $theOutput .= $this->pObj->doc->section($GLOBALS['LANG']->getLL('title'), 'Dummy content here...', 0, 1);
 
                $menu = array();
-               $menu[] = t3lib_BEfunc::getFuncCheck($this->wizard->pObj->id, "SET[tx_languagevisibility_modfunc1_check]", $this->wizard->pObj->MOD_SETTINGS["tx_languagevisibility_modfunc1_check"]) . $LANG->getLL("checklabel");
+               $menu[] = t3lib_BEfunc::getFuncCheck($this->wizard->pObj->id, 'SET[tx_languagevisibility_modfunc1_check]', $this->wizard->pObj->MOD_SETTINGS['tx_languagevisibility_modfunc1_check']) . $GLOBALS['LANG']->getLL('checklabel');
                $theOutput .= $this->pObj->doc->spacer(5);
-               $theOutput .= $this->pObj->doc->section("Menu", implode(" - ", $menu), 0, 1);
+               $theOutput .= $this->pObj->doc->section('Menu', implode('' - '', $menu), 0, 1);
 
                return $theOutput;
        }
@@ -360,5 +343,3 @@ class sstx_languagevisibility_modfunc1 extends t3lib_extobjbase {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/languagevisibility/modfunc1/class.tx_languagevisibility_modfunc1.php']) {
        include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/languagevisibility/modfunc1/class.tx_languagevisibility_modfunc1.php']);
 }
-
-?>
\ No newline at end of file
index 3009bd4..63b6dbf 100644 (file)
@@ -33,8 +33,8 @@
                        <label index="lang_renderl10n_page">Page</label>
                        <label index="lang_renderl10n_default">Default</label>
                        <label index="lang_getlangsta_createNewTranslationHeaders">Create new translation headers</label>
-                       <label index="lang_renderl10n_CEcount">Content Element Count</label>    
-                       <label index="moduleFunction.tx_languagevisibility_modfunc1">Language Visibility Overview</label>                                                               
+                       <label index="lang_renderl10n_CEcount">Content Element Count</label>
+                       <label index="moduleFunction.tx_languagevisibility_modfunc1">Language Visibility Overview</label>
                </languageKey>
        </data>
 </T3locallang>
\ No newline at end of file
diff --git a/patch/core_4.2/class.ux_SCalt_doc.php b/patch/core_4.2/class.ux_SCalt_doc.php
deleted file mode 100644 (file)
index e691962..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2009 AOE media <dev@aoemedia.de>
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * This script is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * adds patch to disallow page editing without access to default language
- *
- * @author     Daniel P�tzinger
- * @author     Tolleiv Nietsch
- */
-
-class ux_SC_alt_doc extends SC_alt_doc {
-
-       /***************************
-        *
-        * Sub-content functions, rendering specific parts of the module content.
-        *
-        ***************************/
-
-       /**
-        * Creates the editing form with TCEforms, based on the input from GPvars.
-        *
-        * @return      string          HTML form elements wrapped in tables
-        */
-       function makeEditForm() {
-               global $BE_USER, $LANG, $TCA;
-
-               // Initialize variables:
-               $this->elementsData = array();
-               $this->errorC = 0;
-               $this->newC = 0;
-               $thePrevUid = '';
-               $editForm = '';
-
-               // Traverse the GPvar edit array
-               foreach ( $this->editconf as $table => $conf ) { // Tables:
-                       if (is_array($conf) && $TCA[$table] && $BE_USER->check('tables_modify', $table)) {
-
-                               // Traverse the keys/comments of each table (keys can be a commalist of uids)
-                               foreach ( $conf as $cKey => $cmd ) {
-                                       if ($cmd == 'edit' || $cmd == 'new') {
-
-                                               // Get the ids:
-                                               $ids = t3lib_div::trimExplode(',', $cKey, 1);
-
-                                               // Traverse the ids:
-                                               foreach ( $ids as $theUid ) {
-
-                                                       // Checking if the user has permissions? (Only working as a precaution, because the final permission check is always down in TCE. But it's good to notify the user on beforehand...)
-                                                       // First, resetting flags.
-                                                       $hasAccess = 1;
-                                                       $deniedAccessReason = '';
-                                                       $deleteAccess = 0;
-                                                       $this->viewId = 0;
-
-                                                       // If the command is to create a NEW record...:
-                                                       if ($cmd == 'new') {
-                                                               if (intval($theUid)) { // NOTICE: the id values in this case points to the page uid onto which the record should be create OR (if the id is negativ) to a record from the same table AFTER which to create the record.
-
-
-                                                                       // Find parent page on which the new record reside
-                                                                       if ($theUid < 0) { // Less than zero - find parent page
-                                                                               $calcPRec = t3lib_BEfunc::getRecord($table, abs($theUid));
-                                                                               $calcPRec = t3lib_BEfunc::getRecord('pages', $calcPRec['pid']);
-                                                                       } else { // always a page
-                                                                               $calcPRec = t3lib_BEfunc::getRecord('pages', abs($theUid));
-                                                                       }
-
-                                                                       // Now, calculate whether the user has access to creating new records on this position:
-                                                                       if (is_array($calcPRec)) {
-                                                                               $CALC_PERMS = $BE_USER->calcPerms($calcPRec); // Permissions for the parent page
-                                                                               if ($table == 'pages') { // If pages:
-