r1332: Removing the last of the old product selection system
authorRobert Sesek <rsesek@bluestatic.org>
Mon, 4 Dec 2006 06:43:36 +0000 (06:43 +0000)
committerRobert Sesek <rsesek@bluestatic.org>
Mon, 4 Dec 2006 06:43:36 +0000 (06:43 +0000)
editreport.php
includes/functions_product.php
productselect.php [deleted file]

index af2ff9b92f7503cf831e19da598acf5ca84c0cf1..5c4c986b9594e1be3e40d336980d1e6331f736dd 100644 (file)
@@ -184,9 +184,7 @@ if ($_POST['do'] == 'update')
        }
        
        // -------------------------------------------------------------------
-       // do update stuff
-       $pcv = parse_pcv_select($bugsys->in['pcv_select'], true);
-       
+       // do update stuff      
        $dependencies = preg_split('#([^0-9].*?)#', $bugsys->in['dependency'], -1, PREG_SPLIT_NO_EMPTY);
        $dependencies = ((sizeof($dependencies) < 1) ? '' : implode(', ', $dependencies));
        
index 65cd58d58d91f2cf30905df0d5855d4e3879f62e..5191854d0619d0c2aa6622f2a34b9a9c39851979 100644 (file)
@@ -122,82 +122,6 @@ function ConstructOptionGroup($glabel, $optbits)
        return $HTML;
 }
 
-// ###################### Start parse_pcv_select #####################
-function parse_pcv_select($input, $validate = false)
-{
-       global $bugsys;
-       
-       $input = trim($input);
-       
-       if (preg_match('#^p(\d+?)c(\d+?)v(\d+?)$#', $input) == 0)
-       {
-               return false;
-       }
-
-       $trio = preg_split('#(p|c|v)#i', $input, -1, PREG_SPLIT_NO_EMPTY);
-       if (sizeof($trio) != 3)
-       {
-               return false;
-       }
-       
-       $pcv = array('product' => intval($trio[0]), 'component' => intval($trio[1]), 'version' => intval($trio[2]));
-       
-       if (!$validate)
-       {
-               return $return;
-       }
-       else
-       {               
-               // -------------------------------------------------------------------
-               // pcv validation
-               $product = $bugsys->datastore['product'][ $pcv['product'] ];
-               if (!$product)
-               {
-                       return false;
-               }
-               $version = $bugsys->datastore['version'][ $pcv['version'] ];
-               if (!$version)
-               {
-                       return false;
-               }
-               // no component
-               if ($pcv['component'] == 0)
-               {
-                       // not global version and version.productid != product.productid
-                       if ($version['productid'] != 0 AND $version['productid'] != $product['productid'])
-                       {
-                               return false;
-                       }
-               }
-               // using a component
-               else
-               {
-                       $component = $bugsys->datastore['product'][ $pcv['component'] ];
-                       // component has the right mother
-                       if ($component['componentmother'] == $product['productid'])
-                       {
-                               // version.productid != {component.productid | product.productid}
-                               if (($version['productid'] != $component['productid'] AND $version['productid'] != $product['productid']) AND $version['productid'] != 0)
-                               {
-                                       return false;
-                               }
-                       }
-                       else
-                       {
-                               return false;
-                       }
-               }
-               
-               if (!can_perform('canviewbugs', $product['productid']))
-               {
-                       return false;
-               }
-               
-               return $pcv;
-       }
-}
-
-
 /*=====================================================================*\
 || ###################################################################
 || # $HeadURL$
diff --git a/productselect.php b/productselect.php
deleted file mode 100644 (file)
index 58bd5e7..0000000
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/*=====================================================================*
-|| ###################################################################
-|| # Bugdar [#]version[#]
-|| # Copyright ©2002-[#]year[#] Blue Static
-|| #
-|| # This program is free software; you can redistribute it and/or modify
-|| # it under the terms of the GNU General Public License as published by
-|| # the Free Software Foundation; version [#]gpl[#] of the License.
-|| #
-|| # This program is distributed in the hope that it will be useful, but
-|| # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-|| # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-|| # more details.
-|| #
-|| # You should have received a copy of the GNU General Public License along
-|| # with this program; if not, write to the Free Software Foundation, Inc.,
-|| # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-|| ###################################################################
-\*=====================================================================*/
-
-define('SVN', '$Id$');
-
-require_once('./global.php');
-
-// ###################################################################
-
-if ($_REQUEST['do'] == 'pcvselect')
-{
-       
-}
-
-// ###################################################################
-
-if ($_REQUEST['do'] == 'pcvajax')
-{
-       $bugsys->input_clean('product', TYPE_UINT);
-       $bugsys->input_clean('component', TYPE_UINT);
-       $bugsys->input_clean('version', TYPE_UINT);
-       
-       $bits = '';
-       
-       if ($bugsys->in['piece'] == 'product')
-       {
-               if ($bugsys->in['product'] == 0)
-               {
-                       $value = 0;
-                       $label = _('-- None --');
-                       $selected = (!$bugsys->in['component']);
-                       eval('$bits .= "' . $template->fetch('selectoption') . '";');
-               }
-               
-               foreach ($bugsys->datastore['product'] AS $value => $prod)
-               {
-                       if ($prod['componentmother'] == 0)
-                       {
-                               $label = $prod['title'];
-                               $selected = ($value == $bugsys->in['product']);
-                               eval('$bits .= "' . $template->fetch('selectoption') . '";');
-                       }
-               }
-       }
-       else if ($bugsys->in['piece'] == 'component' AND $bugsys->in['product'] != 0)
-       {
-               $value = 0;
-               $label = _('-- None --');
-               $selected = (!$bugsys->in['component']);
-               eval('$bits .= "' . $template->fetch('selectoption') . '";');
-               
-               foreach ($bugsys->datastore['product'] AS $value => $prod)
-               {
-                       if ($prod['componentmother'] == $bugsys->in['product'])
-                       {
-                               $label = $prod['title'];
-                               $selected = ($value == $bugsys->in['component']);
-                               eval('$bits .= "' . $template->fetch('selectoption') . '";');
-                       }
-               }
-       }
-       else if ($bugsys->in['piece'] == 'version' AND $bugsys->in['product'] != 0)
-       {
-               foreach ($bugsys->datastore['version'] AS $value => $vers)
-               {
-                       if ($vers['productid'] == $bugsys->in['product'] OR $vers['productid'] == $bugsys->in['component'] OR intval($vers['productid']) == 0)
-                       {
-                               $label = $vers['version'];
-                               $selected = ($value == $bugsys->in['version']);
-                               eval('$bits .= "' . $template->fetch('selectoption') . '";');
-                       }
-               }
-       }
-       
-       echo $bits;
-}
-
-/*=====================================================================*
-|| ###################################################################
-|| # $HeadURL$
-|| # $Id$
-|| ###################################################################
-\*=====================================================================*/
-?>
\ No newline at end of file