Hi,
Just trying out the program and hit a small bug.
I set a direct link, but since links on the net are known to disappear I downloaded the paper and wanted to upload it.
I know there is a preference for direct link over user upload, but I can't "unset" the direct link.
How do you remove a direct link?
/Martijn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, this is actually a bug I had never experienced (but I checked this right now and confirm it).
the problem is in **papers\_fun.php** in particular in the **handle\_upload** function.
You need to replace this code:
// if it's an url we avoid to try to deal with an uploaded file, since
// a direct link has the precedence
if (is_url($value)) {
return $value;
} else {
return papers_class::handle_upload($field);
}
with this one
// if it's an url we avoid to try to deal with an uploaded file, since
// a direct link has the precedence
if (is_url($value)) {
return $_REQUEST;
} else {
return papers_class::handle_upload($field);
}
and this will fix this problem (please confirm this and I'll release a fixed version).
Notice however that you'll need to modify the paper twice: the first one for deleting the link, the second one to upload the file. This is due to the way file upload and link are (badly) mixed.
Phpbibliography is going under heavy restyling and rewriting, and this mechanism for file upload and links will be improved.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Just trying out the program and hit a small bug.
I set a direct link, but since links on the net are known to disappear I downloaded the paper and wanted to upload it.
I know there is a preference for direct link over user upload, but I can't "unset" the direct link.
How do you remove a direct link?
/Martijn
Yes, this is actually a bug I had never experienced (but I checked this right now and confirm it).
the problem is in **papers\_fun.php** in particular in the **handle\_upload** function.
You need to replace this code:
// if it's an url we avoid to try to deal with an uploaded file, since
// a direct link has the precedence
if (is_url($value)) {
return $value;
} else {
return papers_class::handle_upload($field);
}
with this one
// if it's an url we avoid to try to deal with an uploaded file, since
// a direct link has the precedence
if (is_url($value)) {
return $_REQUEST;
} else {
return papers_class::handle_upload($field);
}
and this will fix this problem (please confirm this and I'll release a fixed version).
Notice however that you'll need to modify the paper twice: the first one for deleting the link, the second one to upload the file. This is due to the way file upload and link are (badly) mixed.
Phpbibliography is going under heavy restyling and rewriting, and this mechanism for file upload and links will be improved.
I can confirm that it works.
Looking forward to the restyling/rewriting part.