Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Multiple uploads in reverse order  (Read 3189 times)

0 Members and 1 Guest are viewing this topic.

johnwr

  • Translator
  • Coppermine novice
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 46
Multiple uploads in reverse order
« on: June 17, 2004, 01:28:40 am »

Hi,

I wonder why the multipic upload inserts the uploaded pictures in reversed order?

Not really a problem, other than on the last uploads view, and easy to workaround (Upload the pics in reversed order).

However I would feel a queue implementation of this rather than a stack is more logical?

regards
John
Logged

hyperion

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 1317
  • - retired -
Re: Multiple uploads in reverse order
« Reply #1 on: June 17, 2004, 01:35:08 am »

Well, I think in stacks, and I like the array_pop function. It was an arbitrary decision, really.

How would this affect the Last Uploads album?  The images are not inserted into the gallery until after the data page, so they are shown in the order uploaded.
Logged
"Then, Fletch," that bright creature said to him, and the voice was very kind, "let's begin with level flight . . . ."

-Richard Bach, Jonathan Livingston Seagull

(https://forum.coppermine-gallery.net/proxy.php?request=http%3A%2F%2Fwww.mozilla.org%2Fproducts%2Ffirefox%2Fbuttons%2Fgetfirefox_small.png&hash=9f6d645801cbc882a52f0ee76cfeda02625fc537)

johnwr

  • Translator
  • Coppermine novice
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 46
Re: Multiple uploads in reverse order
« Reply #2 on: June 17, 2004, 02:04:56 am »

If I upload two pics at the same time, I'm first prompted to comment and place the second one, and then the first one.
(If my memory serves me right).

Then in the "last uploaded" section the first one shows first (which means it is uploaded last), as is natural if you pop from a stack when you present the pics for commenting and placing.

I like using stacks a lot as well, but maybe a queue would be more natural in this case?

I'm not a php programmer, so I don't even know if there is such queue functionality there...

John
Logged

p.s.b

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Multiple uploads in reverse order
« Reply #3 on: June 18, 2004, 08:17:26 am »

Hi,

Here is my Solution:

in upload.php

replace
Code: [Select]
for ($counter = 0; $counter < $file_upload_count; $counter++) {with
Code: [Select]
for ($counter = $file_upload_count - 1; $counter >= 0; $counter--) {
and
Code: [Select]
for ($counter = 0; $counter < $URI_upload_count; $counter++) {with
Code: [Select]
for ($counter = $URI_upload_count - 1; $counter >= 0; $counter--) {

p.s.b

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Multiple uploads in reverse order
« Reply #4 on: June 28, 2004, 10:45:37 am »

I found out a better solution:

undo the changes above

in upload.php

search for
Code: [Select]
   // Count errors in each error array and the escrow array.
    $escrow_array_count = count($escrow_array);
    $file_error_count = count($file_failure_array);
    $URI_error_count = count($URI_failure_array);
    $zip_error_count = count($zip_failure_array);

and paste before:
Code: [Select]
   // Reverse Array to Show the Uploaded Files in the right Way
    if(is_array($escrow_array)) $escrow_array = array_reverse($escrow_array);

it should work
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 15 queries.