Increase length of attachments file names (and truncate if really too long)
This commit is contained in:
@@ -92,7 +92,7 @@ class File extends Base
|
||||
|
||||
return $this->db->table(self::TABLE)->save(array(
|
||||
'task_id' => $task_id,
|
||||
'name' => $name,
|
||||
'name' => substr($name, 0, 255),
|
||||
'path' => $path,
|
||||
'is_image' => $is_image ? '1' : '0',
|
||||
'size' => $size,
|
||||
|
||||
@@ -6,7 +6,12 @@ use PDO;
|
||||
use Core\Security;
|
||||
use Model\Link;
|
||||
|
||||
const VERSION = 71;
|
||||
const VERSION = 72;
|
||||
|
||||
function version_72($pdo)
|
||||
{
|
||||
$pdo->exec('ALTER TABLE files MODIFY name VARCHAR(255)');
|
||||
}
|
||||
|
||||
function version_71($pdo)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user