[otrs-cvs] FAQ/Kernel/Modules PublicFAQZoom.pm, 1.16, 1.17 CustomerFAQZoom.pm, 1.24, 1.25 AgentFAQSearchSmall.pm, 1.8, 1.9 AgentFAQZoom.pm, 1.35, 1.36 AgentFAQSearch.pm, 1.38, 1.39

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

Modified Files:
	PublicFAQZoom.pm CustomerFAQZoom.pm AgentFAQSearchSmall.pm 
	AgentFAQZoom.pm AgentFAQSearch.pm 
Log Message:
Fixed bug# 7806 - Missing FAQ-Item valid/invalid column in the database.

Author: ub

Index: PublicFAQZoom.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Modules/PublicFAQZoom.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -2 -u -d -r1.16 -r1.17
--- PublicFAQZoom.pm	20 Nov 2012 13:03:38 -0000	1.16
+++ PublicFAQZoom.pm	2 Jan 2013 11:08:02 -0000	1.17
@@ -1,5 +1,5 @@
 # --
 # Kernel/Modules/PublicFAQZoom.pm - to get a closer view
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -17,4 +17,5 @@
 use MIME::Base64 qw();
 use Kernel::System::FAQ;
+use Kernel::System::Valid;
 
 use vars qw($VERSION);
@@ -42,5 +43,6 @@
 
     # create needed objects
-    $Self->{FAQObject} = Kernel::System::FAQ->new(%Param);
+    $Self->{FAQObject}   = Kernel::System::FAQ->new(%Param);
+    $Self->{ValidObject} = Kernel::System::Valid->new(%Param);
 
     # get config of frontend module
@@ -92,7 +94,12 @@
     }
 
+    # get the valid ids
+    my @ValidIDs = $Self->{ValidObject}->ValidIDsGet();
+    my %ValidIDLookup = map { $_ => 1 } @ValidIDs;
+
     # permission check
     if (
         !$FAQData{Approved}
+        || !$ValidIDLookup{ $FAQData{ValidID} }
         || !$Self->{InterfaceStates}->{ $FAQData{StateTypeID} }
         )

Author: ub

Index: CustomerFAQZoom.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Modules/CustomerFAQZoom.pm,v
retrieving revision 1.24
retrieving revision 1.25
diff -2 -u -d -r1.24 -r1.25
--- CustomerFAQZoom.pm	20 Nov 2012 13:04:14 -0000	1.24
+++ CustomerFAQZoom.pm	2 Jan 2013 11:08:02 -0000	1.25
@@ -1,5 +1,5 @@
 # --
 # Kernel/Modules/CustomerFAQZoom.pm - to get a closer view
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -16,4 +16,5 @@
 
 use Kernel::System::FAQ;
+use Kernel::System::Valid;
 
 use vars qw($VERSION);
@@ -38,5 +39,6 @@
 
     # create needed objects
-    $Self->{FAQObject} = Kernel::System::FAQ->new(%Param);
+    $Self->{FAQObject}   = Kernel::System::FAQ->new(%Param);
+    $Self->{ValidObject} = Kernel::System::Valid->new(%Param);
 
     # get config of frontend module
@@ -83,4 +85,8 @@
     }
 
+    # get the valid ids
+    my @ValidIDs = $Self->{ValidObject}->ValidIDsGet();
+    my %ValidIDLookup = map { $_ => 1 } @ValidIDs;
+
     # check user permission
     my $Permission = $Self->{FAQObject}->CheckCategoryCustomerPermission(
@@ -94,4 +100,5 @@
         !$Permission
         || !$FAQData{Approved}
+        || !$ValidIDLookup{ $FAQData{ValidID} }
         || !$Self->{InterfaceStates}->{ $FAQData{StateTypeID} }
         )

Author: ub

Index: AgentFAQSearchSmall.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Modules/AgentFAQSearchSmall.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -2 -u -d -r1.8 -r1.9
--- AgentFAQSearchSmall.pm	6 Dec 2012 21:34:28 -0000	1.8
+++ AgentFAQSearchSmall.pm	2 Jan 2013 11:08:02 -0000	1.9
@@ -1,5 +1,5 @@
 # --
 # Kernel/Modules/AgentFAQSearchSmall.pm - module for FAQ search
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -17,4 +17,5 @@
 use Kernel::System::FAQ;
 use Kernel::System::SearchProfile;
+use Kernel::System::Valid;
 
 use vars qw($VERSION);
@@ -41,4 +42,5 @@
     $Self->{FAQObject}           = Kernel::System::FAQ->new(%Param);
     $Self->{SearchProfileObject} = Kernel::System::SearchProfile->new(%Param);
+    $Self->{ValidObject}         = Kernel::System::Valid->new(%Param);
 
     # get config for frontend
@@ -119,5 +121,5 @@
 
         # get array search params
-        for my $SearchParam (qw( CategoryIDs LanguageIDs )) {
+        for my $SearchParam (qw(CategoryIDs LanguageIDs ValidIDs)) {
             my @Array = $Self->{ParamObject}->GetArray( Param => $SearchParam );
             if (@Array) {
@@ -354,4 +356,17 @@
     );
 
+    # get valid list
+    my %ValidList = $Self->{ValidObject}->ValidList();
+
+    # build the valid selection
+    $Param{ValidSelectionString} = $Self->{LayoutObject}->BuildSelection(
+        Data        => \%ValidList,
+        Name        => 'ValidIDs',
+        SelectedIDs => $Param{ValidIDs} || [],
+        Size        => 5,
+        Translation => 0,
+        Multiple    => 1,
+    );
+
     # html search mask output
     $Self->{LayoutObject}->Block(

Author: ub

Index: AgentFAQZoom.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Modules/AgentFAQZoom.pm,v
retrieving revision 1.35
retrieving revision 1.36
diff -2 -u -d -r1.35 -r1.36
--- AgentFAQZoom.pm	20 Nov 2012 13:05:09 -0000	1.35
+++ AgentFAQZoom.pm	2 Jan 2013 11:08:02 -0000	1.36
@@ -1,5 +1,5 @@
 # --
 # Kernel/Modules/AgentFAQZoom.pm - to get a closer view
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$

Author: ub

Index: AgentFAQSearch.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/Modules/AgentFAQSearch.pm,v
retrieving revision 1.38
retrieving revision 1.39
diff -2 -u -d -r1.38 -r1.39
--- AgentFAQSearch.pm	6 Dec 2012 21:34:28 -0000	1.38
+++ AgentFAQSearch.pm	2 Jan 2013 11:08:02 -0000	1.39
@@ -1,5 +1,5 @@
 # --
 # Kernel/Modules/AgentFAQSearch.pm - module for FAQ search
-# Copyright (C) 2001-2012 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -18,4 +18,5 @@
 use Kernel::System::SearchProfile;
 use Kernel::System::CSV;
+use Kernel::System::Valid;
 
 use vars qw($VERSION);
@@ -43,4 +44,5 @@
     $Self->{SearchProfileObject} = Kernel::System::SearchProfile->new(%Param);
     $Self->{CSVObject}           = Kernel::System::CSV->new(%Param);
+    $Self->{ValidObject}         = Kernel::System::Valid->new(%Param);
 
     # get config for frontend
@@ -148,5 +150,5 @@
 
         # get array search params
-        for my $SearchParam (qw( CategoryIDs LanguageIDs )) {
+        for my $SearchParam (qw(CategoryIDs LanguageIDs ValidIDs)) {
             my @Array = $Self->{ParamObject}->GetArray( Param => $SearchParam );
             if (@Array) {
@@ -747,7 +749,11 @@
             Value => 'Category',
         },
+        {
+            Key   => 'ValidIDs',
+            Value => 'Validity',
+        },
     );
 
-    # dropdown menu for 'attibutes'
+    # dropdown menu for 'attributes'
     $Param{AttributesStrg} = $Self->{LayoutObject}->BuildSelection(
         Data     => \@Attributes,
@@ -781,5 +787,5 @@
     );
 
-    # build the catogory selection
+    # build the category selection
     $Param{CategoriesSelectionString} = $Self->{LayoutObject}->BuildSelection(
         Data        => $UserCategoriesLongNames,
@@ -791,4 +797,17 @@
     );
 
+    # get valid list
+    my %ValidList = $Self->{ValidObject}->ValidList();
+
+    # build the valid selection
+    $Param{ValidSelectionString} = $Self->{LayoutObject}->BuildSelection(
+        Data        => \%ValidList,
+        Name        => 'ValidIDs',
+        SelectedIDs => $GetParam{ValidIDs} || [],
+        Size        => 5,
+        Translation => 0,
+        Multiple    => 1,
+    );
+
     my %Profiles = $Self->{SearchProfileObject}->SearchProfileList(
         Base      => 'FAQSearch',
---------------------------------------------------------------------
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.