bulk comment fix
[civicrm-core.git] / CRM / Core / BAO / Website.php
index 15d58ed5a2d25f9591f0b3414782d6c791a90138..050502c14a06a627791d074da0cbce864a2ea9e8 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -63,7 +63,9 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
    * process website
    *
    * @param array $params associated array
-   * @param int   $contactID contact id
+   * @param int $contactID contact id
+   *
+   * @param $skipDelete
    *
    * @return void
    * @access public
@@ -86,12 +88,11 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
         }
       }
 
-      if (!CRM_Utils_Array::value('id', $values) &&
+      if (empty($values['id']) &&
         is_array($ids) && !empty($ids)
       ) {
         foreach ($ids as $id => $value) {
-          if (($value['website_type_id'] == $values['website_type_id'])
-            && CRM_Utils_Array::value('url', $values)) {
+          if (($value['website_type_id'] == $values['website_type_id']) && !empty($values['url'])) {
             $values['id'] = $id;
             unset($ids[$id]);
             break;
@@ -99,7 +100,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
         }
       }
       $values['contact_id'] = $contactID;
-      if ( CRM_Utils_Array::value('url', $values) ) {
+      if (!empty($values['url'])) {
         self::add($values);
       }
     }
@@ -128,7 +129,10 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
    * Given the list of params in the params array, fetch the object
    * and store the values in the values array
    *
-   * @param array entityBlock input parameters to find object
+   * @param $params
+   * @param $values
+   *
+   * @internal param \entityBlock $array input parameters to find object
    *
    * @return boolean
    * @access public
@@ -157,6 +161,8 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
    *
    * @param int $id the contact id
    *
+   * @param bool $updateBlankLocInfo
+   *
    * @return array  the array of website details
    * @access public
    * @static