Small things
authorKasper Skårhøj <kasper@typo3.org>
Fri, 7 Oct 2005 12:16:21 +0000 (12:16 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Fri, 7 Oct 2005 12:16:21 +0000 (12:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@812 709f56b5-9817-0410-a4d7-c38de5d9e867

t3lib/class.t3lib_page.php
t3lib/class.t3lib_tceforms.php
typo3/sysext/cms/tslib/class.tslib_content.php
typo3/sysext/cms/tslib/class.tslib_fe.php

index 47a01e2..58e636f 100755 (executable)
@@ -927,36 +927,36 @@ class t3lib_pageSelect {
 
                                // Enable fields:
                        if (is_array($ctrl['enablecolumns']))   {
-    if (!$this->versioningPreview || !$ctrl['versioningWS'] || $noVersionPreview) { // In case of versioning-preview, enableFields are ignored (checked in versionOL())
-     if ($ctrl['enablecolumns']['disabled'] && !$show_hidden && !$ignore_array['disabled']) {
-      $field = $table.'.'.$ctrl['enablecolumns']['disabled'];
-      $query.=' AND '.$field.'=0';
-     }
-     if ($ctrl['enablecolumns']['starttime'] && !$ignore_array['starttime']) {
-      $field = $table.'.'.$ctrl['enablecolumns']['starttime'];
-      $query.=' AND ('.$field.'<='.$GLOBALS['SIM_EXEC_TIME'].')';
-     }
-     if ($ctrl['enablecolumns']['endtime'] && !$ignore_array['endtime']) {
-      $field = $table.'.'.$ctrl['enablecolumns']['endtime'];
-      $query.=' AND ('.$field.'=0 OR '.$field.'>'.$GLOBALS['SIM_EXEC_TIME'].')';
-     }
-     if ($ctrl['enablecolumns']['fe_group'] && !$ignore_array['fe_group']) {
-      $field = $table.'.'.$ctrl['enablecolumns']['fe_group'];
-      $query.= $this->getMultipleGroupsWhereClause($field, $table);
-     }
-
-      // Call hook functions for additional enableColumns
-      // It is used by the extension ingmar_accessctrl which enables assigning more than one usergroup to content and page records
-     if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['addEnableColumns']))    {
-      $_params = array(
-       'table' => $table,
-       'show_hidden' => $show_hidden,
-       'ignore_array' => $ignore_array,
-       'ctrl' => $ctrl
-      );
-      foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['addEnableColumns'] as $_funcRef)    {
-       $query .= t3lib_div::callUserFunction($_funcRef,$_params,$this);
-      }
+                               if (!$this->versioningPreview || !$ctrl['versioningWS'] || $noVersionPreview) { // In case of versioning-preview, enableFields are ignored (checked in versionOL())
+                                       if ($ctrl['enablecolumns']['disabled'] && !$show_hidden && !$ignore_array['disabled']) {
+                                               $field = $table.'.'.$ctrl['enablecolumns']['disabled'];
+                                               $query.=' AND '.$field.'=0';
+                                       }
+                                       if ($ctrl['enablecolumns']['starttime'] && !$ignore_array['starttime']) {
+                                               $field = $table.'.'.$ctrl['enablecolumns']['starttime'];
+                                               $query.=' AND ('.$field.'<='.$GLOBALS['SIM_EXEC_TIME'].')';
+                                       }
+                                       if ($ctrl['enablecolumns']['endtime'] && !$ignore_array['endtime']) {
+                                               $field = $table.'.'.$ctrl['enablecolumns']['endtime'];
+                                               $query.=' AND ('.$field.'=0 OR '.$field.'>'.$GLOBALS['SIM_EXEC_TIME'].')';
+                                       }
+                                       if ($ctrl['enablecolumns']['fe_group'] && !$ignore_array['fe_group']) {
+                                               $field = $table.'.'.$ctrl['enablecolumns']['fe_group'];
+                                               $query.= $this->getMultipleGroupsWhereClause($field, $table);
+                                       }
+
+                                       // Call hook functions for additional enableColumns
+                                       // It is used by the extension ingmar_accessctrl which enables assigning more than one usergroup to content and page records
+                                       if (is_array($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['addEnableColumns']))    {
+                                               $_params = array(
+                                                       'table' => $table,
+                                                       'show_hidden' => $show_hidden,
+                                                       'ignore_array' => $ignore_array,
+                                                       'ctrl' => $ctrl
+                                               );
+                                               foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_page.php']['addEnableColumns'] as $_funcRef)    {
+                                                       $query .= t3lib_div::callUserFunction($_funcRef,$_params,$this);
+                                               }
                                        }
                                }
                        }
index 857255d..20c5ef3 100755 (executable)
@@ -2179,22 +2179,29 @@ class t3lib_TCEforms    {
                                                                        ($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'] && t3lib_div::inList($GLOBALS['TCA'][$table]['ctrl']['requestUpdate'],$key)))
                                                                        && !$GLOBALS['BE_USER']->uc['noOnChangeAlertInTypeFields']) {
                                                                        $alertMsgOnChange = 'if (confirm('.$GLOBALS['LANG']->JScharCode($this->getLL('m_onChangeAlert')).') && TBE_EDITOR_checkSubmit(-1)){ TBE_EDITOR_submitForm() };';
-                                                               } else {$alertMsgOnChange='';}
+                                                               } else {
+                                                                       $alertMsgOnChange='';
+                                                               }
+
                                                                $fakePA['fieldChangeFunc']=$PA['fieldChangeFunc'];
                                                                if (strlen($alertMsgOnChange)) {
                                                                        $fakePA['fieldChangeFunc']['alert']=$alertMsgOnChange;
                                                                }
-                                                               $fakePA['onFocus']=$PA['onFocus'];
+                                                               $fakePA['onFocus']==$PA['onFocus'];
                                                                $fakePA['label']==$PA['label'];
 
                                                                $fakePA['itemFormElName']=$PA['itemFormElName'].$formPrefix.'['.$key.']['.$vDEFkey.']';
                                                                $fakePA['itemFormElName_file']=$PA['itemFormElName_file'].$formPrefix.'['.$key.']['.$vDEFkey.']';
+
                                                                if(isset($editData[$key][$vDEFkey])) {
                                                                        $fakePA['itemFormElValue']=$editData[$key][$vDEFkey];
                                                                } else {
                                                                        $fakePA['itemFormElValue']=$fakePA['fieldConf']['config']['default'];
                                                                }
 
+                                                               $rowCells['formEl']= $this->getSingleField_SW($table,$field,$row,$fakePA);
+                                                               $rowCells['title']= htmlspecialchars($fakePA['fieldConf']['label']);
+
                                                                if (!in_array('DEF',$rotateLang))       {
                                                                        $defInfo = '<div class="typo3-TCEforms-originalLanguageValue">'.nl2br(htmlspecialchars($editData[$key]['vDEF'])).'&nbsp;</div>';
                                                                } else {
index 826d186..713ec7d 100755 (executable)
@@ -1142,53 +1142,54 @@ class tslib_cObj {
                        $slideCollectFuzzy = $slideCollect?(intval($conf['slide.']['collectFuzzy'])?true:false):true;
                        $again = false;
 
-   do {
-    $res = $this->exec_getQuery($conf['table'],$conf['select.']);
-    if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
-     $GLOBALS['TT']->setTSlogMessage($error,3);
-    } else {
-     $this->currentRecordTotal = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
-     $GLOBALS['TT']->setTSlogMessage('NUMROWS: '.$GLOBALS['TYPO3_DB']->sql_num_rows($res));
-     $cObj =t3lib_div::makeInstance('tslib_cObj');
-     $cObj->setParent($this->data,$this->currentRecord);
-     $this->currentRecordNumber=0;
-     $cobjValue = '';
-     while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
-
-       // Versioning preview:
-      $GLOBALS['TSFE']->sys_page->versionOL($conf['table'],$row);
-
-       // Language Overlay:
-      if (is_array($row) && $GLOBALS['TSFE']->sys_language_contentOL) {
-       $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($conf['table'],$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
-      }
-
-      if (is_array($row)) { // Might be unset in the sys_language_contentOL
-       if (!$GLOBALS['TSFE']->recordRegister[$conf['table'].':'.$row['uid']]) {
-        $this->currentRecordNumber++;
-        $cObj->parentRecordNumber = $this->currentRecordNumber;
-        $GLOBALS['TSFE']->currentRecord = $conf['table'].':'.$row['uid'];
-        $this->lastChanged($row['tstamp']);
-        $cObj->start($row,$conf['table']);
-        if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) { $cobjValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->'; }
-        $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
-        $cobjValue .= $tmpValue;
-       }# else debug($GLOBALS['TSFE']->recordRegister,'CONTENT');
-      }
-     }
-     if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) { $cobjValue.='<!--DMAILER_SECTION_BOUNDARY_END-->'; }
-    }
-    if ($slideCollectReverse) {
-     $theValue = $cobjValue.$theValue;
-    } else {
-     $theValue .= $cobjValue;
-    }
-    if ($slideCollect>0) {
-     $slideCollect--;
-    }
-    if ($slide) {
-     if ($slide>0) {
-      $slide--;
+                       do {
+                               $res = $this->exec_getQuery($conf['table'],$conf['select.']);
+                               if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
+                                       $GLOBALS['TT']->setTSlogMessage($error,3);
+                               } else {
+                                       $this->currentRecordTotal = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
+                                       $GLOBALS['TT']->setTSlogMessage('NUMROWS: '.$GLOBALS['TYPO3_DB']->sql_num_rows($res));
+                                       $cObj =t3lib_div::makeInstance('tslib_cObj');
+                                       $cObj->setParent($this->data,$this->currentRecord);
+                                       $this->currentRecordNumber=0;
+                                       $cobjValue = '';
+                                       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
+
+                                               // Versioning preview:
+                                               $GLOBALS['TSFE']->sys_page->versionOL($conf['table'],$row);
+
+                                               // Language Overlay:
+                                               if (is_array($row) && $GLOBALS['TSFE']->sys_language_contentOL) {
+                                               $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay($conf['table'],$row,$GLOBALS['TSFE']->sys_language_content,$GLOBALS['TSFE']->sys_language_contentOL);
+                                               }
+
+                                               if (is_array($row)) { // Might be unset in the sys_language_contentOL
+                                                       if (!$GLOBALS['TSFE']->recordRegister[$conf['table'].':'.$row['uid']]) {
+                                                               $this->currentRecordNumber++;
+                                                               $cObj->parentRecordNumber = $this->currentRecordNumber;
+                                                               $GLOBALS['TSFE']->currentRecord = $conf['table'].':'.$row['uid'];
+                                                               $this->lastChanged($row['tstamp']);
+                                                               $cObj->start($row,$conf['table']);
+                                                               if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) { $cobjValue.='<!--DMAILER_SECTION_BOUNDARY_'.intval($row['module_sys_dmail_category']).'-->'; }
+                                                               $tmpValue = $cObj->cObjGetSingle($renderObjName, $renderObjConf, $renderObjKey);
+                                                               $cobjValue .= $tmpValue;
+                                                       }# else debug($GLOBALS['TSFE']->recordRegister,'CONTENT');
+                                               }
+                                       }
+
+                                       if ($GLOBALS['TSFE']->config['config']['insertDmailerBoundaries']) { $cobjValue.='<!--DMAILER_SECTION_BOUNDARY_END-->'; }
+                               }
+                               if ($slideCollectReverse) {
+                                       $theValue = $cobjValue.$theValue;
+                               } else {
+                                       $theValue .= $cobjValue;
+                               }
+                               if ($slideCollect>0) {
+                                       $slideCollect--;
+                               }
+                               if ($slide) {
+                                       if ($slide>0) {
+                                               $slide--;
                                        }
                                        $conf['select.']['pidInList'] = $this->getSlidePids($conf['select.']['pidInList'], $conf['select.']['pidInList.']);
                                        $again = strlen($conf['select.']['pidInList'])?true:false;
@@ -1680,7 +1681,7 @@ class tslib_cObj {
                                                if ($conf['noWrapAttr'] || $wrap === 'disabled')        {
                                                        $wrap='';
                                                } else {
-                                                       $wrap=$wrap ? ' wrap="'.trim($fParts[3]).'"' : ' wrap="virtual"';
+                                                       $wrap = $wrap ? ' wrap="'.$wrap.'"' : ' wrap="virtual"';
                                                }
                                                $default = $this->getFieldDefaultValue($conf['noValueInsert'], $confData['fieldname'], str_replace('\n',chr(10),trim($parts[2])));
                                                $fieldCode=sprintf('<textarea name="%s"'.$elementIdAttribute.' cols="%s" rows="%s"%s'.$addParams.'>%s</textarea>',
index 3f0835e..446e915 100755 (executable)
@@ -2116,6 +2116,7 @@ TEMPORARILY disabled version previews in online workspace (while testing offline
                                                if (@is_file($this->jumpurl))   {
                                                        $mimeType = t3lib_div::_GP('mimeType');
                                                        $mimeType = $mimeType ? $mimeType : 'application/octet-stream';
+                                                       Header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
                                                        Header('Content-Type: '.$mimeType);
                                                        Header('Content-Disposition: attachment; filename='.basename($this->jumpurl));
                                                        readfile($this->jumpurl);