Make all form task inherit from Core_Form_Task otherwise export can fail when accesse...
authorMatthew Wire <devel@mrwire.co.uk>
Fri, 1 Jun 2018 15:34:28 +0000 (16:34 +0100)
committerMatthew Wire <devel@mrwire.co.uk>
Fri, 15 Jun 2018 09:12:45 +0000 (10:12 +0100)
CRM/Activity/Form/Task.php
CRM/Campaign/Form/Task.php
CRM/Contact/Form/Task.php
CRM/Contribute/Form/Task.php
CRM/Event/Form/Task.php
CRM/Export/Form/Select.php
CRM/Grant/Form/Task.php
CRM/Mailing/Form/Task.php
CRM/Member/Form/Task.php
CRM/Pledge/Form/Task.php

index 254579876b015c1af5a4e974d2391cea0d8c6c4d..3ec9429bee13ea00b181ac518f0f4f8f3e33d862 100644 (file)
  */
 
 /**
- * Class for activity task actions.
+ * Class for activity form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Activity_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
-
-  /**
-   * The array that holds all the contact ids.
-   *
-   * @var array
-   */
-  public $_contactIds;
+class CRM_Activity_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the member ids.
index 5d7bbd6a9bd93057d36dab54e230267a37a4a46c..a7e464ad83a7b6d7547cabed44f25b618e29516b 100644 (file)
 /**
  * This class generates form components for relationship.
  */
-class CRM_Campaign_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The additional clause that we restrict the search.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The task being performed
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The array that holds all the contact ids
-   *
-   * @var array
-   */
-  public $_contactIds;
-
-  /**
-   * The array that holds all the component ids
-   *
-   * @var array
-   */
-  protected $_componentIds;
+class CRM_Campaign_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the voter ids
index 5136641e3b70ee2def7aa92f76e76f650f5c203e..d445b761c744bf9386a78cae4df1a45c944e4f12 100644 (file)
@@ -34,7 +34,7 @@
 /**
  * This class generates form components for search-result tasks.
  */
-class CRM_Contact_Form_Task extends CRM_Core_Form {
+class CRM_Contact_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The task being performed
index b84be9865a9e75433593931538804b4f16128e7b..70cf6325cef09c0cf42fc77163f75e97bba4352c 100644 (file)
  */
 
 /**
- * This class generates form components for relationship.
+ * Class for contribute form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Contribute_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
+class CRM_Contribute_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the contribution ids.
@@ -64,13 +44,6 @@ class CRM_Contribute_Form_Task extends CRM_Core_Form {
    */
   protected $_contributionIds;
 
-  /**
-   * The array that holds all the contact ids.
-   *
-   * @var array
-   */
-  public $_contactIds;
-
   /**
    * The array that holds all the mapping contribution and contact ids.
    *
index 263a644cba8cf6e2151b74bda96cc8f5c35a938c..00331ddb28d7a8c2aa3b0ad68a85d22d52ba15f1 100644 (file)
  */
 
 /**
- * This class generates task actions for CiviEvent
- *
+ * Class for event form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Event_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
+class CRM_Event_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the participant ids.
index 3e36b238ca931b620c43648fa25d868c1e27c802..64998a52c708ea862407cffd371695f58d6f501d 100644 (file)
@@ -36,7 +36,7 @@
 /**
  * This class gets the name of the file to upload
  */
-class CRM_Export_Form_Select extends CRM_Core_Form {
+class CRM_Export_Form_Select extends CRM_Core_Form_Task {
 
   /**
    * Various Contact types.
@@ -70,20 +70,6 @@ class CRM_Export_Form_Select extends CRM_Core_Form {
 
   public $_componentTable;
 
-  /**
-   * Must be set to entity table name (eg. civicrm_participant) by child class
-   *
-   * @var string
-   */
-  static $tableName = NULL;
-
-  /**
-   * Must be set to entity shortname (eg. event)
-   *
-   * @var string
-   */
-  static $entityShortname = NULL;
-
   /**
    * Build all the data structures needed to build the form.
    *
index 51f505428ee2b13183ec9f0171556f32b5fadb2b..fc1e831f98b34b10c25138392cfd20992059e8c5 100644 (file)
  */
 
 /**
- * This class generates task actions for CiviEvent
- *
+ * Class for grant form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Grant_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
+class CRM_Grant_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the grant ids.
index 68ff661c5656152d1d378687f5a6ec1253578f3e..c241e191dc6f1148ebd37804c34219858435d0c0 100644 (file)
  */
 
 /**
- * This class generates form components for relationship
+ * Class for mailing form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Mailing_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
+class CRM_Mailing_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * Build all the data structures needed to build the form.
index 009b67f201f7c6914c2850c31b0cf961be068710..a093365a0e2ef778c257c9d148eaf4658c487317 100644 (file)
  */
 
 /**
- * Class for civimember task actions
- *
+ * Class for member form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Member_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
-
-  /**
-   * The array that holds all the contact ids.
-   *
-   * @var array
-   */
-  public $_contactIds;
+class CRM_Member_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the member ids.
index 092fece3a3e03124f9c934b41ea47eb0f5a5ca4b..dd5946e5c7a16cfcf622d9a540a912d7b483eee6 100644 (file)
  */
 
 /**
- * This class generates task actions for CiviEvent.
+ * Class for pledge form task actions.
+ * FIXME: This needs refactoring to properly inherit from CRM_Core_Form_Task and share more functions.
  */
-class CRM_Pledge_Form_Task extends CRM_Core_Form {
-
-  /**
-   * The task being performed.
-   *
-   * @var int
-   */
-  protected $_task;
-
-  /**
-   * The additional clause that we restrict the search with.
-   *
-   * @var string
-   */
-  protected $_componentClause = NULL;
-
-  /**
-   * The array that holds all the component ids.
-   *
-   * @var array
-   */
-  protected $_componentIds;
+class CRM_Pledge_Form_Task extends CRM_Core_Form_Task {
 
   /**
    * The array that holds all the pledge ids.