File repository 2.5 - upload & approval of file bugs Posted:
Fri Aug 15, 2008 4:15 am |
|
|
|
|
|
hi guys,
i have ravennuke and installed filerepository 2.5.
1) whenever i try uploading a new file, i get an "SQL Error: There was a problem uploading the file."
I am not sure if i solved this right: inside index.php
I changed the code
| Code:
|
|
$file_insert = "INSERT INTO ".$prefix."_fr_files (parent_id, user_id, user_ip, upload_date, title, custom1, custom2, custom3, comments, filename, file_size, approved) VALUES ($parent_id, $user_id, '$user_ip', '$upload_date', '$title', '$custom1', '$custom2', '$custom3', '$comments', '$filename', $filename_size, $approved)";
|
to
| Code:
|
|
$file_insert = "INSERT INTO ".$prefix."_fr_files (parent_id, user_id, user_ip, upload_date, title, custom1, custom2, custom3, comments, filename, file_size, approved) VALUES ('$parent_id', '$user_id', '$user_ip', '$upload_date', '$title', '$custom1', '$custom2', '$custom3', '$comments', '$filename', '$filename_size', $approved)";
|
Now I am able to upload files just if i click on the File Repository module under the Modules section on the left column, but not if i try uploading files under the administration menu.
2) files are uploaded as explained above, but when i get to approve the files i see no file there. Howerver the title link says
| Code:
|
|
File Awaiting Approval (5)
|
the content is
| Code:
|
No Files!
There are no files currently awaiting administrative approval.
|
Inside the admin/index.php there's some code for this:
| Code:
|
case "approve":
//GET FILES AWAITING APPROVAL
$faa_sql = $db->sql_query("SELECT
a.username AS submitter,
b.name AS category,
c.app_name AS application,
d.id,
d.title,
d.comments,
d.filename
FROM
".$prefix."_users a,
".$prefix."_fr_categories b,
".$prefix."_fr_apps c,
".$prefix."_fr_files d
WHERE
a.user_id = d.user_id AND
b.id = c.parent_id AND
c.id = d.parent_id AND
approved= ".$file_id);
$faa_numrows = $db->sql_numrows($faa_sql);
print "faa_numrows = '$faa_numrows'";
if($faa_numrows == 0){
|
i added the print function but this always returns 0.
any ideas?
thanks a lot.
|
|
|