From: Chris Cormack Date: Mon, 29 Oct 2007 18:19:54 +0000 (-0500) Subject: Pretty close to finished the dictionary now X-Git-Tag: v3.00.00-alpha~1282 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=83433f61b6b01f2b62c9be6e1af2faeb67c61e66;p=koha_ffzg Pretty close to finished the dictionary now Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- diff --git a/C4/Reports.pm b/C4/Reports.pm index 336be04636..a63c4117eb 100644 --- a/C4/Reports.pm +++ b/C4/Reports.pm @@ -458,7 +458,7 @@ sub get_column_type { while (my $info = $sth->fetchrow_hashref()){ if ($info->{'COLUMN_NAME'} eq $column){ #column we want - if ($info->{'TYPE_NAME'} eq 'CHAR'){ + if ($info->{'TYPE_NAME'} eq 'CHAR' || $info->{'TYPE_NAME'} eq 'VARCHAR'){ $info->{'TYPE_NAME'} = 'distinct'; } return $info->{'TYPE_NAME'}; diff --git a/reports/guided_reports.pl b/reports/guided_reports.pl index 2b508027a4..f1142160d6 100755 --- a/reports/guided_reports.pl +++ b/reports/guided_reports.pl @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License along with # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, # Suite 330, Boston, MA 02111-1307 USA -use CGI::Carp qw(fatalsToBrowser); +use CGI::Carp qw(fatalsToBrowser warningsToBrowser); use strict; use C4::Auth; use CGI; @@ -462,8 +462,11 @@ elsif ($phase eq 'New Term step 4'){ if ($type eq 'DATE'){ $tmp_hash{'date'}=1; } + if ($type eq 'TEXT'){ + $tmp_hash{'text'}=1; + } # else { -# die $type;# +# warn $type;# # } push @column_loop,\%tmp_hash; } @@ -535,27 +538,15 @@ elsif ($phase eq 'New Term step 5'){ } elsif ($phase eq 'New Term step 6'){ - # Choosing the columns - ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { - template_name => "reports/dictionary.tmpl", - query => $input, - type => "intranet", - authnotrequired => 0, - flagsrequired => { editcatalogue => 1 }, - debug => 1, - } - ); + # Saving my $area = $input->param('area'); my $definition_name=$input->param('definition_name'); my $definition_description=$input->param('definition_description'); my $sql=$input->param('sql'); save_dictionary($definition_name,$definition_description,$sql,$area); - $template->param( 'step_6' => 1, - 'area' => $area, - 'definition_name' => $definition_name, - 'definition_description' => $definition_description, - ); + $no_html=1; + print $input->redirect("/cgi-bin/koha/reports/guided_reports.pl?phase=View%20Dictionary"); + } elsif ($phase eq 'Delete Definition'){ $no_html=1;