The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
kh99,
I'm glad you could duplicate the issue. My gut feeling is that it is in issue with using the data manager, but I'm open to any suggestions. |
#12
|
|||
|
|||
Yeah, it's caused by this code in class_upload.php (around line 957):
Code:
if (!($result = $this->data->save())) { if (empty($this->data->errors[0]) OR !($this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['cancontrolpanel'])) { $this->set_error('upload_file_failed'); } else { $this->error =& $this->data->errors[0]; } } For some reason if you're not an admin it doesn't use the errors from the attachment object. |
#13
|
|||
|
|||
Thanks so much for finding that. It makes sense now why it it is a usergroup problem. I'm guessing the VB developers didn't want to show more descriptive error messages to anyone except admin users.
Now I just need to find the most sensible workaround to show other usergroups my phrase in this scenario. Thanks again, James |
#14
|
|||
|
|||
I knew that wasn't really going to be a lot of help in fixing the problem. Anyway, I was thinking maybe upload_accept, although i'm not sure if the file data is in a variable at that point.
|
#15
|
|||
|
|||
I'm looking at upload_accept, but it doesn't look like the filehash has been created yet and I don't think I have the file data yet to create one myself. I'll keep digging.
Thanks, James --------------- Added [DATE]1328546156[/DATE] at [TIME]1328546156[/TIME] --------------- Quote:
This works: Code:
if (!($result = $this->data->save())) { echo "<script>alert('class_upload error ". $this->data->errors[0] ."')</script>"; if (empty($this->data->errors[0]) OR !($this->registry->userinfo['permissions']['adminpermissions'] & $this->registry->bf_ugp_adminpermissions['cancontrolpanel']) AND ($this->data->errors[0] != "This file is not allowed to be uploaded on our website.")) { $this->set_error('upload_file_failed'); } else { $this->error =& $this->data->errors[0]; } } Thanks, James |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|