[otrs-cvs] Support/Kernel/System Support.pm,1.55,1.56

"CVS commits notifications of OTRS.org" <[email protected]>
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/Support/Kernel/System
In directory lancelot:/tmp/cvs-serv8841/Kernel/System

Modified Files:
	Support.pm 
Log Message:
Flattened hash ref in check output so it will be correctly presented in any XML output.

Author: mb

Index: Support.pm
===================================================================
RCS file: /home/cvs/Support/Kernel/System/Support.pm,v
retrieving revision 1.55
retrieving revision 1.56
diff -2 -u -d -r1.55 -r1.56
--- Support.pm	13 Dec 2012 12:53:51 -0000	1.55
+++ Support.pm	17 Jan 2013 08:42:59 -0000	1.56
@@ -1,5 +1,5 @@
 # --
 # Kernel/System/Support.pm - all required system information
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -157,4 +157,19 @@
         my $AdminCheckRef = $SupportObject->AdminChecksGet();
 
+        # TableInfo can contain a hash ref, we have to flatten it
+        # so we can provide valid info to the Check file later on
+
+        my $TestCounter = 0;
+        for my $Check (@$AdminCheckRef) {
+            $TestCounter++;
+            if ( ref $Check->{TableInfo} eq 'HASH' ) {
+                my $String;
+                for my $Item ( sort keys %{ $Check->{TableInfo} } ) {
+                    $String .= "$Item = $Check->{TableInfo}->{$Item}\n";
+                }
+                $AdminCheckRef->[ $TestCounter - 1 ]->{TableInfo} = $String;
+            }
+        }
+
         # check if return value is a valid array reference
         if ( !$AdminCheckRef || ref $AdminCheckRef ne 'ARRAY' || !@{$AdminCheckRef} ) {
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.