src/libraries/models/Photo.php
/**
    * Update the attributes of a photo in the database.
    *
    * @param string $id The id of the photo.
    * @param array $attributes The attributes to save
    * @return mixed string on success, false on failure
    */
Update the attributes of a photo in the database.
@param string $id The id of the photo.
@param array $attributes The attributes to save
@return mixed string on success, false on failure
Update the attributes of a photo in the database . @param string $id The id of the photo . @param array $attributes The attributes to save @return mixed string on success false on failure
public function update($id, $attributes = array())
  {
    if(empty($attributes))
      return $id;
    $tagObj = new Tag;
    $attributes = $this->whitelistParams($attributes);
    if(isset($attributes['tags']) && !empty($attributes['tags']))
    {
      $attributes['tags'] = $tagObj->sanitizeTagsAsString($attributes['tags']);
    }
    $status = $this->db->postPhoto($id, $attributes);
    if(!$status)
      return false;
    return $id;
  }
public function update ( $ id , $ attributes = array ( ) ) { if ( empty ( $ attributes ) ) return $ id ; $ tagObj = new Tag ; $ attributes = $ this -> whitelistParams ( $ attributes ) ; if ( isset ( $ attributes [ 'tags' ] ) && ! empty ( $ attributes [ 'tags' ] ) ) { $ attributes [ 'tags' ] = $ tagObj -> sanitizeTagsAsString ( $ attributes [ 'tags' ] ) ; } $ status = $ this -> db -> postPhoto ( $ id , $ attributes ) ; if ( ! $ status ) return false ; return $ id ; }
Update the attributes of a photo in the database.
Update the attributes of a photo in the database .