From 87bb0fed29ba6dcb004197afe3d047f864cbcfea Mon Sep 17 00:00:00 2001 From: ralf Date: Tue, 10 Sep 2024 09:48:07 +0200 Subject: [PATCH] allow longer sharing-path up to 1024 chars (instead of just 255), which also limited Collabora editing --- api/setup/setup.inc.php | 4 ++-- api/setup/tables_current.inc.php | 4 ++-- api/setup/tables_update.inc.php | 12 ++++++++++++ 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/api/setup/setup.inc.php b/api/setup/setup.inc.php index c3129a1c0d..f0f6ba477b 100644 --- a/api/setup/setup.inc.php +++ b/api/setup/setup.inc.php @@ -11,7 +11,7 @@ /* Basic information about this app */ $setup_info['api']['name'] = 'api'; $setup_info['api']['title'] = 'EGroupware API'; -$setup_info['api']['version'] = '23.1.008'; +$setup_info['api']['version'] = '23.1.009'; $setup_info['api']['versions']['current_header'] = '1.29'; // maintenance release in sync with changelog in doc/rpm-build/debian.changes $setup_info['api']['versions']['maintenance_release'] = '23.1.20240905'; @@ -140,4 +140,4 @@ $setup_info['groupdav']['author'] = $setup_info['groupdav']['maintainer'] = arra ); $setup_info['groupdav']['license'] = 'GPL'; $setup_info['groupdav']['hooks']['preferences'] = 'EGroupware\\Api\\CalDAV\\Hooks::menus'; -$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings'; +$setup_info['groupdav']['hooks']['settings'] = 'EGroupware\\Api\\CalDAV\\Hooks::settings'; \ No newline at end of file diff --git a/api/setup/tables_current.inc.php b/api/setup/tables_current.inc.php index dac20d1a09..92f61a727b 100644 --- a/api/setup/tables_current.inc.php +++ b/api/setup/tables_current.inc.php @@ -396,14 +396,14 @@ $phpgw_baseline = array( 'fd' => array( 'share_id' => array('type' => 'auto','nullable' => False,'comment' => 'auto-id'), 'share_token' => array('type' => 'ascii','precision' => '64','nullable' => False,'comment' => 'secure token'), - 'share_path' => array('type' => 'varchar','precision' => '255','nullable' => False,'comment' => 'path to share'), + 'share_path' => array('type' => 'varchar','precision' => '1024','nullable' => False,'comment' => 'path to share'), 'share_owner' => array('type' => 'int','meta' => 'user','precision' => '4','nullable' => False,'comment' => 'owner of share'), 'share_expires' => array('type' => 'date','comment' => 'expire date of share'), 'share_writable' => array('type' => 'int','precision' => '1','nullable' => False,'default' => '0','comment' => '0=readable, 1=writable'), 'share_with' => array('type' => 'varchar','precision' => '4096','comment' => 'email addresses, comma seperated'), 'share_passwd' => array('type' => 'varchar','precision' => '128','comment' => 'optional password-hash'), 'share_pw_reversable' => array('type' => 'varchar','precision' => '128','comment' => 'optional reversible password'), - 'share_encryption' => array('type' => 'int','nullable' => True,'comment' => 'Type of encryption, user or system (See Credentials)'), + 'share_encryption' => array('type' => 'int','precision' => '4','comment' => 'Type of encryption, user or system (See Credentials)'), 'share_modified' => array('type' => 'timestamp','precision' => '8','nullable' => False), 'share_modifier' => array('type' => 'int','meta' => 'user','precision' => '4'), 'share_created' => array('type' => 'timestamp','nullable' => False,'comment' => 'creation date'), diff --git a/api/setup/tables_update.inc.php b/api/setup/tables_update.inc.php index 1cb7dc1764..2b001f76ce 100644 --- a/api/setup/tables_update.inc.php +++ b/api/setup/tables_update.inc.php @@ -992,4 +992,16 @@ function api_upgrade23_1_007() )); return $GLOBALS['setup_info']['api']['currentver'] = '23.1.008'; +} + +function api_upgrade23_1_008() +{ + $GLOBALS['egw_setup']->oProc->AlterColumn('egw_sharing','share_path',array( + 'type' => 'varchar', + 'precision' => '1024', + 'nullable' => False, + 'comment' => 'path to share' + )); + + return $GLOBALS['setup_info']['api']['currentver'] = '23.1.009'; } \ No newline at end of file