summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-05-23 21:45:39 -0400
committerFrederic Guillot <fred@kanboard.net>2015-05-23 21:45:39 -0400
commit6bee8822bc7622a8b2147172c86554cc3c021188 (patch)
tree35ea85f60b8e0f848505d710e8ca36a1f5316574 /app
parente32f26d048249b84166542d6442efdf202ff44fd (diff)
parent8e3618f4128e419e1522e48ccec27082d30e4de4 (diff)
Merge branch 'master' of https://github.com/fguillot/kanboard
Diffstat (limited to 'app')
-rw-r--r--app/Model/File.php2
-rw-r--r--app/Schema/Mysql.php7
2 files changed, 7 insertions, 2 deletions
diff --git a/app/Model/File.php b/app/Model/File.php
index fe417d48..cb1e4792 100644
--- a/app/Model/File.php
+++ b/app/Model/File.php
@@ -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,
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index aa611a6e..a65525c8 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -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)
{