]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/formaction.php
Introduced isCurrentProfileInScope() which shall check if current profile is
[quix0rs-gnu-social.git] / lib / formaction.php
index 08cb3fe1470bfb4c9714a6812b3de92e0ffc4415..2599153870cf426c54adaba956fed7a14523776b 100644 (file)
@@ -44,6 +44,7 @@ if (!defined('STATUSNET')) {
 class FormAction extends ManagedAction
 {
     protected $form = null;
+    protected $formOpts = array();
     protected $type = null;
     protected $needLogin = true;
     protected $canPost = true;
@@ -64,7 +65,7 @@ class FormAction extends ManagedAction
         return true;
     }
 
-    public function isReadOnly($args) {
+    public function isReadOnly(array $args=array()) {
         return !$this->isPost();
     }
 
@@ -105,7 +106,7 @@ class FormAction extends ManagedAction
         $this->showPage();
     }
 
-    public function showContent()
+    protected function showContent()
     {
         $form = $this->getForm();
         $form->show();
@@ -114,7 +115,7 @@ class FormAction extends ManagedAction
     protected function getForm()
     {
         $class = $this->form.'Form';
-        $form = new $class($this);
+        $form = new $class($this, $this->formOpts);
         return $form;
     }