Details about the uploaded files ?? Details about the uploaded files ??
 

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]

Main Menu

Details about the uploaded files ??

Started by altenae, October 29, 2011, 08:37:20 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

altenae

The manual says:

You'll be sent to a screen where you can enter details about the uploaded files. After filling in, submit that form using the "Apply changes" button at the bottom of that form.

I would expect to see only the uploaded files.
However I (and others not admin) see al there files for that Album.

Question is this how it suppose to work ?

Edward

phill104

It works exactly as you see it, you will see all the files from the user. Cannot remember why that ay as chosen though.
It is a mistake to think you can solve any major problems just with potatoes.

altenae

Is there a way to see only the uploaded files ?

Edward

Αndré

Coppermine doesn't store the upload queue, so it's not possible to display only the files you just uploaded as-is.

It should be possible to submit the timestamp of the upload form initialization and just display files with a later timestamp. This might be a good (configurable) addition to the next Coppermine release.


I'm currently short of time, so I cannot create the solution yet. Please reply to this thread so I don't miss this thread.

phill104

I suppose in a way that depends on whether we stick with the Flash uploader or go another route.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Please apply the following code changes and report if it works as expected.

1. Open upload.php, find
set_js_var('max_upl_size', $CONFIG['max_upl_size']);
and below, add
set_js_var('timestamp', time());


2. Open js/setup_swf_upload.js, find
window.location = js_vars.site_url + '/editpics.php?album=' + $("select[name='album']").val();
and replace with
window.location = js_vars.site_url + '/editpics.php?album=' + $("select[name='album']").val() + '&newer_than=' + js_vars.timestamp;


3. Open editpics.php, find
$result = cpg_db_query($sql . $owner_str);
and above, add
    // Display only the files from the last queue after flash upload
    if ($superCage->get->keyExists('newer_than')) {
        $owner_str .= " AND ctime > '".$superCage->get->getInt('newer_than')."'";
    }


find
$next_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . ($start + $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '');
$prev_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . max(0, $start - $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '');

and replace with
$newer_than = $superCage->get->keyExists('newer_than') ? "&newer_than=".$superCage->get->getInt('newer_than') : '';

$next_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . ($start + $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '') . $newer_than;
$prev_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . max(0, $start - $count) . '&count=' . $count . (UPLOAD_APPROVAL_MODE ? '&mode=upload_approval' : '') . $newer_than;


find
$form_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . $start . '&count=' . $count;
and replace with
$form_target = $CPG_PHP_SELF . '?album=' . $album_id . '&start=' . $start . '&count=' . $count . $newer_than;

find
<select onchange="if(this.options[this.selectedIndex].value) window.location.href='{$CPG_PHP_SELF}?album=$album_id$mode&amp;start=$start&amp;count='+this.options[this.selectedIndex].value;"  name="count" class="listbox">
and replace with
<select onchange="if(this.options[this.selectedIndex].value) window.location.href='{$CPG_PHP_SELF}?album=$album_id$mode&amp;start=$start&amp;count='+this.options[this.selectedIndex].value+'$newer_than'"  name="count" class="listbox">


Imo we should add this feature to the core code if it works as expected (even to the cpg1.5.x branch).

Αndré


phill104

It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Committed changes in SVN revision 8323 for cpg1.5.x and cpg1.6.x.