Open GoogleCodeExporter opened 9 years ago
I suggest you add a entry in tbl_files_relations even if the file is unaffected.
It should do the trick
Original comment by evcwa...@gmail.com
on 12 Mar 2014 at 10:29
I made this little workaround in PSend_Upload_File class :
in PSend_Upload_File::upload_add_assignment i add this :
.
..
...
$this->users = $arguments['all_users'];
if (empty($arguments['assign_to'])) {
$arguments['assign_to'] = array("c");
}
And near this :
.
..
...
case 'g':
$this->add_to = 'group_id';
$this->account_name = $this->groups[$this->id_only];
$this->action_number = 26;
break;
}
$this->assignment = substr($this->assignment, 1);
if (empty($this->assignment)){
$assignment_sql = 'NULL';
}else{
$assignment_sql = "'$this->assignment'";
}
and i updated the query like this :
$assign_file = $database->query("INSERT INTO tbl_files_relations (file_id,
$this->add_to, hidden)"
."VALUES ('$this->file_id', $assignment_sql, '$this->hidden')");
Now, it should be interesting to check the way orphan file is designed. Because
tbl_files_relations could have private file unassigned to anything.
Original comment by evcwa...@gmail.com
on 12 Mar 2014 at 1:50
In upload-import-orphans.php
I change the query like this :
SELECT DISTINCT file_id FROM tbl_files_relations WHERE client_id IS NOT NULL OR
group_id IS NOT NULL OR folder_id IS NOT NULL
Original comment by evcwa...@gmail.com
on 12 Mar 2014 at 2:08
I submitted change to github
Original comment by evcwa...@gmail.com
on 14 Mar 2014 at 3:33
Original issue reported on code.google.com by
evcwa...@gmail.com
on 12 Mar 2014 at 9:54