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: How to require custom fields  (Read 2319 times)

0 Members and 1 Guest are viewing this topic.

aszasz

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
How to require custom fields
« on: January 25, 2005, 09:00:45 pm »

I would like to require users who upload photos to complete the first of the four custom fields ('user1' in database, '$user_field1_name' in code).  If they do not complete custom field 1 when they upload a photo, they will see an error message and will not be allowed to upload that file (however, they can return to the upload page and try again).

I am deep into the code of the file: upload.php (beautifully written and commented code, by the way - a pleasure to work with).  I have located the error-checking section of the code (starting around line 1140).  My question is, at this point in the code, where are the custom field values kept?  They are not in the file_upload_array, nor are they, obviously, in the escrow_array yet, nor are they in the database (duh).  Can I get them from $_POST or $_GET?  

Where can I find the value of $user_field1_name at this point in the code so that I can check to make sure it's not empty?

Thanks in advance for any help.
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 20 queries.