Fixed bug #14387: Updating the CGLs [was: Remove the feature "Enable extensions witho...
[Packages/TYPO3.CMS.git] / typo3 / mod / tools / em / class.em_xmlhandler.php
index 94db78e..4c53533 100644 (file)
@@ -53,7 +53,6 @@ class SC_mod_tools_em_xmlhandler {
        var $extXMLResult = array();
        var $extensionsXML = array();
        var $reviewStates = null;
-       var $useUnchecked = false;
        var $useObsolete = false;
 
        /**
@@ -84,15 +83,13 @@ class SC_mod_tools_em_xmlhandler {
                if ($owner)     {
                        $where.= ' AND ownerusername='.$GLOBALS['TYPO3_DB']->fullQuoteStr($owner, 'cache_extensions');
                }
-               if (strlen($owner) || $this->useUnchecked || $allExt)   {
-                               // show extensions without review or that have passed review
-                       $where.= ' AND reviewstate >= 0';
-               } else {
-                               // only display extensions that have passed review
-                       $where.= ' AND reviewstate > 0';
-               }
-               if (!$this->useObsolete && !$allExt)    {
-                       $where.= ' AND state!=5';               // 5 == obsolete
+
+                       // Show extensions without a review or that have passed a review, but not insecure extensions
+               $where .= ' AND reviewstate >= 0';
+
+               if (!$this->useObsolete)        {
+                               // 5 == obsolete
+                       $where.= ' AND state != 5';
                }
                switch ($order) {
                        case 'author_company':
@@ -108,11 +105,7 @@ class SC_mod_tools_em_xmlhandler {
                }
                $order = $forder.', title';
                if (!$allVer)   {
-                       if ($this->useUnchecked)        {
-                               $where .= ' AND lastversion>0';
-                       } else  {
-                               $where .= ' AND lastreviewedversion>0';
-                       }
+                       $where .= ' AND lastversion > 0';
                }
                $this->catArr = array();
                $idx = 0;
@@ -225,38 +218,6 @@ class SC_mod_tools_em_xmlhandler {
                return 0;
        }
 
-       /**
-        * Removes all extension versions from $extensions that have a reviewstate<1, unless explicitly allowed
-        *
-        * @param       array           &$extensions    The "versions" subpart of the extension list
-        * @return      void
-        */
-       function checkReviewState(&$extensions) {
-               if ($this->useUnchecked) return;
-
-               foreach ($extensions as $version => $data) {
-                       if($data['reviewstate']<1)
-                               unset($extensions[$version]);
-               }
-       }
-
-       /**
-        * Removes all extension versions from the list of available extensions that have a reviewstate<1, unless explicitly allowed
-        *
-        * @return      void
-        */
-       function checkReviewStateGlobal() {
-               if($this->useUnchecked) return;
-
-               foreach ($this->extensionsXML as $extkey => $data) {
-                       foreach ($data['versions'] as $version => $vdata) {
-                               if($vdata['reviewstate']<1) unset($this->extensionsXML[$extkey]['versions'][$version]);
-                       }
-                       if(!count($this->extensionsXML[$extkey]['versions'])) unset($this->extensionsXML[$extkey]);
-               }
-       }
-
-
        /**
         * ***************PARSING METHODS***********************
         */