Replace *API($bugsys) with API()
[bugdar.git] / attachment.php
index 2ccac17aa2966a53c0bbd01f5f95668226455e4b..e6e506cbb9453f9c2c7bb38d9ecb498b5512cb74 100755 (executable)
@@ -65,7 +65,7 @@ $notif->set_bug_data($bug);
 
 if ($_POST['do'] == 'insert')
 {
-       $attachapi = new AttachmentAPI($bugsys);
+       $attachapi = new AttachmentAPI();
        $attachapi->set('bugid',        $input->in['bugid']);
        
        if (!can_perform('canputattach', $bug['product']))
@@ -139,7 +139,7 @@ if ($_POST['do'] == 'insert')
                // handle comment stuff
                if (can_perform('canpostcomments', $bug['product']) AND trim($input->in['comment']))
                {
-                       $comment = new CommentAPI($bugsys);
+                       $comment = new CommentAPI();
                        $comment->set('bugid',          $input->in['bugid']);
                        $comment->set('userid',         bugdar::$userinfo['userid']);
                        $comment->set('comment',        $input->in['comment']);
@@ -197,7 +197,7 @@ if ($_POST['do'] == 'update')
                $message->errorPermission();
        }
        
-       $attachapi = new AttachmentAPI($bugsys);
+       $attachapi = new AttachmentAPI();
        $attachapi->set('attachmentid', $input->in['attachmentid']);
        $attachapi->dorelations = array();
        $attachapi->set_condition();