Reverted change from 12.09.2008 (bug #8985)
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Sun, 14 Sep 2008 08:15:12 +0000 (08:15 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Sun, 14 Sep 2008 08:15:12 +0000 (08:15 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4110 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
NEWS.txt
typo3/sysext/cms/tslib/class.tslib_content.php

index 3e21281..9ce6bd0 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-14  Dmitry Dulepov  <dmitry@typo3.org>
+
+       * Reverted change from 12.09.2008 (bug #8985). I mistakenly assumed that another core developer gave +1 to it. I had two non-core +1s only.
+
 2008-09-13  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #9277: Incorrect size of htmlArea RTE dialogue windows in Google Chrome browser
index 81610d2..aa61395 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -51,23 +51,6 @@ DBAL
 Frontend features
 =================
 
-       * Frontend plugins now can convert themselves from USER to USER_INT on the fly. This
-         is useful for plugins who can disallow caching using a TSConfig option (for example,
-         tt_news). Earlier plugins had to use $GLOBALS['TSFE']->set_no_cache(), which caused
-         huge performance problems. Now plugin simply need to call
-         $this->cObj->convertToUserIntObject() and return immediately without generating any
-         content.
-         Objects can find their current execution mode by calling $this->cObj->getUserObjectType().
-         This function can return either tslib_cObj::OBJECTTYPE_USER (if object runs as USER)
-         or tslib_cObj::OBJECTTYPE_USER_INT (if object is running as USER_INT). Here the code
-         example:
-               function main() {
-                       ....
-                       if (!$this->conf['allowCaching'] && $this->cObj->getUserObjectType() == tslib_cObj::OBJECTTYPE_USER) {
-                               $this->cObj->convertToUserIntObject();
-                               return '';
-                       }
-
        * Class tslib_eidtools is enhanced with new methods for eID/AJAX applications:
                public static function initLanguage($language = 'default');
                        Creates $GLOBALS['LANG'] for the given language
index 220e385..c9e36e2 100755 (executable)
@@ -341,32 +341,6 @@ class tslib_cObj {
        var $cObjHookObjectsArr = array();              // Containig hooks for userdefined cObjects
        protected $stdWrapHookObjects = array();                // Containig hook objects for stdWrap
 
-       /**
-        * Set to true by doConvertToUserIntObject() if USER object wants to become USER_INT
-        */
-       protected $doConvertToUserIntObject = false;
-
-       /**
-        * Indicates current object type. Can hold one of OBJECTTYPE_ constants or false.
-        * The value is set and reset inside USER() function. Any time outside of
-        * USER() it is false.
-        */
-       protected $userObjectType = false;
-
-       /**
-        * Indicates that object type is USER.
-        *
-        * @see tslib_cObjh::$userObjectType
-        */
-       const OBJECTTYPE_USER_INT = 1;
-
-       /**
-        * Indicates that object type is USER.
-        *
-        * @see tslib_cObjh::$userObjectType
-        */
-       const OBJECTTYPE_USER = 2;
-
        /**
         * Class constructor.
         * Well, it has to be called manually since it is not a real constructor function.
@@ -727,67 +701,28 @@ class tslib_cObj {
         * @param       array           Array of TypoScript properties
         * @param       string          If "INT" then the cObject is a "USER_INT" (non-cached), otherwise just "USER" (cached)
         * @return      string          Output
-        * @link        http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/8/22/
+        * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=369&cHash=b623aca0a9
         */
-       function USER($conf, $ext = '') {
-               $content = '';
-               switch ($ext) {
+       function USER($conf,$ext='')    {
+               $content='';
+               switch($ext)    {
                        case 'INT':
-                               $this->userObjectType = self::OBJECTTYPE_USER_INT;
-                               $substKey = $ext . '_SCRIPT.' . $GLOBALS['TSFE']->uniqueHash();
-                               $content.='<!--' . $substKey . '-->';
-                               $GLOBALS['TSFE']->config[$ext . 'incScript'][$substKey] = array(
+                               $substKey = $ext.'_SCRIPT.'.$GLOBALS['TSFE']->uniqueHash();
+                               $content.='<!--'.$substKey.'-->';
+                               $GLOBALS['TSFE']->config[$ext.'incScript'][$substKey] = array(
                                        'file' => $conf['includeLibs'],
                                        'conf' => $conf,
                                        'cObj' => serialize($this),
                                        'type' => 'FUNC'
                                );
-                               break;
+                       break;
                        default:
-                               if ($this->userObjectType === false) {
-                                       // Come here only if we are not called from $TSFE->INTincScript_process()!
-                                       $this->userObjectType = self::OBJECTTYPE_USER;
-                               }
-                               $tempContent = $this->callUserFunction($conf['userFunc'], $conf, '');
-                               if ($this->doConvertToUserIntObject) {
-                                       $this->doConvertToUserIntObject = false;
-                                       $content = $this->USER($conf, 'INT');
-                               } else {
-                                       $content .= $tempContent;
-                               }
-                               break;
+                               $content.=$this->callUserFunction($conf['userFunc'],$conf,'');
+                       break;
                }
-               $this->userObjectType = false;
                return $content;
        }
 
-       /**
-        * Retrieves a type of object called as USER or USER_INT. Object can detect their
-        * type by using this call. It returns OBJECTTYPE_USER_INT or OBJECTTYPE_USER depending on the
-        * current object execution. In all other cases it will return false to indicate
-        * a call out of context.
-        *
-        * @return      mixed   One of OBJECTTYPE_ class constants or false
-        */
-       public function getUserObjectType() {
-               return $this->userObjectType;
-       }
-
-       /**
-        * Requests the current USER object to be converted to USER_INT.
-        *
-        * @return      void
-        */
-       public function convertToUserIntObject() {
-               if ($this->userObjectType !== self::OBJECTTYPE_USER) {
-                       $GLOBALS['TT']->setTSlogMessage('tslib_cObj::convertToUserIntObject() ' .
-                               'is called in the wrong context or for the wrong object type', 2);
-               }
-               else {
-                       $this->doConvertToUserIntObject = true;
-               }
-       }
-
        /**
         * Rendering the cObject, FILE
         *