X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCampaign%2FBAO%2FSurvey.php;h=45ecdd462b0a2b5895e37f43d15ef13dfb46e74b;hb=757fc7f21936ac57c7e33ab93aa4490407cf9c8b;hp=9e2463801123d334c6bf4facba8319d3921c4dde;hpb=709e574bfc8b047d9e9f9a6ad84595bc3f560b54;p=civicrm-core.git diff --git a/CRM/Campaign/BAO/Survey.php b/CRM/Campaign/BAO/Survey.php index 9e24638011..45ecdd462b 100644 --- a/CRM/Campaign/BAO/Survey.php +++ b/CRM/Campaign/BAO/Survey.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.6 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | + | Copyright CiviCRM LLC (c) 2004-2015 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2014 + * @copyright CiviCRM LLC (c) 2004-2015 * $Id$ * */ @@ -40,21 +40,14 @@ require_once 'CRM/Campaign/DAO/Survey.php'; class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey { /** - * Takes a bunch of params that are needed to match certain criteria and - * retrieves the relevant objects. Typically the valid params are only - * campaign_id. + * Retrieve DB object based on input parameters. + * + * It also stores all the retrieved values in the default array. * * @param array $params * (reference ) an assoc array of name/value pairs. * @param array $defaults * (reference ) an assoc array to hold the flattened values. - */ - - /** - * The action links that we need to display for the browse screen - * - * @param array $params - * @param $defaults * * @return CRM_Campaign_DAO_Survey|null */ @@ -71,7 +64,7 @@ class CRM_Campaign_BAO_Survey extends CRM_Campaign_DAO_Survey { } /** - * Takes an associative array and creates a Survey object + * Takes an associative array and creates a Survey object. * * the function extract all the params it needs to initialize the create a * survey object. @@ -246,7 +239,7 @@ SELECT survey.id as id, } /** - * Get Surveys + * Get Surveys. * * @param bool $onlyActive * Retrieve only active surveys. @@ -336,7 +329,7 @@ SELECT survey.id as id, } /** - * Get Surveys custom groups + * Get Surveys custom groups. * * @param array $surveyTypes * an array of survey type id. @@ -376,7 +369,7 @@ SELECT survey.id as id, } /** - * Update the is_active flag in the db + * Update the is_active flag in the db. * * @param int $id * Id of the database record. @@ -384,14 +377,14 @@ SELECT survey.id as id, * Value we want to set the is_active field. * * @return Object - * DAO object on sucess, null otherwise + * DAO object on success, null otherwise */ public static function setIsActive($id, $is_active) { return CRM_Core_DAO::setFieldValue('CRM_Campaign_DAO_Survey', $id, 'is_active', $is_active); } /** - * Delete the survey + * Delete the survey. * * @param int $id * Survey id. @@ -711,7 +704,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a } /** - * This function retrieve all option groups which are created as a result set + * This function retrieve all option groups which are created as a result set. * * @param string $valueColumnName * @return array @@ -759,7 +752,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a } /** - * This function retrive all response options of survey + * This function retrive all response options of survey. * * @param int $surveyId * Survey id. @@ -781,7 +774,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a } /** - * This function return all voter links with respecting permissions + * This function return all voter links with respecting permissions. * * @param int $surveyId * @param bool $enclosedInUL @@ -933,7 +926,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a } /** - * Get survey supportable profile types + * Get survey supportable profile types. */ public static function surveyProfileTypes() { static $profileTypes; @@ -947,7 +940,7 @@ INNER JOIN civicrm_contact contact_a ON ( activityTarget.contact_id = contact_a } /** - * Get the valid survey response fields those + * Get the valid survey response fields those. * are configured with profile and custom fields. * * @param int $surveyId @@ -1139,7 +1132,7 @@ UPDATE civicrm_activity case 'activity_type_id': $campaignCompId = CRM_Core_Component::getComponentID('CiviCampaign'); if ($campaignCompId) { - $params['condition'] = array("component_id={$campaignCompId}", "v.name != 'Petition'"); + $params['condition'] = array("component_id={$campaignCompId}"); } break; }