How to have images uploaded in order and not mixed up each time?

My site is not a dating site and I need the images to upload in sequential order, one after the other. However, they are currently mixed EVERY time a new image is loaded into it's album, which requires sorting the album all over again. I found this code in BXDOLALBUMS which I am sure is responsible for the uploads order being mixed up each time via the $mixedObj code.

/ album's objects methods
    function addObject ($iAlbumId, $mixedObj, $bUpdateCount = true) {
        $iAlbumId = (int)$iAlbumId;
        if ($iAlbumId == 0)
            return;
        $sqlFields = "`id_album`, `id_object`";
        $sqlBody = "";
        $iLastObjId = $this->getLastObj($iAlbumId);
        $iCount = 0;
        if (is_array($mixedObj)) {
            foreach ($mixedObj as $iValue) {
                $iValue = (int)$iValue;
                $sqlBody .= "('$iAlbumId', '$iValue'), ";
                $iCount++;
            }
        }
        else {
            $iValue = (int)$mixedObj;
            $sqlBody = "('$iAlbumId', '$iValue')";
            $iCount++;
        }

Will the code work the way I need if I change it to this?

/ album's objects methods
    function addObject ($iAlbumId, $bUpdateCount = true) {
        $iAlbumId = (int)$iAlbumId;
        if ($iAlbumId == 0)
            return;
        $sqlFields = "`id_album`, `id_object`";
        $sqlBody = "";
        $iLastObjId = $this->getLastObj($iAlbumId);
        $iCount = 0;
        $iValue = (int)$iValue;
                $sqlBody .= "('$iAlbumId', '$iValue'), ";
                $iCount++;
            }

Thanks in advance, Pip

Quote · 4 Aug 2011
 
 
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.