CRM-11856 - Update custom values when option values are modified
[civicrm-core.git] / api / v3 / Website.php
index ca4f07606c6459ec586b47c539c4a82004d9c1f3..c808f580c44338db743030e860a3bff9cad43301 100644 (file)
@@ -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.                                    |
  |                                                                    |
  */
 
 /**
- * File for the CiviCRM APIv3 website functions
+ * This api exposes CiviCRM website records.
  *
  * @package CiviCRM_APIv3
- * @subpackage API_Website
- *
- * @copyright CiviCRM LLC (c) 2004-2014
- * @version $Id: Website.php 2011-03-16 ErikHommel $
  */
 
 /**
@@ -50,7 +46,7 @@ function civicrm_api3_website_create($params) {
   $websiteBAO = CRM_Core_BAO_Website::add($params);
   $values = array();
   _civicrm_api3_object_to_array($websiteBAO, $values[$websiteBAO->id]);
-  return civicrm_api3_create_success($values, $params, 'website', 'get');
+  return civicrm_api3_create_success($values, $params, 'Website', 'get');
 }
 
 /**
@@ -59,7 +55,7 @@ function civicrm_api3_website_create($params) {
  * The metadata is used for setting defaults, documentation & validation.
  *
  * @param array $params
- *   Array or parameters determined by getfields.
+ *   Array of parameters determined by getfields.
  */
 function _civicrm_api3_website_create_spec(&$params) {
   $params['contact_id']['api.required'] = 1;
@@ -85,11 +81,11 @@ function civicrm_api3_website_delete($params) {
   if ($websiteDAO->find()) {
     while ($websiteDAO->fetch()) {
       $websiteDAO->delete();
-      return civicrm_api3_create_success(1, $params, 'website', 'delete');
+      return civicrm_api3_create_success(1, $params, 'Website', 'delete');
     }
   }
   else {
-    throw new API_Exception('Could not delete website with id ' . $websiteID);
+    throw new API_Exception('Could not delete Website with id ' . $websiteID);
   }
 }
 
@@ -102,5 +98,5 @@ function civicrm_api3_website_delete($params) {
  *   details of found websites
  */
 function civicrm_api3_website_get($params) {
-  return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'website');
+  return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params, TRUE, 'Website');
 }