[otrs-cvs] FAQ/Kernel/System FAQ.pm,1.14,1.15

cvs-log at otrs.org cvs-log at otrs.org
Sun Mar 2 22:27:11 GMT 2008


Comments:
Update of /home/cvs/FAQ/Kernel/System
In directory lancelot:/tmp/cvs-serv11858/Kernel/System

Modified Files:
	FAQ.pm 
Log Message:
Fixed some bugs and some perldoc errors.

Author: martin

Index: FAQ.pm
===================================================================
RCS file: /home/cvs/FAQ/Kernel/System/FAQ.pm,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** FAQ.pm	13 Feb 2008 13:56:29 -0000	1.14
--- FAQ.pm	2 Mar 2008 22:27:06 -0000	1.15
***************
*** 84,88 ****
  
      my %Article = $FAQObject->FAQGet(
!         ID => 1,
      );
  
--- 84,88 ----
  
      my %Article = $FAQObject->FAQGet(
!         ItemID => 1,
      );
  
***************
*** 144,152 ****
              Field6 => $Row[8],
              FreeKey1 => $Row[9],
!             FreeKey2 => $Row[10],
!             FreeKey3 => $Row[11],
!             FreeKey4 => $Row[12],
!             FreeKey5 => $Row[13],
!             FreeKey6 => $Row[14],
              Created => $Row[17],
              CreatedBy => $Row[18],
--- 144,154 ----
              Field6 => $Row[8],
              FreeKey1 => $Row[9],
!             FreeText1 => $Row[10],
!             FreeKey2 => $Row[11],
!             FreeText2 => $Row[12],
!             FreeKey3 => $Row[13],
!             FreeText3 => $Row[14],
!             FreeKey4 => $Row[15],
!             FreeText4 => $Row[16],
              Created => $Row[17],
              CreatedBy => $Row[18],
***************
*** 243,246 ****
--- 245,249 ----
          StateID => 1,
          LanguageID => 1,
+         Keywords => 'some keywords',
          Field1 => 'Problem...',
          Field2 => 'Solution...',
***************
*** 439,442 ****
--- 442,446 ----
  
      $FAQObject->FAQUpdate(
+         ItemID => 123,
          CategoryID => 1,
          StateID => 1,
***************
*** 589,596 ****
  add an article
  
!     my $ItemID = $FAQObject->VoteAdd(
!         CreateBy => 'Some Text',
          ItemID => '123456',
!         IP => 54.43.30.1',
          Interface => 'Some Text',
          Rate => 100,
--- 593,600 ----
  add an article
  
!     my $Ok = $FAQObject->VoteAdd(
!         CreatedBy => 'Some Text',
          ItemID => '123456',
!         IP => '54.43.30.1',
          Interface => 'Some Text',
          Rate => 100,
***************
*** 645,652 ****
--- 649,658 ----
          CreateBy => 'Some Text',
          ItemID => '123456',
+         IP     => '127.0.0.1',
          Interface => 'Some Text',
      )};
  
  =cut
+ 
  sub VoteGet {
      my $Self = shift;
***************
*** 712,720 ****
  returns a array with VoteIDs
  
!     my @FAQIDs = @{$FAQObject->VoteSearch(
          ItemID => 1,
      )};
  
  =cut
  sub VoteSearch {
      my $Self = shift;
--- 718,727 ----
  returns a array with VoteIDs
  
!     my @VoteIDs = @{$FAQObject->VoteSearch(
          ItemID => 1,
      )};
  
  =cut
+ 
  sub VoteSearch {
      my $Self = shift;
***************
*** 757,765 ****
  add an article
  
!     my $Flag = $FAQObject->VoteDelete(
          VoteID => 1,
      );
  
  =cut
  sub VoteDelete {
      my $Self = shift;
--- 764,773 ----
  add an article
  
!     my $Ok = $FAQObject->VoteDelete(
          VoteID => 1,
      );
  
  =cut
+ 
  sub VoteDelete {
      my $Self = shift;
***************
*** 1804,1810 ****
          What => '*some text*',
          Keywords => '*webserver*',
!         States = ['public', 'internal'],
!         Order => 'changed'
!         Sort => 'ASC'
          Limit => 150,
      );
--- 1812,1818 ----
          What => '*some text*',
          Keywords => '*webserver*',
!         States => ['public', 'internal'],
!         Order => 'Changed',
!         Sort => 'ASC',
          Limit => 150,
      );
***************
*** 1841,1849 ****
              my $What = '';
              foreach my $Value (@List) {
                  if ($What) {
                      $What .= ' OR ';
                  }
                  my $ValueInsert = lc $Self->{DBObject}->Quote($Value);
!                 $What .= " i.$Key LIKE '%".$ValueInsert."%'";
              }
              $Ext .= $What;
--- 1849,1860 ----
              my $What = '';
              foreach my $Value (@List) {
+                 $Value = "\%$Value\%";
+                 $Value =~ s/\*/%/g;
+                 $Value =~ s/%%/%/g;
                  if ($What) {
                      $What .= ' OR ';
                  }
                  my $ValueInsert = lc $Self->{DBObject}->Quote($Value);
!                 $What .= " i.$Key LIKE '$ValueInsert'";
              }
              $Ext .= $What;


More information about the cvs-log mailing list