diff --git a/include/upgrader/sql/00ff231f-9f3b454c.patch.sql b/include/upgrader/sql/00ff231f-9f3b454c.patch.sql index d90d4813080623a26cea82ff0665e84306b68bec..7c3e3bd3c681e1e75f07cb87fe5496c5116da859 100644 --- a/include/upgrader/sql/00ff231f-9f3b454c.patch.sql +++ b/include/upgrader/sql/00ff231f-9f3b454c.patch.sql @@ -1,17 +1,38 @@ /** * @version v1.7 RC4 - * @signature c2a64ea46d1fb749f5d908820bb813a0 + * @signature 9f3b454c06dfd5ee96003eae5182ac13 * * - Supports starts- and ends-with in ticket filter rules * - Fix assigned template variable + * - Allow nested templates to have duplicate names + * - New permission settings for API key & groups */ ALTER TABLE `%TABLE_PREFIX%filter_rule` CHANGE `how` `how` ENUM( 'equal', 'not_equal', 'contains', 'dn_contain', 'starts', 'ends' ); --- %message +-- templates -> %message UPDATE `%TABLE_PREFIX%email_template` SET `assigned_alert_body` = REPLACE(`assigned_alert_body`, '%message', '%{comments}'); +-- API Access. +ALTER TABLE `%TABLE_PREFIX%api_key` + CHANGE `isactive` `isactive` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1', + ADD `can_create_tickets` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `apikey`, + DROP INDEX `ipaddr`, + ADD INDEX `ipaddr` ( `ipaddr` ); + +-- Help topics +ALTER TABLE `%TABLE_PREFIX%help_topic` + DROP INDEX `topic` , + ADD UNIQUE `topic` ( `topic` , `topic_pid` ); + + +-- group settings. +ALTER TABLE `%TABLE_PREFIX%groups` + ADD `can_post_ticket_reply` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `can_transfer_tickets` , + ADD `can_view_staff_stats` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `can_post_ticket_reply`; + +-- update schema signature. UPDATE `%TABLE_PREFIX%config` - SET `schema_signature`='c2a64ea46d1fb749f5d908820bb813a0'; + SET `schema_signature`='9f3b454c06dfd5ee96003eae5182ac13'; diff --git a/main.inc.php b/main.inc.php index 5b5fc593165e2c627cf4bcbf75ce58125501b0d2..baf06e4ec7773b2d104b517e4bde2aa3e46d2e5f 100644 --- a/main.inc.php +++ b/main.inc.php @@ -63,7 +63,7 @@ #Current version && schema signature (Changes from version to version) define('THIS_VERSION','1.7-RC3+'); //Shown on admin panel - define('SCHEMA_SIGNATURE','00ff231f2ade8797a0e7f2a7fccd52f4'); //MD5 signature of the db schema. (used to trigger upgrades) + define('SCHEMA_SIGNATURE','9f3b454c06dfd5ee96003eae5182ac13'); //MD5 signature of the db schema. (used to trigger upgrades) #load config info $configfile=''; if(file_exists(ROOT_DIR.'ostconfig.php')) //Old installs prior to v 1.6 RC5 diff --git a/setup/inc/sql/osTicket-mysql.sql b/setup/inc/sql/osTicket-mysql.sql index 688646f436c92f4049189a7e2ee15cf6cff3f601..004b9934092948798fc84adbe2e987af6006cd2b 100644 --- a/setup/inc/sql/osTicket-mysql.sql +++ b/setup/inc/sql/osTicket-mysql.sql @@ -5,11 +5,12 @@ CREATE TABLE `%TABLE_PREFIX%api_key` ( `isactive` tinyint(1) NOT NULL default '1', `ipaddr` varchar(64) NOT NULL, `apikey` varchar(255) NOT NULL, + `can_create_tickets` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1', `notes` text, `updated` datetime NOT NULL, `created` datetime NOT NULL, PRIMARY KEY (`id`), - UNIQUE KEY `ipaddr` (`ipaddr`), + KEY `ipaddr` (`ipaddr`), UNIQUE KEY `apikey` (`apikey`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -133,7 +134,7 @@ CREATE TABLE `%TABLE_PREFIX%config` ( `assigned_alert_team_members` tinyint(1) unsigned NOT NULL default '0', `auto_assign_reopened_tickets` tinyint(1) unsigned NOT NULL default '1', `show_related_tickets` tinyint(1) unsigned NOT NULL default '1', - `show_assigned_tickets` tinyint(1) unsigned NOT NULL default '0', + `show_assigned_tickets` tinyint(1) unsigned NOT NULL default '1', `show_answered_tickets` tinyint(1) unsigned NOT NULL default '0', `show_notes_inline` tinyint(1) unsigned NOT NULL default '1', `hide_staff_name` tinyint(1) unsigned NOT NULL default '0', @@ -355,6 +356,7 @@ CREATE TABLE `%TABLE_PREFIX%groups` ( `group_name` varchar(50) NOT NULL default '', `can_create_tickets` tinyint(1) unsigned NOT NULL default '1', `can_edit_tickets` tinyint(1) unsigned NOT NULL default '1', + `can_post_ticket_reply` tinyint( 1 ) unsigned NOT NULL DEFAULT '1', `can_delete_tickets` tinyint(1) unsigned NOT NULL default '0', `can_close_tickets` tinyint(1) unsigned NOT NULL default '1', `can_assign_tickets` tinyint(1) unsigned NOT NULL default '1', @@ -362,6 +364,7 @@ CREATE TABLE `%TABLE_PREFIX%groups` ( `can_ban_emails` tinyint(1) unsigned NOT NULL default '0', `can_manage_premade` tinyint(1) unsigned NOT NULL default '0', `can_manage_faq` tinyint(1) unsigned NOT NULL default '0', + `can_view_staff_stats` tinyint( 1 ) unsigned NOT NULL DEFAULT '0', `notes` text, `created` datetime NOT NULL, `updated` datetime NOT NULL, @@ -402,7 +405,7 @@ CREATE TABLE `%TABLE_PREFIX%help_topic` ( `created` datetime NOT NULL, `updated` datetime NOT NULL, PRIMARY KEY (`topic_id`), - UNIQUE KEY `topic` (`topic`), + UNIQUE KEY `topic` ( `topic` , `topic_pid` ), KEY `topic_pid` (`topic_pid`), KEY `priority_id` (`priority_id`), KEY `dept_id` (`dept_id`), diff --git a/setup/inc/sql/osTicket-mysql.sql.md5 b/setup/inc/sql/osTicket-mysql.sql.md5 index d46d0cc2e1e5b782e3db8dc0d30dfd9b421f7db9..49a6e93dd4e013257c9abf0f1117e12241ee381c 100644 --- a/setup/inc/sql/osTicket-mysql.sql.md5 +++ b/setup/inc/sql/osTicket-mysql.sql.md5 @@ -1 +1 @@ -c2a64ea46d1fb749f5d908820bb813a0 +9f3b454c06dfd5ee96003eae5182ac13