moveUploadedImage() Removed from 7.2

Why was the function moveUploadedImage() removed in the 7.2 version?  Is there another function that replaced this?

 


/**
 * Moves and resize uploaded file
 *
 * @param array $aFiles                        - system array of uploaded files
 * @param string $fname                        - name of "file" form
 * @param string $path_and_name                - path and name of new file to create
 * @param string $maxsize                    - max available size (optional)
 * @param boolean $imResize                    - call imageResize function immediately (optional)

 *
 * @return int in case of error and extention of new file
 * in case of success
 *
 * NOTE: Source image should be in GIF, JPEG, PNG or BMP format
*/
function moveUploadedImage( $aFiles, $fname, $path_and_name, $maxsize='', $imResize='true' )
{
    global $max_photo_height;
    global $max_photo_width;

    $height = $max_photo_height;
    if ( !$height )
        $height = 400;
    $width = $max_photo_width;
    if ( !$width )
        $width = 400;

    if ( $maxsize && ($aFiles[$fname]['size'] > $maxsize || $aFiles[$fname]['size'] == 0) ) {
        if ( file_exists($aFiles[$fname]['tmp_name']) ) {
            unlink($aFiles[$fname]['tmp_name']);
        }
        return false;
    } else {
        $scan = getimagesize($aFiles[$fname]['tmp_name']);

        if ( ($scan['mime'] == 'image/jpeg' && $ext = '.jpg' ) ||
            ( $scan['mime'] == 'image/gif' && $ext = '.gif' ) ||
            ( $scan['mime'] == 'image/png' && $ext = '.png' ) ) //deleted .bmp format
        {

            $path_and_name .= $ext;
            move_uploaded_file( $aFiles[$fname]['tmp_name'], $path_and_name );

            if ( $imResize )
                imageResize( $path_and_name, $path_and_name, $width, $height );

        } else {
            return IMAGE_ERROR_WRONG_TYPE;
        }
    }

    return $ext;
}

Geeks, making the world a better place
Quote · 3 Aug 2015

I haven't been able to find that function being used in any version of Dolphin.  That could have something to do with removing it.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 3 Aug 2015

 

I haven't been able to find that function being used in any version of Dolphin.  That could have something to do with removing it.

 Look in /inc/images.inc.php

Geeks, making the world a better place
Quote · 4 Aug 2015

I don't believe you understood my post.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 4 Aug 2015

 

being used

Oh, you meant Dolphin using it.  I have come across some third party modules that is using it in 7.1.x.  What changes to the album structure, if any, with 7.2 that might be of concern?

Geeks, making the world a better place
Quote · 4 Aug 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.