Problem + Suggestion for core team

Permalink 2 users found helpful
within /concrete/core/controllers/blocks/form.php, I need to make the following change, which would be great to implement as a core change:

}elseif($row['inputType']=='fileupload'){
$answer='';
if (intval( $tmpFileIds[intval($row['msqID'])] )>0) {
$answer= 'http://mydomain.ca/index.php/download_file/view_inline/'.intval( $tmpFileIds[intval($row['msqID'])] );}
$answerLong="";
}

This makes it so that the email that is sent actually links to the file that was uploaded.

Obviously you would use proper SITE_URL or whatever definition is used for this rather than my quick, absolute URL.

Now for my problem - I cannot seem to get this file to override the existing file, and have resorted to placing it in the core. Where would I go to do this (tried /controllers/blocks, no go).

WebSolutions
 
andrew replied on at Permalink Reply
andrew
You should be able to get it to override if you do the following:

1. Go to Dashboard > System and Settings > Cache and Speed Settings and clear the override cache.
2. Copy the file that you modified into blocks/form/controller.php (in the root directory - you will probably have to create the blocks/form/ directory.)

Make sure the class is named FormBlockController and it extends BlockController.
WebSolutions replied on at Permalink Reply
WebSolutions
Thanks I'll give that a shot - any chance of this getting implemented into the core? As it stands now, the email that gets sent only has a number there, which isn't explained in the email as the file ID number, and its just in text, but then also the $answerLong is still set from the field that was just before it, so if you upload a file it actually will email:

Name
John Smith

Company
ABC Company LLC

Photo Upload
86ABC Company LLC

...whereas 86 is the file ID