[Vtigercrm-commits] [Vtiger development] #8242: Check File Integrity action won't reenable the file if the problem is fixed
Vtiger development
vtiger-tickets at trac.vtiger.com
Wed Sep 17 10:03:24 GMT 2014
#8242: Check File Integrity action won't reenable the file if the problem is fixed
------------------------+------------------------
Reporter: alanbell | Owner: developer
Type: defect | Status: new
Priority: unassigned | Milestone: Unassigned
Component: vtigercrm | Version: 6.1.0
Severity: Medium | Keywords:
------------------------+------------------------
modules/Documents/actions/CheckFileIntegrity.php
line 32 is $documentRecordModel->updateFileStatus();
which sets the available field to false.
If the file becomes available later then it will tell you if you check
again, but it won't become available.
I would suggest passing a true/false parameter to the updateFileStatus
method, so something like:
if ($resultVal) {
$documentRecordModel->updateFileStatus(true);
$result['message'] = vtranslate('LBL_FILE_AVAILABLE', $moduleName);
} else {
$documentRecordModel->updateFileStatus(false);
$result['message'] =
vtranslate('LBL_FILE_NOT_AVAILABLE', $moduleName);
}
and in modules/Documents/models/Record.php
function updateFileStatus(status) {
$db = PearDatabase::getInstance();
$db->pquery("UPDATE vtiger_notes SET filestatus = ? WHERE
notesid= ?", array(status,$this->get('id')));
}
--
Ticket URL: <http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/8242>
Vtiger development <http://trac.vtiger.com/>
Vtiger CRM
More information about the vtigercrm-commits
mailing list