src/Blob/BlobUtil.php
public static function migrate($file_id, $test_key=false)
    {
        global $CFG, $PDOX;

        $retval = false;

        // Check to see where we are moving to...
        if ( isset($CFG->dataroot) && strlen($CFG->dataroot) > 0 ) {
            if ( ! $test_key ) {
                $retval = self::blob2file($file_id);
            }
        } else {
            $retval = self::blob2blob($file_id);
        }
        return $retval;
    }
public static function migrate($file_id, $test_key=false)
    {
        global $CFG, $PDOX;

        $retval = false;

        // Check to see where we are moving to...
        if ( isset($CFG->dataroot) && strlen($CFG->dataroot) > 0 ) {
            if ( ! $test_key ) {
                $retval = self::blob2file($file_id);
            }
        } else {
            $retval = self::blob2blob($file_id);
        }
        return $retval;
    }
public static function migrate ( $ file_id , $ test_key = false ) { global $ CFG , $ PDOX ; $ retval = false ; // Check to see where we are moving to... if ( isset ( $ CFG -> dataroot ) && strlen ( $ CFG -> dataroot ) > 0 ) { if ( ! $ test_key ) { $ retval = self :: blob2file ( $ file_id ) ; } } else { $ retval = self :: blob2blob ( $ file_id ) ; } return $ retval ; }
Check and migrate a blob from an old place to the right new place

@return mixed true if the file was migrated, false if the file
was not migrated, and a string if an error was enountered
Check and migrate a blob from an old place to the right new place