From: Janusz Dobrowolski Date: Tue, 29 Sep 2009 19:36:21 +0000 (+0000) Subject: Changes in tags table structure, tags related security areas added. X-Git-Tag: v2.4.2~19^2~1191 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=2e8e792ac86ac0242c38236fa14bf7a005b921a7;p=fa-stable.git Changes in tags table structure, tags related security areas added. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 61c23aee..e83549d3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,6 +19,15 @@ Legend: ! -> Note $ -> Affected files +29-Sep-2009 Tom Hallman +! Changes in tags table structure, tags related security areas +$ /includes/access_levels.inc + /includes/types.inc + /sql/alter2.2.php + /sql/alter2.2.sql + /sql/en_US-demo.sql + /sql/en_US-new.sql + 29-Sep-2009 Janusz Dobrowolski # Fixed sql error during sales order line update with line cancelation. $ /sales/includes/db/sales_order_db.inc diff --git a/includes/access_levels.inc b/includes/access_levels.inc index 7eccf93d..17a2a7d5 100644 --- a/includes/access_levels.inc +++ b/includes/access_levels.inc @@ -198,6 +198,8 @@ $security_areas =array( // // Dimensions // + 'SA_DIMTAGS' => array(SS_DIM_C|1, _("Dimension tags")), + 'SA_DIMTRANSVIEW' => array(SS_DIM|1, _("Dimension view")), 'SA_DIMENSION' => array(SS_DIM|2, _("Dimension entry")), @@ -217,6 +219,7 @@ $security_areas =array( 'SA_TAXGROUPS' => array(SS_GL_C|8, _("Tax groups")), 'SA_FISCALYEARS' => array(SS_GL_C|9, _("Fiscal years maintenance")), 'SA_GLSETUP' => array(SS_GL_C|10, _("Company GL setup")), + 'SA_GLACCOUNTTAGS' => array(SS_GL_C|11, _("GL Account tags")), 'SA_BANKTRANSVIEW' => array(SS_GL|1, _("Bank transactions view")), 'SA_GLTRANSVIEW' => array(SS_GL|2, _("GL postings view")), diff --git a/includes/types.inc b/includes/types.inc index 754ddb72..7df363ab 100644 --- a/includes/types.inc +++ b/includes/types.inc @@ -281,4 +281,14 @@ $stock_types = array( 'D' => _("Service") ); +//---------------------------------------------------------------------------------- + +define('TAG_ACCOUNT', 1); +define('TAG_DIMENSION', 2); + +$tag_types_array = array ( + TAG_ACCOUNT => _("Account"), + TAG_DIMENSION => _("Dimension") +); + ?> \ No newline at end of file diff --git a/sql/alter2.2.php b/sql/alter2.2.php index 8d9e1449..f3586719 100644 --- a/sql/alter2.2.php +++ b/sql/alter2.2.php @@ -193,7 +193,7 @@ function convert_roles($pref) 15 => array('SA_PRINTERS', 'SA_PRINTPROFILE', 'SA_BACKUP', 'SA_USERS', 'SA_POSSETUP'), 20 => array('SA_CREATECOMPANY', 'SA_CREATELANGUAGE', 'SA_CREATEMODULES', - 'SA_SOFTWAREUPGRADE', 'SA_SECROLES') + 'SA_SOFTWAREUPGRADE', 'SA_SECROLES', 'SA_DIMTAGS', 'SA_GLACCOUNTTAGS') ); $new_ids = array(); foreach ($security_groups as $role_id => $areas) { diff --git a/sql/alter2.2.sql b/sql/alter2.2.sql index 5bc9c7dd..441c9ba6 100644 --- a/sql/alter2.2.sql +++ b/sql/alter2.2.sql @@ -114,7 +114,9 @@ DROP TABLE IF EXISTS `0_tags`; CREATE TABLE `0_tags` ( `id` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL, - `name` varchar(60) NOT NULL, + `name` varchar(30) NOT NULL, + `description` varchar(60) default NULL, + `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY(`type`,`name`) ) TYPE=MyISAM AUTO_INCREMENT=1; diff --git a/sql/en_US-demo.sql b/sql/en_US-demo.sql index 2a3820e9..c9b32399 100644 --- a/sql/en_US-demo.sql +++ b/sql/en_US-demo.sql @@ -2073,7 +2073,9 @@ DROP TABLE IF EXISTS `0_tags`; CREATE TABLE `0_tags` ( `id` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL, - `name` varchar(60) NOT NULL, + `name` varchar(30) NOT NULL, + `description` varchar(60) default NULL, + `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY(`type`,`name`) ) TYPE=MyISAM AUTO_INCREMENT=1; diff --git a/sql/en_US-new.sql b/sql/en_US-new.sql index 0b50e244..0e7fd5b2 100644 --- a/sql/en_US-new.sql +++ b/sql/en_US-new.sql @@ -1815,7 +1815,9 @@ DROP TABLE IF EXISTS `0_tags`; CREATE TABLE `0_tags` ( `id` int(11) NOT NULL auto_increment, `type` smallint(6) NOT NULL, - `name` varchar(60) NOT NULL, + `name` varchar(30) NOT NULL, + `description` varchar(60) default NULL, + `inactive` tinyint(1) NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY(`type`,`name`) ) TYPE=MyISAM AUTO_INCREMENT=1;