[icinga-checkins] icinga.org: icinga-web/next: Revert " SELECT DISTINCT on CLOBs breaks Oracle support"

git at icinga.org git at icinga.org
Mon Apr 22 09:28:22 CEST 2013


Module: icinga-web
Branch: next
Commit: 4991c66c14c1988ef3b8b796ba1fb7a2e6de7f15
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=4991c66c14c1988ef3b8b796ba1fb7a2e6de7f15

Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Sat Apr 20 11:29:26 2013 +0200

Revert "SELECT DISTINCT on CLOBs breaks Oracle support"

This reverts commit b19582188121cd229570017e3a40094932f3f1cc.

refs #3965

---

 app/modules/Api/actions/ApiSearchAction.class.php  |   11 +----
 .../models/Result/DistinctOutputModel.class.php    |   46 --------------------
 .../views/System/ViewProcSuccessView.class.php     |    8 ---
 3 files changed, 2 insertions(+), 63 deletions(-)

diff --git a/app/modules/Api/actions/ApiSearchAction.class.php b/app/modules/Api/actions/ApiSearchAction.class.php
index ebdbdb8..08502a6 100644
--- a/app/modules/Api/actions/ApiSearchAction.class.php
+++ b/app/modules/Api/actions/ApiSearchAction.class.php
@@ -130,21 +130,14 @@ class Api_ApiSearchAction extends IcingaApiBaseAction {
         
         // Rewrite output, e.g. plugin_output
         // see #2598
-
-        /** @var $rewrite Api_Result_OutputRewriteModel **/
+        
         $rewrite = $this->getContext()->getModel('Result.OutputRewrite', 'Api', array(
                 'target' => $target,
                 'optional' => $rd->getParameter('enableRewrite', false)
         ));
 
         $res = $rewrite->rewrite($res);
-
-        // Distinct rows
-        // see #3965
-
-        /** @var $distinct Api_Result_DistinctOutputModel **/
-        $distinct = $this->getContext()->getModel('Result.DistinctOutput', 'Api');
-        $res = $distinct->distinctRows($res);
+        
 
         $rd->setParameter("searchResult", $res);
 
diff --git a/app/modules/Api/models/Result/DistinctOutputModel.class.php b/app/modules/Api/models/Result/DistinctOutputModel.class.php
deleted file mode 100644
index 8556670..0000000
--- a/app/modules/Api/models/Result/DistinctOutputModel.class.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// {{{ICINGA_LICENSE_CODE}}}
-// -----------------------------------------------------------------------------
-// This file is part of icinga-web.
-// 
-// Copyright (c) 2009-2013 Icinga Developer Team.
-// All rights reserved.
-// 
-// icinga-web 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, either version 3 of the License, or
-// (at your option) any later version.
-// 
-// icinga-web 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 icinga-web.  If not, see <http://www.gnu.org/licenses/>.
-// -----------------------------------------------------------------------------
-// {{{ICINGA_LICENSE_CODE}}}
-
-
-/**
- * Model which make icinga api result rows distinct
- * @package Icinga_Api
- * @author mhein
- * @since 1.9.0
- */
-class Api_Result_DistinctOutputModel extends IcingaApiBaseModel
-{
-    /**
-     * Make array multidimensional unique
-     *
-     * Using AppKitArrayUtil and reset key identifier
-     *
-     * @param array $rows
-     * @return array
-     */
-    public function distinctRows(array $rows)
-    {
-        $out = AppKitArrayUtil::uniqueMultidimensional($rows);
-        return array_values($out); // Reset row identifiers
-    }
-}
\ No newline at end of file
diff --git a/app/modules/Cronks/views/System/ViewProcSuccessView.class.php b/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
index 0beeb6a..618829f 100644
--- a/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
+++ b/app/modules/Cronks/views/System/ViewProcSuccessView.class.php
@@ -139,14 +139,6 @@ class Cronks_System_ViewProcSuccessView extends CronksBaseView {
             $worker->buildAll();
 
             $data = $worker->fetchDataArray();
-
-            // Distinct rows
-            // see #3965
-
-            /** @var $distinct Api_Result_DistinctOutputModel **/
-            $distinct = $this->getContext()->getModel('Result.DistinctOutput', 'Api');
-            $data = $distinct->distinctRows($data);
-
             $worker->countResults();
             
             $jsonResult->hasFieldBulk(array_fill_keys($template->getFieldKeys(), ""));





More information about the icinga-checkins mailing list