src/libraries/adapters/DatabaseSimpleDb.php
/**
    * Formats a photo to be updated or added to the database.
    * Primarily to properly format tags as an array.
    *
    * @param string $id ID of the photo.
    * @param array $params Parameters for the photo to be normalized.
    * @return array
    */
Formats a photo to be updated or added to the database.
Primarily to properly format tags as an array.

@param string $id ID of the photo.
@param array $params Parameters for the photo to be normalized.
@return array
Formats a photo to be updated or added to the database . Primarily to properly format tags as an array . @param string $id ID of the photo . @param array $params Parameters for the photo to be normalized . @return array
private function preparePhoto($id, $params)
  {
    $params['Name'] = $id;
    foreach(array('groups','tags') as $val)
    {
      if(!isset($params[$val]))
        $params[$val] = array();
      elseif(!is_array($params[$val]))
        $params[$val] = (array)explode(',', $params[$val]);
    }
    return $params;
  }
private function preparePhoto ( $ id , $ params ) { $ params [ 'Name' ] = $ id ; foreach ( array ( 'groups' , 'tags' ) as $ val ) { if ( ! isset ( $ params [ $ val ] ) ) $ params [ $ val ] = array ( ) ; elseif ( ! is_array ( $ params [ $ val ] ) ) $ params [ $ val ] = ( array ) explode ( ',' , $ params [ $ val ] ) ; } return $ params ; }
Formats a photo to be updated or added to the database.
Formats a photo to be updated or added to the database .