ffzg/recall_notices.pl: added --interval and --dedup
[koha.git] / admin / auth_subfields_structure.pl
index 37249e6..866e5f7 100755 (executable)
@@ -62,7 +62,7 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user(
         query           => $input,
         type            => "intranet",
         authnotrequired => 0,
-        flagsrequired   => { parameters => 'parameters_remaining_permissions' },
+        flagsrequired   => { parameters => 'manage_marc_frameworks' },
         debug           => 1,
     }
 );
@@ -224,7 +224,6 @@ if ($op eq 'add_form') {
                my $hidden = $ohidden[$i]; #collate from 3 hiddens;
                my $isurl = $input->param("isurl$i")?1:0;
                if ($liblibrarian) {
-                       unless (C4::Context->config('demo') or C4::Context->config('demo') eq 1) {
                                if (auth_subfield_structure_exists($authtypecode, $tagfield, $tagsubfield)) {
                                        $sth_update->execute(
                                                $authtypecode,
@@ -269,7 +268,6 @@ if ($op eq 'add_form') {
                         $defaultvalue,
                                        );
                                }
-                       }
                }
        }
     print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode");
@@ -293,10 +291,8 @@ if ($op eq 'add_form') {
 ################## DELETE_CONFIRMED ##################################
 # called by delete_confirm, used to effectively confirm deletion of data in DB
 } elsif ($op eq 'delete_confirmed') {
-       unless (C4::Context->config('demo') or C4::Context->config('demo') eq 1) {
-               my $sth=$dbh->prepare("delete from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?");
-               $sth->execute($tagfield,$tagsubfield,$authtypecode);
-       }
+    my $sth=$dbh->prepare("delete from auth_subfield_structure where tagfield=? and tagsubfield=? and authtypecode=?");
+    $sth->execute($tagfield,$tagsubfield,$authtypecode);
     print $input->redirect("/cgi-bin/koha/admin/auth_subfields_structure.pl?tagfield=$tagfield&authtypecode=$authtypecode");
     exit;
                                                                                                        # END $OP eq DELETE_CONFIRMED
@@ -319,7 +315,6 @@ if ($op eq 'add_form') {
                $row_data{value_builder}        = $results->[$i]{'value_builder'};
                $row_data{hidden}       = $results->[$i]{'hidden'} if($results->[$i]{'hidden'} gt "000") ;
                $row_data{isurl}        = $results->[$i]{'isurl'};
-               $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&authtypecode=$authtypecode";
                if ($row_data{tab} eq -1) {
                        $row_data{subfield_ignored} = 1;
                }