Add missing checks if GUI is supported
authorMatthias Schmidt <gravatronics@live.com>
Sat, 17 Mar 2018 10:59:36 +0000 (11:59 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sat, 17 Mar 2018 10:59:36 +0000 (11:59 +0100)
See #2545

wcfsetup/install/files/lib/acp/form/DevtoolsProjectPipEntryAddForm.class.php
wcfsetup/install/files/lib/acp/page/DevtoolsProjectPipEntryListPage.class.php

index 4c2ec2c690490fb032a09b8e2a4d96a66bc24ad8..9b1805d19675eede0a20a7a9047ee4de7d4a7c53 100644 (file)
@@ -85,6 +85,10 @@ class DevtoolsProjectPipEntryAddForm extends AbstractFormBuilderForm {
                else {
                        throw new IllegalLinkException();
                }
+               
+               if (!$this->pipObject->supportsGui()) {
+                       throw new IllegalLinkException();
+               }
        }
        
        /**
@@ -148,6 +152,7 @@ class DevtoolsProjectPipEntryAddForm extends AbstractFormBuilderForm {
                WCF::getTPL()->assign([
                        'action' => 'add',
                        'pip' => $this->pip,
+                       'pipObject' => $this->pipObject,
                        'project' => $this->project
                ]);
        }
index a2935640984a68f0c989b0e1cc029ae69ddd22c1..dbce9f1511bac0d006a7578bf2937c7bb5937611 100644 (file)
@@ -85,6 +85,10 @@ class DevtoolsProjectPipEntryListPage extends AbstractPage {
                else {
                        throw new IllegalLinkException();
                }
+               
+               if (!$this->pipObject->supportsGui()) {
+                       throw new IllegalLinkException();
+               }
        }
        
        /**