See changelog
authorKasper Skårhøj <kasper@typo3.org>
Fri, 10 Sep 2004 23:04:49 +0000 (23:04 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Fri, 10 Sep 2004 23:04:49 +0000 (23:04 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@460 709f56b5-9817-0410-a4d7-c38de5d9e867

23 files changed:
ChangeLog
TODO.txt
t3lib/class.t3lib_db.php
t3lib/class.t3lib_page.php
t3lib/class.t3lib_recordlist.php
t3lib/class.t3lib_stdgraphic.php
typo3/class.alt_menu_functions.inc
typo3/class.db_list.inc
typo3/class.db_list_extra.inc
typo3/mod/web/perm/index.php
typo3/stylesheet.css
typo3/sysext/cms/layout/class.tx_cms_layout.php
typo3/sysext/cms/layout/locallang.xml
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php
typo3/sysext/cms/tslib/class.tslib_gifbuilder.php
typo3/sysext/cms/tslib/class.tslib_menu.php
typo3/sysext/cms/tslib/class.tslib_pagegen.php
typo3/sysext/cms/tslib/class.tslib_pibase.php
typo3/sysext/cms/tslib/index_ts.php
typo3/sysext/cms/tslib/media/scripts/example_typolinkpop.php
typo3/sysext/install/mod/class.tx_install.php
typo3/template.php

index 2cbf411..dc6124a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,44 @@
+2004-09-11  Kasper Skårhøj,,,  <kasper@typo3.com>
+
+       * Updated changelog for 09/09
+       * Fixed bug in stdgraphic::fontResize that made it go into eternal loops if the size could not be obtained in the lower end, basically when fontsize reached zero...
+       * Fixed bug in alt_menu_functions which prevented Condensed Mode from working. But most likely it breaks something else, maybe some options around alternative navigation frame scripts that rene introduced.
+       * Fixed a bug introduced yesterday where TYPO3 would not work with PHP versions below 4.100.0... :-) - clearly testifying to the fact that I have now run TYPO3 on PHP5 with TemplaVoila et al. for five days without problems.
+       * Added new option for the dynamic tab menus where you can configure a free initial default tab index and even close all items totally (like toggle mode, but still with only one tab open at a time).
+       * Increased levels of possible recursive permission setting to 10.
+       * Web>Page: Introduced localization flags, removed move-up/down/new buttons for languages in default-content-binding mode and made the selection of default elements include the "All" language in default-content-binding mode which will correspond to how sys_language_overlay works in the frontend.
+       * Introduced baseUrlWrap() function in tslib_fe (TSFE) which can be called for wrapping URLs with absolute baseUrl prefix in case you are using "realurl" of sorts. This is necessary to do for all urls that is handled by JavaScript, like "document.location" or "window.open" cases.
+       * Fixed the realurl related bug with click-enlarged images that would open a non-existing URL (see "baseUrlWrap()" above). Also wrapped other JavaScript URls like in JSMENU and typolink related JSwindow action.
+       * Introduced a global setting for GIFBUILDER TEXT objects to configure alternative font files for certain Unicode char ranges. This feature makes it very easy to set up eg. a japanese truetype font for all usages of GIFBUILDER where you still want another specific font used for the latin characters.
+       * Introduced new HMENU feature: "alwaysActivePIDlist" which can configure certain page id which will always be expanded in menu as if they were "active".
+       * Fixed problem with empty URLs in menu generation. Empty URLs may occur when a realurl points to the frontpage (which is a blank suffix to the base url). In such cases the URL now becomes the baseUrl of the site (if that is configured!). This should fix it very specifically for all realurl cases.
+       * Fixed install tools incapability to delete files with certain prefixes in typo3temp/ folder.
+
+2004-09-09  Kasper Skårhøj,,,  <kasper@typo3.com>
+Sorry for writing these changelog entries with a delay of two days. I write them based on a CVS patch and it took ages to make that from a parking lot in Suresnes, Paris, 4 am in the morning. Its becoming harder to find a stable hotspot in Paris I think... But here we go:
+       * Changed all HTTP_*_VARS to $_* superglobals. Also raised PHP requirement version to 4.1.0
+       * Added wrapping functions to array browser class. Also updated the Configuration module to use these features so you can now click a key and get a string served ready to implement in eg. localconf.php
+       * !!! Removed obsolete function "t3lib_div::setGPvars()"
+       * Added $MCONF['shy'] feature (requested by Rene Fritz)
+       * Added longblob in sqlparser
+       * Added configurable JPG quality setting to stdGraphic class. Use $TYPO4_CONF_VARS[GFX][im_jpg_quality]
+       * Added stdgraphic::ImageTTFTextWrapper() and stdgraphic::ImageTTFBBoxWrapper functions. Behind these changes a new feature has been implemented which makes it possible to render a single GIFBUILDER TEXT object with more than one font file for various criteria. The most important criteria is that a certain range of unicode chars can be rendered using another truetype font supporting eg. japanese glyphs while you still use another specific font for the design of latin chracters. This feature is known as "splitRendering" in GIFBUILDER TEXT objects.
+       * Added new swapping mode setting for versioning: swapContent = ALL which is what you use if you want to swap the SUBTREE of a page as well!
+       * Fixed a bug in transferdata class where too many field values were returned in wrong situations.
+       * Fixed the timetrack class whitespace issue, removed the DAM module key in stddb/tables.php and removed the temporary class "t3lib_TCEforms_SelectTreeView" made by Rene Fritz.
+       * Implemented configurable session timeout for backend users.
+       * Changed the TYPO3 version number variable into a constant available before ext_localconf.php files are included.
+       * Added "location" bar to the re-login screen. Inspired by Johannes Reichart who once many years ago sent me a mail about how the login screen should be protected against someone designing a similar prompt to trick users into giving them their passwords. I couldn't find a better idea than making the URL visible so people can validate the domain themselves.
+       * Added localization view mode in Web>List module, allowing to see localization details for records, grouping them by their language and providing a "localization copy" button.
+       * Updated english labels for backend/CSH according to change suggestions by 3EV from UK. Thanks.
+       * Added obTS specific hook in tslib_content class. For Dan Frost and his empire...
+       * Impleemnted third option for stdWrap crop feature (by Peter Klein)
+       * Fixed typolink that would reject links to virtual files and folders locally, eg. links made by realurl etc. Previously such files HAD to exist, otherwise the link would not be rendered.
+       * Changed stuff around the pagenotfound handling.
+       * moved <meta charset...> in frontend output to be the first tag after the <html> tag.
+       * Fixed old bug in tslib_search which cropped off the last char of a search word.
+       * Fixed extra_page_cm_options that didn't detect itself properly when making the second menu. So now the elements from that extension will NOT anymore pop up in other second level menus... :-)
+
 2004-09-10  Michael Stucki  <mundaun@gmx.ch>
 
        * Replaced t3lib_div::uniqueArray with native PHP function array_unique. The old function will remain for compatibility reasons only. Please do not use it anymore!
index d413800..9e80525 100755 (executable)
--- a/TODO.txt
+++ b/TODO.txt
@@ -253,6 +253,16 @@ Extensions:
 
 
 
+*****************
+PHP issues
+*****************
+Generally: TYPO3 works with PHP5. But...:
+- UTF-8 strings to freetype doesn't work! Renders box instead.
+- array_merge must always have arrays as arguments. When this problem is found in TYPO3 it is regarded a TYPO3 bug and we fix it.
+- Errors regarding treating strings as arrays: Normally, just check if the variable is an array first.
+       - Details: Non-existing indexes is not a problem if the variable is unset - only if it is another type (eg. string). This means we can normally just check if the first index is an array and it will work: is (is_array($a) && $a[key1][key2][key3]) ...
+
+
 
 *****************
 NOTES
index ca0aa3f..f3c3ad8 100755 (executable)
@@ -132,7 +132,7 @@ class t3lib_DB {
 
 
                // Debug:
-       var $debugOutput = TRUE;                        // Set "TRUE" if you want database errors outputted.
+       var $debugOutput = FALSE;                       // Set "TRUE" if you want database errors outputted.
        var $debug_lastBuiltQuery = '';         // Internally: Set to last built query (not necessarily executed...)
 
                // Default link identifier:
index efd74b3..9bf838c 100755 (executable)
@@ -292,7 +292,7 @@ class t3lib_pageSelect {
         * @param       string  Overlay mode. If "hideNonTranslated" then records without translation will not be returned un-translated but unset (and return value is false)
         * @return      mixed   Returns the input record, possibly overlaid with a translation. But if $OLmode is "hideNonTranslated" then it will return false if no translation is found.
         */
-       function getRecordOverlay($table,$row,$sys_language_content,$OLmode)    {
+       function getRecordOverlay($table,$row,$sys_language_content,$OLmode='') {
                global $TCA;
 
                if ($row['uid']>0 && $row['pid']>0)     {
@@ -332,7 +332,7 @@ class t3lib_pageSelect {
                                                                                }
                                                                        }
                                                                }
-                                                       } elseif ($OLmode=='hideNonTranslated' && $row[$TCA[$table]['ctrl']['languageField']]==0)       {       // Unset, if non-translated records should be hidden. ONLY done if the source record really is default language and not [All] in which case it is allowed.
+                                                       } elseif ($OLmode==='hideNonTranslated' && $row[$TCA[$table]['ctrl']['languageField']]==0)      {       // Unset, if non-translated records should be hidden. ONLY done if the source record really is default language and not [All] in which case it is allowed.
                                                                unset($row);
                                                        }
 
index 34632ae..a6f3603 100755 (executable)
@@ -101,6 +101,8 @@ class t3lib_recordList {
        var $eCounter=0;
        var $HTMLcode='';                       // String with accumulated HTML content
 
+       var $pageOverlays = array();                    // Contains page translation languages
+       var $languageIconTitles = array();              // Contains sys language icons and titles
 
 
 
@@ -329,6 +331,82 @@ class t3lib_recordList {
 
                ';
        }
+
+       /**
+        * Initializes page languages and icons
+        *
+        * @return      void
+        */
+       function initializeLanguages()  {
+               global $TCA,$LANG;
+
+                       // Look up page overlays:
+               $this->pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'pages_language_overlay',
+                       'pid='.intval($this->id).
+                               t3lib_BEfunc::deleteClause('pages_language_overlay'),
+                       '',
+                       '',
+                       '',
+                       'sys_language_uid'
+               );
+
+                       // icons and language titles:
+               t3lib_div::loadTCA ('sys_language');
+               $flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
+               $flagIconPath = $this->backPath.'../'.substr($flagAbsPath, strlen(PATH_site));
+
+               $this->modSharedTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');
+               $this->languageIconTitles = array();
+
+                       // Set default:
+               $this->languageIconTitles[0]=array(
+                       'uid' => 0,
+                       'title' => strlen ($this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $this->modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$LANG->getLL('defaultLanguage').')' : $LANG->getLL('defaultLanguage'),
+                       'ISOcode' => 'DEF',
+                       'flagIcon' => strlen($this->modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag'] : null,
+               );
+
+                       // Set "All" language:
+               $this->languageIconTitles[-1]=array(
+                       'uid' => -1,
+                       'title' => $LANG->getLL ('multipleLanguages'),
+                       'ISOcode' => 'DEF',
+                       'flagIcon' => $flagIconPath.'multi-language.gif',
+               );
+
+                       // Find all system languages:
+               $sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'sys_language',
+                       ''
+               );
+               foreach($sys_languages as $row)         {
+                       $this->languageIconTitles[$row['uid']] = $row;
+
+                       if ($row['static_lang_isocode'])        {
+                               $staticLangRow = t3lib_BEfunc::getRecord('static_languages',$row['static_lang_isocode'],'lg_iso_2');
+                               if ($staticLangRow['lg_iso_2']) {
+                                       $this->languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
+                               }
+                       }
+                       if (strlen ($row['flag'])) {
+                               $this->languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath.$row['flag']) ? $flagIconPath.$row['flag'] : '';
+                       }
+               }
+       }
+
+       /**
+        * Return the icon for the language
+        *
+        * @param       integer         Sys language uid
+        * @return      string          Language icon
+        */
+       function languageFlag($sys_language_uid)        {
+               return ($this->languageIconTitles[$sys_language_uid]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$sys_language_uid]['flagIcon'].'" class="absmiddle" alt="" />&nbsp;' : '').
+                               htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']);
+       }
 }
 
 
index 82815bf..57138f1 100644 (file)
@@ -874,9 +874,7 @@ class t3lib_stdGraphic      {
                                return $conf['fontSize'];
                                //  ################ no calc for spacing yet !!!!!!
                        } else {
-                               $fontSize = $conf['fontSize'];
                                do {
-                                       $conf['fontSize'] = $fontSize;
                                                // determine bounding box.
                                        $bounds = $this->ImageTTFBBoxWrapper($conf['fontSize'], $conf['angle'], $conf['fontFile'], $this->recodeString($conf['text']), $conf['splitRendering.']);
                                        if ($conf['angle']< 0) {
@@ -886,12 +884,14 @@ class t3lib_stdGraphic    {
                                        } else {
                                                $pixelWidth = abs($bounds[4]-$bounds[6]);
                                        }
-                                               // This is a very raw calculation but it makes it in one step
-                                       $fontSize=(int)($maxWidth*$fontSize/$pixelWidth);
-                                       if ($fontSize >= $conf['fontSize'])     {
-                                               $fontSize = $conf['fontSize']-1;
+
+                                               // Size is fine, exit:
+                                       if ($pixelWidth <= $maxWidth)   {
+                                               break;
+                                       } else {
+                                               $conf['fontSize']--;
                                        }
-                               } while ($pixelWidth > $maxWidth);
+                               } while ($conf['fontSize']>1);
                        }//if spacing
                }
                return $conf['fontSize'];
index 1d1748a..e8558e2 100755 (executable)
@@ -116,7 +116,7 @@ class alt_menu_functions {
                while(list($moduleName,$moduleInfo)=each($theModules))  {
                        $mC++;
 
-                       $prefix=$this->getNavFramePrefix ($moduleInfo);                         
+                       $prefix=$this->getNavFramePrefix ($moduleInfo);
                        if ($prefix) {
                                $this->fsMod[]='fsMod.recentIds["'.$moduleName.'"]="";';
                        }
@@ -155,7 +155,7 @@ class alt_menu_functions {
 
                                // Creating the various links:
                        $label = $LANG->moduleLabels['tabs'][$moduleKey];
-                       if ($link && $prefix)   $link=$prefix.'"+top.TS.PATH_typo3_enc+"'.rawurlencode($link);
+                       if ($link && $prefix)   $link=$prefix.rawurlencode($link);
                        if ($link && !$dontLink)        {
                                $label = '<a href="#" onclick="top.goToModule(\''.$moduleName.'\');'.$onBlur.'return false;">'.$label.'</a>';   //  && !$link_sub
 
@@ -203,8 +203,8 @@ class alt_menu_functions {
                                        }
 
                                        $link = $subInfo['script'];
-                                       $prefix=$this->getNavFramePrefix ($moduleInfo, $subInfo);       
-                                       
+                                       $prefix=$this->getNavFramePrefix ($moduleInfo, $subInfo);
+
                                        $subKey = $moduleName.'_'.$subName.'_tab';
                                        $moduleCSSId = 'ID_'.t3lib_div::md5int($moduleName.'_'.$subName);
 
@@ -225,7 +225,7 @@ class alt_menu_functions {
                                        $label_descr = ' title="'.htmlspecialchars($LANG->moduleLabels['labels'][$subKey.'label']).'"';
                                        $flabel = htmlspecialchars($label);
                                        $origLink = $link;
-                                       if ($link && $prefix)   $link=$prefix.'"+top.TS.PATH_typo3_enc+"'.rawurlencode($link);
+                                       if ($link && $prefix)   $link=$prefix.rawurlencode($link);
 
                                                // Setting additional JavaScript if frameset script:
                                        $addJS = '';
@@ -399,6 +399,8 @@ class alt_menu_functions {
         * @return      string          Result url string
         */
        function getNavFramePrefix ($moduleInfo, $subModuleInfo=array()) {
+               global $BE_USER;
+
                $prefix = '';
                $navFrameScriptParam = $subModuleInfo['navFrameScriptParam'] ? $subModuleInfo['navFrameScriptParam'] : $moduleInfo['navFrameScriptParam'];
                if ($moduleInfo['navFrameScript'])      {
@@ -413,7 +415,7 @@ class alt_menu_functions {
                }
                return $prefix;
        }
-               
+
        /**
         * Returns $Ifilename readable for script in PATH_typo3.
         * That means absolute names are just returned while relative names are prepended with $backPath (pointing back to typo3/ dir)
index 7898b54..b265a31 100755 (executable)
@@ -113,8 +113,6 @@ class recordList extends t3lib_recordList {
        var $perms_clause='';                   // Page select permissions
        var $calcPerms=0;                               // Some permissions...
        var $clickTitleMode = '';               // Mode for what happens when a user clicks the title of a record.
-       var $pageOverlays = array();                    // Contains page translation languages
-       var $languageIconTitles = array();              // Contains sys language icons and titles
        var $modSharedTSconfig = array();               // Shared module configuration, used by localization features
 
                // Internal, dynamic:
@@ -658,71 +656,6 @@ class recordList extends t3lib_recordList {
                $tree->ids[]=$id;
                return $tree;
        }
-
-       /**
-        * Initializes page languages and icons
-        *
-        * @return      void
-        */
-       function initializeLanguages()  {
-               global $TCA,$LANG;
-
-                       // Look up page overlays:
-               $this->pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       '*',
-                       'pages_language_overlay',
-                       'pid='.intval($this->id).
-                               t3lib_BEfunc::deleteClause('pages_language_overlay'),
-                       '',
-                       '',
-                       '',
-                       'sys_language_uid'
-               );
-
-                       // icons and language titles:
-               t3lib_div::loadTCA ('sys_language');
-               $flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
-               $flagIconPath = $this->backPath.'../'.substr($flagAbsPath, strlen(PATH_site));
-
-               $this->modSharedTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');
-               $this->languageIconTitles = array();
-
-                       // Set default:
-               $this->languageIconTitles[0]=array(
-                       'uid' => 0,
-                       'title' => strlen ($this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $this->modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$LANG->getLL('defaultLanguage').')' : $LANG->getLL('defaultLanguage'),
-                       'ISOcode' => 'DEF',
-                       'flagIcon' => strlen($this->modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag'] : null,
-               );
-
-                       // Set "All" language:
-               $this->languageIconTitles[-1]=array(
-                       'uid' => -1,
-                       'title' => $LANG->getLL ('multipleLanguages'),
-                       'ISOcode' => 'DEF',
-                       'flagIcon' => $flagIconPath.'multi-language.gif',
-               );
-
-                       // Find all system languages:
-               $sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       '*',
-                       'sys_language',
-                       ''
-               );
-               foreach($sys_languages as $row)         {
-                       $this->languageIconTitles[$row['uid']] = $row;
-
-                       if ($row['static_lang_isocode'])        {
-                               $staticLangRow = t3lib_BEfunc::getRecord('static_languages',$row['static_lang_isocode'],'lg_iso_2');
-                               if ($staticLangRow['lg_iso_2']) {
-                                       $this->languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
-                               }
-                       }
-                       if (strlen ($row['flag'])) {
-                               $this->languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath.$row['flag']) ? $flagIconPath.$row['flag'] : '';
-                       }
-               }
-       }
 }
 
 
index 403d631..551da5d 100755 (executable)
@@ -1214,17 +1214,6 @@ class localRecordList extends recordList {
                return '&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));
        }
 
-       /**
-        * Return the icon for the language
-        *
-        * @param       integer         Sys language uid
-        * @return      string          Language icon
-        */
-       function languageFlag($sys_language_uid)        {
-               return ($this->languageIconTitles[$sys_language_uid]['flagIcon'] ? '<img src="'.$this->languageIconTitles[$sys_language_uid]['flagIcon'].'" class="absmiddle" alt="" />&nbsp;' : '').
-                               htmlspecialchars($this->languageIconTitles[$sys_language_uid]['title']);
-       }
-
 
 
 
index f8dd07a..f8c1cc3 100755 (executable)
@@ -89,7 +89,7 @@ $BE_USER->modAccess($MCONF,1);
 class SC_mod_web_perm_index {
 
                // External, static:
-       var $getLevels=3;                       // Number of levels to enable recursive settings for
+       var $getLevels = 10;                    // Number of levels to enable recursive settings for
 
                // Internal, static:
        var $MCONF=array();                     // Module config
index f56d4ea..024d698 100755 (executable)
@@ -195,10 +195,10 @@ TABLE.typo3-dyntabmenu TD A { color:grey; text-decoration:none; display: block;
 TABLE.typo3-dyntabmenu TD.tabact A { color:#000; padding-left:10px; padding-right:10px; }
 TABLE.typo3-dyntabmenu TD A:hover { color:#000; background: #f6eab7; text-decoration:none; }
 DIV.typo3-dyntabmenu-divs-foldout DIV.c-tablayer {margin-left: 20px;}
-DIV.typo3-dyntabmenu-divs-foldout DIV.tab { background: #c4d4cd;  background-image: url(gfx/ol/plusonly.gif); background-repeat: no-repeat; border: solid black 1px; }
-DIV.typo3-dyntabmenu-divs-foldout DIV.tabact {  background: #e7dba8; background-image: url(gfx/ol/minusonly.gif); background-repeat: no-repeat; border: solid black 1px;  margin-top: 5px; }
-DIV.typo3-dyntabmenu-divs-foldout DIV.disabled { color:#999999; border: solid black 1px; background: #cccccc;  padding: 2px 2px 2px 22px; }
-DIV.typo3-dyntabmenu-divs-foldout DIV.tab A, DIV.typo3-dyntabmenu-divs-foldout DIV.tabact A { text-decoration:none; display: block; padding: 2px 2px 2px 22px; }
+DIV.typo3-dyntabmenu-divs-foldout DIV.tab { background: #c4d4cd;  background-image: url(gfx/ol/plusbullet.gif); background-repeat: no-repeat; border: solid black 1px; }
+DIV.typo3-dyntabmenu-divs-foldout DIV.tabact {  background: #e7dba8; background-image: url(gfx/ol/minusbullet.gif); background-repeat: no-repeat; border: solid black 1px;  margin-top: 5px; }
+DIV.typo3-dyntabmenu-divs-foldout DIV.disabled { color:#999999; border: solid black 1px; background: #cccccc;  padding: 2px 2px 2px 18px; }
+DIV.typo3-dyntabmenu-divs-foldout DIV.tab A, DIV.typo3-dyntabmenu-divs-foldout DIV.tabact A { text-decoration:none; display: block; padding: 2px 2px 2px 18px; }
 
 
 /* Logo frame (alt_toplogo.php) */
index 9cb41a7..2ba066f 100755 (executable)
@@ -373,6 +373,8 @@ class tx_cms_layout extends recordList {
        function getTable_tt_content($id)       {
                global $TCA;
 
+               $this->initializeLanguages();
+
                        // Initialize:
                $RTE = $GLOBALS['BE_USER']->isRTE();
                $lMarg=1;
@@ -409,7 +411,7 @@ class tx_cms_layout extends recordList {
 
                                // For EACH languages... :
                        foreach($langListArr as $lP)    {       // If NOT languageMode, then we'll only be through this once.
-                               $showLanguage = ' AND sys_language_uid='.$lP;
+                               $showLanguage = $this->defLangBinding && $lP==0 ? ' AND sys_language_uid IN (0,-1)' : ' AND sys_language_uid='.$lP;
                                $cList = explode(',',$this->tt_contentConfig['cols']);
                                $content = array();
                                $head = array();
@@ -437,7 +439,7 @@ class tx_cms_layout extends recordList {
                                                if (!$lP) $defLanguageCount[$key][] = $row['uid'];
 
                                                $editUidList.= $row['uid'].',';
-                                               $singleElementHTML.= $this->tt_content_drawHeader($row,$this->tt_contentConfig['showInfo']?15:5);
+                                               $singleElementHTML.= $this->tt_content_drawHeader($row,$this->tt_contentConfig['showInfo']?15:5, $this->defLangBinding && $lP>0, TRUE);
 
                                                $isRTE = $RTE && $this->isRTEforField('tt_content',$row,'bodytext');
                                                $singleElementHTML.= $this->tt_content_drawItem($row,$isRTE);
@@ -590,98 +592,104 @@ class tx_cms_layout extends recordList {
                                $out.= t3lib_BEfunc::cshItem($this->descrTable,'language_list',$GLOBALS['BACK_PATH']);
                        }
                } else {                // SINGLE column mode (columns shown beneath each other):
+#debug('single column');
+                       if ($this->tt_contentConfig['sys_language_uid']==0 || !$this->defLangBinding)   {
 
-                               // Initialize:
-                       $showLanguage = ' AND sys_language_uid='.$this->tt_contentConfig['sys_language_uid'];
-                       $cList = explode(',',$this->tt_contentConfig['showSingleCol']);
-                       $content=array();
-                       $out='';
+                                       // Initialize:
+                               $showLanguage = $this->defLangBinding && $this->tt_contentConfig['sys_language_uid']==0 ? ' AND sys_language_uid IN (0,-1)' : ' AND sys_language_uid='.$this->tt_contentConfig['sys_language_uid'];
 
-                               // Expand the table to some preset dimensions:
-                       $out.='
-                               <tr>
-                                       <td><img src="clear.gif" width="'.$lMarg.'" height="1" alt="" /></td>
-                                       <td valign="top"><img src="clear.gif" width="150" height="1" alt="" /></td>
-                                       <td><img src="clear.gif" width="10" height="1" alt="" /></td>
-                                       <td valign="top"><img src="clear.gif" width="300" height="1" alt="" /></td>
-                               </tr>';
+                               $cList = explode(',',$this->tt_contentConfig['showSingleCol']);
+                               $content=array();
+                               $out='';
 
-                               // Traverse columns to display top-on-top
-                       while(list($counter,$key)=each($cList)) {
-
-                                       // Select content elements:
-                               $queryParts = $this->makeQueryArray('tt_content', $id, 'AND colPos='.intval($key).$showHidden.$showLanguage);
-                               $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
-                               $c = 0;
-                               $rowArr = $this->getResult($result);
-                               $rowOut = '';
-
-                                       // If it turns out that there are not content elements in the column, then display a big button which links directly to the wizard script:
-                               if ($this->doEdit && $this->option_showBigButtons && !intval($key) && !$GLOBALS['TYPO3_DB']->sql_num_rows($result))     {
-                                       $onClick="document.location='db_new_content_el.php?id=".$id.'&colPos='.intval($key).'&sys_language_uid='.$lP.'&uid_pid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';";
-                                       $theNewButton=$GLOBALS['SOBE']->doc->t3Button($onClick,$GLOBALS['LANG']->getLL('newPageContent'));
-                                       $theNewButton='<img src="clear.gif" width="1" height="5" alt="" /><br />'.$theNewButton;
-                               } else $theNewButton='';
-
-                                       // Traverse any selected elements:
-                               foreach($rowArr as $row)        {
-                                       $c++;
-                                       $editUidList.=$row['uid'].',';
-                                       $isRTE=$RTE && $this->isRTEforField('tt_content',$row,'bodytext');
-
-                                               // Create row output:
-                                       $rowOut.='
-                                               <tr>
-                                                       <td></td>
-                                                       <td valign="top">'.$this->tt_content_drawHeader($row).'</td>
-                                                       <td></td>
-                                                       <td valign="top">'.$this->tt_content_drawItem($row,$isRTE).'</td>
-                                               </tr>';
+                                       // Expand the table to some preset dimensions:
+                               $out.='
+                                       <tr>
+                                               <td><img src="clear.gif" width="'.$lMarg.'" height="1" alt="" /></td>
+                                               <td valign="top"><img src="clear.gif" width="150" height="1" alt="" /></td>
+                                               <td><img src="clear.gif" width="10" height="1" alt="" /></td>
+                                               <td valign="top"><img src="clear.gif" width="300" height="1" alt="" /></td>
+                                       </tr>';
+
+                                       // Traverse columns to display top-on-top
+                               while(list($counter,$key)=each($cList)) {
+
+                                               // Select content elements:
+                                       $queryParts = $this->makeQueryArray('tt_content', $id, 'AND colPos='.intval($key).$showHidden.$showLanguage);
+                                       $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
+                                       $c = 0;
+                                       $rowArr = $this->getResult($result);
+                                       $rowOut = '';
+
+                                               // If it turns out that there are not content elements in the column, then display a big button which links directly to the wizard script:
+                                       if ($this->doEdit && $this->option_showBigButtons && !intval($key) && !$GLOBALS['TYPO3_DB']->sql_num_rows($result))     {
+                                               $onClick="document.location='db_new_content_el.php?id=".$id.'&colPos='.intval($key).'&sys_language_uid='.$lP.'&uid_pid='.$id.'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';";
+                                               $theNewButton=$GLOBALS['SOBE']->doc->t3Button($onClick,$GLOBALS['LANG']->getLL('newPageContent'));
+                                               $theNewButton='<img src="clear.gif" width="1" height="5" alt="" /><br />'.$theNewButton;
+                                       } else $theNewButton='';
+
+                                               // Traverse any selected elements:
+                                       foreach($rowArr as $row)        {
+                                               $c++;
+                                               $editUidList.=$row['uid'].',';
+                                               $isRTE=$RTE && $this->isRTEforField('tt_content',$row,'bodytext');
 
-                                               // If the element was not the last element, add a divider line:
-                                       if ($c != $GLOBALS['TYPO3_DB']->sql_num_rows($result))  {
+                                                       // Create row output:
                                                $rowOut.='
-                                               <tr>
-                                                       <td></td>
-                                                       <td colspan="3"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/stiblet_medium2.gif','width="468" height="1"').' class="c-divider" alt="" /></td>
-                                               </tr>';
+                                                       <tr>
+                                                               <td></td>
+                                                               <td valign="top">'.$this->tt_content_drawHeader($row).'</td>
+                                                               <td></td>
+                                                               <td valign="top">'.$this->tt_content_drawItem($row,$isRTE).'</td>
+                                                       </tr>';
+
+                                                       // If the element was not the last element, add a divider line:
+                                               if ($c != $GLOBALS['TYPO3_DB']->sql_num_rows($result))  {
+                                                       $rowOut.='
+                                                       <tr>
+                                                               <td></td>
+                                                               <td colspan="3"><img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/stiblet_medium2.gif','width="468" height="1"').' class="c-divider" alt="" /></td>
+                                                       </tr>';
+                                               }
+                                       }
+
+                                               // Add spacer between sections in the vertical list
+                                       if ($counter)   {
+                                               $out.='
+                                                       <tr>
+                                                               <td></td>
+                                                               <td colspan="3"><br /><br /><br /><br /></td>
+                                                       </tr>';
                                        }
-                               }
 
-                                       // Add spacer between sections in the vertical list
-                               if ($counter)   {
+                                               // Add section header:
+                                       $newP = $this->newContentElementOnClick($id,$key,$this->tt_contentConfig['sys_language_uid']);
                                        $out.='
+
+                                               <!-- Column header: -->
                                                <tr>
                                                        <td></td>
-                                                       <td colspan="3"><br /><br /><br /><br /></td>
+                                                       <td valign="top" colspan="3">'.
+                                                               $this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key), ($this->doEdit&&count($rowArr)?'&edit[tt_content]['.$editUidList.']=edit'.$pageTitleParamForAltDoc:''), $newP).
+                                                               $theNewButton.
+                                                               '<br /></td>
                                                </tr>';
-                               }
 
-                                       // Add section header:
-                               $newP = $this->newContentElementOnClick($id,$key,$this->tt_contentConfig['sys_language_uid']);
-                               $out.='
+                                               // Finally, add the content from the records in this column:
+                                       $out.=$rowOut;
+                               }
 
-                                       <!-- Column header: -->
-                                       <tr>
-                                               <td></td>
-                                               <td valign="top" colspan="3">'.
-                                                       $this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key), ($this->doEdit&&count($rowArr)?'&edit[tt_content]['.$editUidList.']=edit'.$pageTitleParamForAltDoc:''), $newP).
-                                                       $theNewButton.
-                                                       '<br /></td>
-                                       </tr>';
+                                       // Finally, wrap all table rows in one, big table:
+                               $out = '
+                                       <table border="0" cellpadding="0" cellspacing="0" width="400" class="typo3-page-columnsMode">
+                                               '.$out.'
+                                       </table>';
 
-                                       // Finally, add the content from the records in this column:
-                               $out.=$rowOut;
+                                       // CSH:
+                               $out.= t3lib_BEfunc::cshItem($this->descrTable,'columns_single',$GLOBALS['BACK_PATH']);
+                       } else {
+                               $out = '<br/><br/>'.$GLOBALS['SOBE']->doc->icons(1).'Sorry, you cannot view a single language in this localization mode (Default Language Binding is enabled)<br/><br/>';
                        }
-
-                               // Finally, wrap all table rows in one, big table:
-                       $out = '
-                               <table border="0" cellpadding="0" cellspacing="0" width="400" class="typo3-page-columnsMode">
-                                       '.$out.'
-                               </table>';
-
-                               // CSH:
-                       $out.= t3lib_BEfunc::cshItem($this->descrTable,'columns_single',$GLOBALS['BACK_PATH']);
                }
 
 
@@ -1471,7 +1479,7 @@ class tx_cms_layout extends recordList {
         * @param       integer         Amount of pixel space above the header.
         * @return      string          HTML table with the record header.
         */
-       function tt_content_drawHeader($row,$space=0)   {
+       function tt_content_drawHeader($row,$space=0,$disableMoveAndNewButtons=FALSE,$langMode=FALSE)   {
                global $TCA;
 
                        // Load full table description:
@@ -1487,6 +1495,7 @@ class tx_cms_layout extends recordList {
                        // Create header with icon/lock-icon/title:
                $header = $this->getIcon('tt_content',$row).
                                $lockIcon.
+                               ($langMode ? $this->languageFlag($row['sys_language_uid']) : '').
                                '&nbsp;<b>'.htmlspecialchars($this->CType_labels[$row['CType']]).'</b>';
                $out = '
                                        <tr>
@@ -1515,34 +1524,36 @@ class tx_cms_layout extends recordList {
                                                '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/edit2.gif','width="11" height="12"').' title="'.htmlspecialchars($this->nextThree>1?sprintf($GLOBALS['LANG']->getLL('nextThree'),$this->nextThree):$GLOBALS['LANG']->getLL('edit')).'" alt="" />'.
                                                '</a>';
 
-                                       // New content element:
-                               if ($this->option_newWizard)    {
-                                       $onClick="document.location='db_new_content_el.php?id=".$row['pid'].'&sys_language_uid='.$row['sys_language_uid'].'&colPos='.$row['colPos'].'&uid_pid='.(-$row['uid']).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';";
-                               } else {
-                                       $params='&edit[tt_content]['.(-$row['uid']).']=new';
-                                       $onClick = t3lib_BEfunc::editOnClick($params,$this->backPath);
-                               }
-                               $out.='<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
-                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_record.gif','width="16" height="12"').' title="'.$GLOBALS['LANG']->getLL('newAfter',1).'" alt="" />'.
-                                               '</a>';
-
-                                       // Move element up:
-                               if ($this->tt_contentData['prev'][$row['uid']]) {
-                                       $params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['prev'][$row['uid']];
-                                       $out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveUp',1).'" alt="" />'.
-                                                       '</a>';
-                               } else {
-                                       $out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
-                               }
-                                       // Move element down:
-                               if ($this->tt_contentData['next'][$row['uid']]) {
-                                       $params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['next'][$row['uid']];
-                                       $out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
-                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveDown',1).'" alt="" />'.
+                               if (!$disableMoveAndNewButtons) {
+                                               // New content element:
+                                       if ($this->option_newWizard)    {
+                                               $onClick="document.location='db_new_content_el.php?id=".$row['pid'].'&sys_language_uid='.$row['sys_language_uid'].'&colPos='.$row['colPos'].'&uid_pid='.(-$row['uid']).'&returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))."';";
+                                       } else {
+                                               $params='&edit[tt_content]['.(-$row['uid']).']=new';
+                                               $onClick = t3lib_BEfunc::editOnClick($params,$this->backPath);
+                                       }
+                                       $out.='<a href="#" onclick="'.htmlspecialchars($onClick).'">'.
+                                                       '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_record.gif','width="16" height="12"').' title="'.$GLOBALS['LANG']->getLL('newAfter',1).'" alt="" />'.
                                                        '</a>';
-                               } else {
-                                       $out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
+
+                                               // Move element up:
+                                       if ($this->tt_contentData['prev'][$row['uid']]) {
+                                               $params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['prev'][$row['uid']];
+                                               $out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
+                                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveUp',1).'" alt="" />'.
+                                                               '</a>';
+                                       } else {
+                                               $out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_up.gif','width="11" height="10"',2).' alt="" />';
+                                       }
+                                               // Move element down:
+                                       if ($this->tt_contentData['next'][$row['uid']]) {
+                                               $params='&cmd[tt_content]['.$row['uid'].'][move]='.$this->tt_contentData['next'][$row['uid']];
+                                               $out.='<a href="'.htmlspecialchars($GLOBALS['SOBE']->doc->issueCommand($params)).'">'.
+                                                               '<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"').' title="'.$GLOBALS['LANG']->getLL('moveDown',1).'" alt="" />'.
+                                                               '</a>';
+                                       } else {
+                                               $out.='<img src="clear.gif" '.t3lib_iconWorks::skinImg($this->backPath,'gfx/button_down.gif','width="11" height="10"',2).' alt="" />';
+                                       }
                                }
 
                                        // Hide element:
index f8c3747..40adaca 100755 (executable)
@@ -51,6 +51,7 @@
                        <label index="noAccess_msg">You do not have access to edit the requested record.</label>
                        <label index="undoLastChange">Undo/Redo last change (%s ago)</label>
                        <label index="recordHistory">View record change history</label>
+                       <label index="defaultLanguage">Default</label>
                        <label index="tt_board_subject">Subject</label>
                        <label index="tt_board_author">Author</label>
                        <label index="tt_board_date">Date</label>
index 9f3a8b6..2f4d56a 100755 (executable)
@@ -2538,7 +2538,7 @@ class tslib_cObj {
                                        $offset = t3lib_div::intExplode(',',$conf['JSwindow.']['expand'].',');
 
                                        $a1='<a href="#" onclick="'.
-                                               htmlspecialchars('openPic(\''.$url.'\',\''.($conf['JSwindow.']['newWindow']?md5($url):'thePicture').'\',\'width='.($dims[0]+$offset[0]).',height='.($dims[1]+$offset[1]).',status=0,menubar=0\'); return false;').
+                                               htmlspecialchars('openPic(\''.$GLOBALS['TSFE']->baseUrlWrap($url).'\',\''.($conf['JSwindow.']['newWindow']?md5($url):'thePicture').'\',\'width='.($dims[0]+$offset[0]).',height='.($dims[1]+$offset[1]).',status=0,menubar=0\'); return false;').
                                                '"'.$GLOBALS['TSFE']->ATagParams.'>';
                                        $a2='</a>';
                                        $GLOBALS['TSFE']->setJS('openPic');
@@ -5028,7 +5028,7 @@ class tslib_cObj {
                        }
 
                        if ($JSwindowParams)    {
-                               $onClick="vHWin=window.open('".$finalTagParts['url']."','FEopenLink','".$JSwindowParams."');vHWin.focus();return false;";
+                               $onClick="vHWin=window.open('".$GLOBALS['TSFE']->baseUrlWrap($finalTagParts['url'])."','FEopenLink','".$JSwindowParams."');vHWin.focus();return false;";
                                $res = '<a href="#" onclick="'.htmlspecialchars($onClick).'"'.($linkClass?' class="'.$linkClass.'"':'').$finalTagParts['aTagParams'].'>';
                        } else {
                                $res = '<a href="'.htmlspecialchars($finalTagParts['url']).'"'.$finalTagParts['targetParams'].($linkClass?' class="'.$linkClass.'"':'').$finalTagParts['aTagParams'].'>';
@@ -6291,12 +6291,12 @@ class tslib_cObj {
 
                if ($conf['languageField'])     {
                        if ($GLOBALS['TSFE']->sys_language_contentOL && $TCA[$table] && $TCA[$table]['ctrl']['languageField'] && $TCA[$table]['ctrl']['transOrigPointerField']) {
-                                       // Sys language content is set to zero - and it is expected that whatever routine processes the output will OVERLAY the records with localized version!
-                               $sys_language_content = 0;
+                                       // Sys language content is set to zero/-1 - and it is expected that whatever routine processes the output will OVERLAY the records with localized versions!
+                               $sys_language_content = '0,-1';
                        } else {
-                               $sys_language_content = $GLOBALS['TSFE']->sys_language_content;
+                               $sys_language_content = intval($GLOBALS['TSFE']->sys_language_content);
                        }
-                       $query.=' AND '.$conf['languageField'].'='.intval($sys_language_content);
+                       $query.=' AND '.$conf['languageField'].' IN ('.$sys_language_content.')';
                }
 
                $andWhere = trim($this->stdWrap($conf['andWhere'],$conf['andWhere.']));
index 4aee0cc..3396423 100755 (executable)
@@ -2828,6 +2828,23 @@ if (version == "n3") {
        }
 
        /**
+        * Prefixing the input URL with ->baseUrl If ->baseUrl is set and the input url is not absolute in some way.
+        * Designed as a wrapper functions for use with all frontend links that are processed by JavaScript (for "realurl" compatibility!). So each time a URL goes into window.open, document.location or otherwise, wrap it with this function!
+        *
+        * @param       string          Input URL, relative or absolute
+        * @return      string          Processed input value.
+        */
+       function baseUrlWrap($url)      {
+               if ($this->baseUrl)     {
+                       $urlParts = parse_url($url);
+                       if (!strlen($urlParts['scheme']) && $url{0}!=='/')      {
+                               $url = $this->baseUrl.$url;
+                       }
+               }
+               return $url;
+       }
+
+       /**
         * Prints error msg/header.
         * Echoes out the HTML content
         *
index d05bbb2..a9b751c 100755 (executable)
@@ -111,6 +111,7 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
        var $data = Array();            // This is the array from which data->field: [key] is fetched. So this is the current record!
        var $objBB = Array();
        var $myClassName = 'gifbuilder';
+       var $charRangeMap=array();
 
        /**
         * Initialization of the GIFBUILDER objects, in particular TEXT and IMAGE. This includes finding the bounding box, setting dimensions and offset values before the actual rendering is started.
@@ -129,6 +130,23 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                        $this->setup = $conf;
                        $this->data = $data;
 
+                               // Initializing global Char Range Map
+                       $this->charRangeMap = array();
+                       if (is_array($GLOBALS['TSFE']->tmpl->setup['_GIFBUILDER.']['charRangeMap.']))   {
+                               foreach($GLOBALS['TSFE']->tmpl->setup['_GIFBUILDER.']['charRangeMap.'] as $cRMcfgkey => $cRMcfg)        {
+                                       if (is_array($cRMcfg))  {
+
+                                                       // Initializing:
+                                               $cRMkey = $GLOBALS['TSFE']->tmpl->setup['_GIFBUILDER.']['charRangeMap.'][substr($cRMcfgkey,0,-1)];
+                                               $this->charRangeMap[$cRMkey] = array();
+                                               $this->charRangeMap[$cRMkey]['charMapConfig'] =  $cRMcfg['charMapConfig.'];
+                                               $this->charRangeMap[$cRMkey]['cfgKey'] = substr($cRMcfgkey,0,-1);
+                                               $this->charRangeMap[$cRMkey]['multiplicator'] = (double)$cRMcfg['fontSizeMultiplicator'];
+                                               $this->charRangeMap[$cRMkey]['pixelSpace'] = intval($cRMcfg['pixelSpaceFontSizeRef']);
+                                       }
+                               }
+                       }
+
                                // Getting sorted list of TypoScript keys from setup.
                        $sKeyArray=t3lib_TStemplate::sortedKeyList($this->setup);
 
@@ -162,10 +180,14 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                                                // Swipes through TEXT and IMAGE-objects
                                        switch($theValue)       {
                                                case 'TEXT':
-                                                       if ($this->setup[$theKey.'.']=$this->checkTextObj($conf))       {
+                                                       if ($this->setup[$theKey.'.'] = $this->checkTextObj($conf))     {
+
+                                                                       // Adjust font width if max size is set:
                                                                if ($this->setup[$theKey.'.']['maxWidth'])      {
                                                                        $this->setup[$theKey.'.']['fontSize'] = $this->fontResize($this->setup[$theKey.'.']); //RTF - this has to be done before calcBBox
                                                                }
+
+                                                                       // Calculate bounding box:
                                                                $txtInfo=$this->calcBBox($this->setup[$theKey.'.']);
                                                                $this->setup[$theKey.'.']['BBOX']=$txtInfo;
                                                                $this->objBB[$theKey]=$txtInfo;
@@ -471,6 +493,47 @@ class tslib_gifBuilder extends t3lib_stdGraphic {
                $tlen = intval($conf['textMaxLength']) ? intval($conf['textMaxLength']) : 100;
                $conf['text'] = substr($conf['text'],0,$tlen);
                if ((string)$conf['text']!='')  {
+
+                               // Char range map thingie:
+                       $fontBaseName = basename($conf['fontFile']);
+                       if (is_array($this->charRangeMap[$fontBaseName]))       {
+
+                                       // Initialize splitRendering array:
+                               if (!is_array($conf['splitRendering.']))        {
+                                       $conf['splitRendering.'] = array();
+                               }
+
+                               $cfgK = $this->charRangeMap[$fontBaseName]['cfgKey'];
+                               if (!isset($conf['splitRendering.'][$cfgK]))    {       // Do not impose settings if a splitRendering object already exists:
+                                               // Set configuration:
+                                       $conf['splitRendering.'][$cfgK] = 'charRange';
+                                       $conf['splitRendering.'][$cfgK.'.'] = $this->charRangeMap[$fontBaseName]['charMapConfig'];
+
+                                               // multiplicator of fontsize:
+                                       if ($this->charRangeMap[$fontBaseName]['multiplicator'])        {
+                                               $conf['splitRendering.'][$cfgK.'.']['fontSize'] = round($conf['fontSize'] * $this->charRangeMap[$fontBaseName]['multiplicator']);
+                                       }
+                                               // multiplicator of pixelSpace:
+                                       if ($this->charRangeMap[$fontBaseName]['pixelSpace'])   {
+                                               $travKeys = array('xSpaceBefore','xSpaceAfter','ySpaceBefore','ySpaceAfter');
+                                               foreach($travKeys as $pxKey)    {
+                                                       if (isset($conf['splitRendering.'][$cfgK.'.'][$pxKey])) {
+                                                               $conf['splitRendering.'][$cfgK.'.'][$pxKey] = round($conf['splitRendering.'][$cfgK.'.'][$pxKey] * ($conf['fontSize'] / $this->charRangeMap[$fontBaseName]['pixelSpace']));
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+                       if (is_array($conf['splitRendering.'])) {
+                               foreach($conf['splitRendering.'] as $key => $value)     {
+                                       if (is_array($conf['splitRendering.'][$key]))   {
+                                               if (isset($conf['splitRendering.'][$key]['fontFile']))  {
+                                                       $conf['splitRendering.'][$key]['fontFile'] = $this->checkFile($conf['splitRendering.'][$key]['fontFile']);
+                                               }
+                                       }
+                               }
+                       }
+
                        return $conf;
                }
        }
index 910575d..bcdae0b 100755 (executable)
@@ -144,6 +144,7 @@ class tslib_menu {
        var $subLevelClass = '';                        // Points to the menu-class, that should be used for the next level
        var $spacerIDList = '199';                      // The doktype-number that defines a spacer
        var $doktypeExcludeList = '5,6';                        // doktypes that define which should not be included in a menu
+       var $alwaysActivePIDlist=array();
        var $imgNamePrefix = 'img';
        var $imgNameNotRandom=0;
        var $debug = 0;
@@ -194,6 +195,11 @@ class tslib_menu {
                        $this->tmpl = &$tmpl;
                        $this->sys_page = &$sys_page;
 
+                               // alwaysActivePIDlist initialized:
+                       if (trim($this->conf['alwaysActivePIDlist']))   {
+                               $this->alwaysActivePIDlist = t3lib_div::intExplode(',', $this->conf['alwaysActivePIDlist']);
+                       }
+
                                // 'not in menu' doktypes
                        if($this->conf['excludeDoktypes']) {
                                $this->doktypeExcludeList = $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['excludeDoktypes']);
@@ -1111,14 +1117,15 @@ class tslib_menu {
                        $conf=$this->mconf['JSWindow.'];
                        $url=$LD['totalURL'];
                        $LD['totalURL'] = '#';
-                       $onClick= 'openPic(\''.$url.'\',\''.($conf['newWindow']?md5($url):'theNewPage').'\',\''.$conf['params'].'\'); return false;';
+                       $onClick= 'openPic(\''.$GLOBALS['TSFE']->baseUrlWrap($url).'\',\''.($conf['newWindow']?md5($url):'theNewPage').'\',\''.$conf['params'].'\'); return false;';
                        $GLOBALS['TSFE']->setJS('openPic');
                }
+
                        // out:
                $list = array();
-               $list['HREF']=$LD['totalURL'];
-               $list['TARGET']=$LD['target'];
-               $list['onClick']=$onClick;
+               $list['HREF'] = strlen($LD['totalURL']) ? $LD['totalURL'] : $GLOBALS['TSFE']->baseUrl;  // Added this check: What it does is to enter the baseUrl (if set, which it should for "realurl" based sites) as URL if the calculated value is empty. The problem is that no link is generated with a blank URL and blank URLs might appear when the realurl encoding is used and a link to the frontpage is generated.
+               $list['TARGET'] = $LD['target'];
+               $list['onClick'] = $onClick;
 
                return $list;
        }
@@ -1173,6 +1180,12 @@ class tslib_menu {
         * @see subMenu()
         */
        function isNext($uid, $MPvar='')        {
+
+                       // Check for always active PIDs:
+               if (count($this->alwaysActivePIDlist) && in_array($uid,$this->alwaysActivePIDlist))     {
+                       return TRUE;
+               }
+
                $testUid = $uid.($MPvar?':'.$MPvar:'');
                if ($uid && $testUid==$this->nextActive)        {
                        return TRUE;
@@ -1188,10 +1201,16 @@ class tslib_menu {
         * @access private
         */
        function isActive($uid, $MPvar='')      {
+
+                       // Check for always active PIDs:
+               if (count($this->alwaysActivePIDlist) && in_array($uid,$this->alwaysActivePIDlist))     {
+                       return TRUE;
+               }
+
                $testUid = $uid.($MPvar?':'.$MPvar:'');
                if ($uid && in_array('ITEM:'.$testUid, $this->rL_uidRegister))  {
                        return TRUE;
-       }
+               }
        }
 
        /**
@@ -2620,7 +2639,7 @@ class tslib_jsmenu extends tslib_menu {
                                                $url = rawurlencode($LD['totalURL']);
                                                $target = rawurlencode($LD['target']);
                                        }
-                                       $codeLines.="\n".$var.$count."=".$menuName.".add(".$parent.",".$prev.",0,'".$title."','".$url."','".$target."');";
+                                       $codeLines.="\n".$var.$count."=".$menuName.".add(".$parent.",".$prev.",0,'".$title."','".$GLOBALS['TSFE']->baseUrlWrap($url)."','".$target."');";
                                                // If the active one should be chosen...
                                        $active = ($levelConf['showActive'] && $data['uid'] == $this->tmpl->rootLine[$count]['uid']);
                                                // If the first item should be shown
index 3bf50fa..c1729b6 100755 (executable)
@@ -160,7 +160,7 @@ function linkTo_UnCryptMailto(s)    {       //
 
                if ($GLOBALS['TSFE']->type && $GLOBALS['TSFE']->config['config']['frameReloadIfNotInFrameset']) {
                        $tdlLD = $GLOBALS['TSFE']->tmpl->linkData($GLOBALS['TSFE']->page,'_top',$GLOBALS['TSFE']->no_cache,'');
-                       $GLOBALS['TSFE']->JSCode = 'if(!parent.'.trim($GLOBALS['TSFE']->sPre).' && !parent.view_frame) top.document.location="'.$tdlLD['totalURL'].'"';
+                       $GLOBALS['TSFE']->JSCode = 'if(!parent.'.trim($GLOBALS['TSFE']->sPre).' && !parent.view_frame) top.document.location="'.$GLOBALS['TSFE']->baseUrlWrap($tdlLD['totalURL']).'"';
                }
                $GLOBALS['TSFE']->compensateFieldWidth = ''.$GLOBALS['TSFE']->config['config']['compensateFieldWidth'];
                $GLOBALS['TSFE']->lockFilePath = ''.$GLOBALS['TSFE']->config['config']['lockFilePath'];
index 8189519..3ae41c1 100755 (executable)
@@ -389,7 +389,7 @@ class tslib_pibase {
                if (eregi('(.*)(<a[^>]*>)(.*)',$str,$match))    {
                        $aTagContent = t3lib_div::get_tag_attributes($match[2]);
                        $match[2]='<a href="#" onclick="'.
-                               htmlspecialchars('vHWin=window.open(\''.$aTagContent['href'].'\',\''.($winName?$winName:md5($aTagContent['href'])).'\',\''.$winParams.'\');vHWin.focus();return false;').
+                               htmlspecialchars('vHWin=window.open(\''.$GLOBALS['TSFE']->baseUrlWrap($aTagContent['href']).'\',\''.($winName?$winName:md5($aTagContent['href'])).'\',\''.$winParams.'\');vHWin.focus();return false;').
                                '">';
                        $str=$match[1].$match[2].$match[3];
                }
index d266761..f460745 100755 (executable)
@@ -115,7 +115,7 @@ $TT->pull();
 // *******************************
 // Checking environment
 // *******************************
-if (t3lib_div::int_from_ver(phpversion())<4100000)     die ('TYPO3 runs with PHP4.1.0+ only');
+if (t3lib_div::int_from_ver(phpversion())<4001000)     die ('TYPO3 runs with PHP4.1.0+ only');
 
 if (isset($_POST['GLOBALS']) || isset($_GET['GLOBALS']))       die('You cannot set the GLOBALS-array from outside the script.');
 if (!get_magic_quotes_gpc())   {
index 4ee28e3..4374b2a 100755 (executable)
@@ -69,7 +69,7 @@
  * @see tslib_cObj::typoLink()
  */
 function user_typoLinkPopUp($content,$conf)    {
-       $aOnClick = 'openPic(\''.$content['url'].'\',\'popupwin\',\'width=400,height=500,status=0,menubar=0\'); return false;';
+       $aOnClick = 'openPic(\''.$GLOBALS['TSFE']->baseUrlWrap($content['url']).'\',\'popupwin\',\'width=400,height=500,status=0,menubar=0\'); return false;';
        $TAG =  '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.$content['aTagParams'].'>';
        return $TAG;
 }
index 13f8d56..246f020 100755 (executable)
@@ -1071,7 +1071,7 @@ th { font-family: verdana,arial, helvetica, sans-serif; font-size: 10pt; font-we
                                        }
                                        if ($ok)        {
                                                $hashPart=substr(basename($theFile),-14,10);
-                                               if (!ereg("[^a-f0-9]",$hashPart)      {               // This is a kind of check that the file being deleted has a 10 char hash in it
+                                               if (!ereg("[^a-f0-9]",$hashPart) || substr($theFile,-6)==='.cache' || substr($theFile,-4)==='.tbl' || substr(basename($theFile),0,8)==='install_')      {               // This is a kind of check that the file being deleted has a 10 char hash in it
                                                        if ($action && $deleteCounter<$action)  {
                                                                $deleteCounter++;
                                                                unlink($theFile);
index 26cd904..a4cf72c 100755 (executable)
@@ -1484,13 +1484,14 @@ $str.=$this->docBodyTagBegin().
         *
         * @param       array   Numeric array where each entry is an array in itself with associative keys: "label" contains the label for the TAB, "content" contains the HTML content that goes into the div-layer of the tabs content. "description" contains description text to be shown in the layer. "linkTitle" is short text for the title attribute of the tab-menu link (mouse-over text of tab). "stateIcon" indicates a standard status icon (see ->icon(), values: -1, 1, 2, 3). "icon" is an image tag placed before the text.
         * @param       string  Identification string. This should be unique for every instance of a dynamic menu!
-        * @param       boolean         If set, then enabling one tab does not hide the others - they simply toggles each sheet on/off. This makes most sense together with the $foldout option
+        * @param       integer         If "1", then enabling one tab does not hide the others - they simply toggles each sheet on/off. This makes most sense together with the $foldout option. If "-1" then it acts normally where only one tab can be active at a time BUT you can click a tab and it will close so you have no active tabs.
         * @param       boolean         If set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/foldin menu. Make sure to set $toggle as well for this option.
         * @param       integer         Character limit for a new row.
         * @param       boolean         If set, tab table cells are not allowed to wrap their content
+        * @param       integer         Default tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open.
         * @return      string  JavaScript section for the HTML header.
         */
-       function getDynTabMenu($menuItems,$identString,$toggle=FALSE,$foldout=FALSE,$newRowCharLimit=50,$noWrap=1,$fullWidth=FALSE)     {
+       function getDynTabMenu($menuItems,$identString,$toggle=0,$foldout=FALSE,$newRowCharLimit=50,$noWrap=1,$fullWidth=FALSE,$defaultTabIndex=1)      {
                $content = '';
 
                if (is_array($menuItems))       {
@@ -1507,6 +1508,8 @@ $str.=$this->docBodyTagBegin().
                        $tabRows=0;
                        $titleLenCount = 0;
                        foreach($menuItems as $index => $def) {
+                               $index+=1;      // Need to add one so checking for first index in JavaScript is different than if it is not set at all.
+
                                        // Switch to next tab row if needed
                                if (!$foldout && $titleLenCount>$newRowCharLimit)       {       // 50 characters is probably a reasonable count of characters before switching to next row of tabs.
                                        $titleLenCount=0;
@@ -1514,10 +1517,10 @@ $str.=$this->docBodyTagBegin().
                                        $options[$tabRows] = array();
                                }
 
-                               if ($toggle)    {
+                               if ($toggle==1) {
                                        $onclick = 'this.blur(); DTM_toggle("'.$id.'","'.$index.'"); return false;';
                                } else {
-                                       $onclick = 'this.blur(); DTM_activate("'.$id.'","'.$index.'"); return false;';
+                                       $onclick = 'this.blur(); DTM_activate("'.$id.'","'.$index.'", '.($toggle<0?1:0).'); return false;';
                                }
 
                                $isActive = strcmp($def['content'],'');
@@ -1554,7 +1557,7 @@ $str.=$this->docBodyTagBegin().
                                        $JSinit[] = '
                                                        DTM_array["'.$id.'"]['.$c.'] = "'.$id.'-'.$index.'";
                                        ';
-                                       if ($toggle)    {
+                                       if ($toggle==1) {
                                                $JSinit[] = '
                                                        if (top.DTM_currentTabs["'.$id.'-'.$index.'"]) { DTM_toggle("'.$id.'","'.$index.'"); }
                                                ';
@@ -1596,7 +1599,7 @@ $str.=$this->docBodyTagBegin().
                                        DTM_array["'.$id.'"] = new Array();
                                        '.implode('',$JSinit).'
 
-                                       '.(!$toggle ? 'DTM_activate("'.$id.'",top.DTM_currentTabs["'.$id.'"]?top.DTM_currentTabs["'.$id.'"]:0);' : '').'
+                                       '.($toggle<=0 ? 'DTM_activate("'.$id.'", top.DTM_currentTabs["'.$id.'"]?top.DTM_currentTabs["'.$id.'"]:'.intval($defaultTabIndex).', 0);' : '').'
                                </script>
 
                                ';
@@ -1617,7 +1620,7 @@ $str.=$this->docBodyTagBegin().
                        /*<![CDATA[*/
                                var DTM_array = new Array();
 
-                               function DTM_activate(idBase,index    {       //
+                               function DTM_activate(idBase,index,doToogle)    {       //
                                                // Hiding all:
                                        if (DTM_array[idBase])  {
                                                for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++)    {
@@ -1630,11 +1633,15 @@ $str.=$this->docBodyTagBegin().
 
                                                // Showing one:
                                        if (document.getElementById(idBase+"-"+index+"-DIV"))   {
-                                               document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
-                                               document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
-
-                                                       // Setting current tab index in top of browser.
-                                               top.DTM_currentTabs[idBase] = index;
+                                               if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block")      {
+                                                       document.getElementById(idBase+"-"+index+"-DIV").style.display = "none";
+                                                       document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab";
+                                                       top.DTM_currentTabs[idBase] = -1;
+                                               } else {
+                                                       document.getElementById(idBase+"-"+index+"-DIV").style.display = "block";
+                                                       document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact";
+                                                       top.DTM_currentTabs[idBase] = index;
+                                               }
                                        }
                                }
                                function DTM_toggle(idBase,index)       {       //