https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19230
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] | |ommunity.org --- Comment #3 from Jonathan Druart <[email protected]> --- I think it would be better to assign a $course_id variable and reuse it. Something like: modified: course_reserves/mod_course.pl @ mod_course.pl:41 @ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( ); my $action = $cgi->param('action') || ''; +my $course_id = $cgi->param('course_id'); if ( $action eq 'del' ) { - DelCourse( $cgi->param('course_id') ); + DelCourse( $course_id ); print $cgi->redirect("/cgi-bin/koha/course_reserves/course-reserves.pl"); } else { my %params; - $params{'course_id'} = $cgi->param('course_id') - if ( $cgi->param('course_id') ); + $params{'course_id'} = $course_id; $params{'department'} = $cgi->param('department'); $params{'course_number'} = $cgi->param('course_number'); $params{'section'} = $cgi->param('section'); @ mod_course.pl:60 @ if ( $action eq 'del' ) { $params{'students_count'} = $cgi->param('students_count'); $params{'enabled'} = ( $cgi->param('enabled') eq 'on' ) ? 'yes' : 'no'; - my $course_id = ModCourse(%params); + my $new_course_id = ModCourse(%params); my @instructors = $cgi->multi_param('instructors'); ModCourseInstructors( mode => 'replace', cardnumbers => \@instructors, - course_id => $course_id + course_id => $new_course_id ); - print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=$course_id"); + print $cgi->redirect("/cgi-bin/koha/course_reserves/course-details.pl?course_id=$new_course_id"); } Would it make more sense? -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
