This commit is contained in:
Yagami
2019-01-29 09:41:27 +08:00
33 changed files with 1311 additions and 378 deletions
+1 -1
View File
@@ -1 +1 @@
11.1.stable
11.2.stable
+1 -1
View File
@@ -16,7 +16,7 @@ if(!class_exists('config')){class config{}}
if(!function_exists('getWebRoot')){function getWebRoot(){}}
/* 基本设置。Basic settings. */
$config->version = '11.1'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->version = '11.2'; // ZenTaoPHP的版本。 The version of ZenTaoPHP. Don't change it.
$config->charset = 'UTF-8'; // ZenTaoPHP的编码。 The encoding of ZenTaoPHP.
$config->cookieLife = time() + 2592000; // Cookie的生存时间。The cookie life time.
$config->timezone = 'Asia/Shanghai'; // 时区设置。 The time zone setting, for more see http://www.php.net/manual/en/timezones.php.
+955
View File
@@ -0,0 +1,955 @@
DROP TABLE IF EXISTS `zt_action`;
CREATE TABLE `zt_action` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(30) NOT NULL DEFAULT '',
`objectID` mediumint(8) unsigned NOT NULL DEFAULT '0',
`product` varchar(255) NOT NULL,
`project` mediumint(9) NOT NULL,
`actor` varchar(30) NOT NULL DEFAULT '',
`action` varchar(30) NOT NULL DEFAULT '',
`date` datetime NOT NULL,
`comment` text NOT NULL,
`extra` text NOT NULL,
`read` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `date` (`date`),
KEY `actor` (`actor`),
KEY `project` (`project`),
KEY `objectID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_block`;
CREATE TABLE `zt_block` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`module` varchar(20) NOT NULL,
`title` varchar(100) NOT NULL,
`source` varchar(20) NOT NULL,
`block` varchar(20) NOT NULL,
`params` text NOT NULL,
`order` tinyint(3) unsigned NOT NULL DEFAULT '0',
`grid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`height` smallint(5) unsigned NOT NULL DEFAULT '0',
`hidden` tinyint(1) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `accountModuleOrder` (`account`,`module`,`order`),
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_branch`;
CREATE TABLE `zt_branch` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`order` smallint(5) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_bug`;
CREATE TABLE `zt_bug` (
`id` mediumint(8) NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`plan` mediumint(8) unsigned NOT NULL DEFAULT '0',
`story` mediumint(8) unsigned NOT NULL DEFAULT '0',
`storyVersion` smallint(6) NOT NULL DEFAULT '1',
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`toTask` mediumint(8) unsigned NOT NULL DEFAULT '0',
`toStory` mediumint(8) NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`keywords` varchar(255) NOT NULL,
`severity` tinyint(4) NOT NULL DEFAULT '0',
`pri` tinyint(3) unsigned NOT NULL,
`type` varchar(30) NOT NULL DEFAULT '',
`os` varchar(30) NOT NULL DEFAULT '',
`browser` varchar(30) NOT NULL DEFAULT '',
`hardware` varchar(30) NOT NULL,
`found` varchar(30) NOT NULL DEFAULT '',
`steps` text NOT NULL,
`status` enum('active','resolved','closed') NOT NULL DEFAULT 'active',
`color` char(7) NOT NULL,
`confirmed` tinyint(1) NOT NULL DEFAULT '0',
`activatedCount` smallint(6) NOT NULL,
`activatedDate` datetime NOT NULL,
`mailto` text,
`openedBy` varchar(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`openedBuild` varchar(255) NOT NULL,
`assignedTo` varchar(30) NOT NULL DEFAULT '',
`assignedDate` datetime NOT NULL,
`deadline` date NOT NULL,
`resolvedBy` varchar(30) NOT NULL DEFAULT '',
`resolution` varchar(30) NOT NULL DEFAULT '',
`resolvedBuild` varchar(30) NOT NULL DEFAULT '',
`resolvedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
`duplicateBug` mediumint(8) unsigned NOT NULL,
`linkBug` varchar(255) NOT NULL,
`case` mediumint(8) unsigned NOT NULL,
`caseVersion` smallint(6) NOT NULL DEFAULT '1',
`result` mediumint(8) unsigned NOT NULL,
`testtask` mediumint(8) unsigned NOT NULL,
`lastEditedBy` varchar(30) NOT NULL DEFAULT '',
`lastEditedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`),
KEY `status` (`status`),
KEY `plan` (`plan`),
KEY `story` (`story`),
KEY `case` (`case`),
KEY `assignedTo` (`assignedTo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_build`;
CREATE TABLE `zt_build` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` char(150) NOT NULL,
`scmPath` char(255) NOT NULL,
`filePath` char(255) NOT NULL,
`date` date NOT NULL,
`stories` text NOT NULL,
`bugs` text NOT NULL,
`builder` char(30) NOT NULL DEFAULT '',
`desc` text NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_burn`;
CREATE TABLE `zt_burn` (
`project` mediumint(8) unsigned NOT NULL,
`date` date NOT NULL,
`estimate` float NOT NULL,
`left` float NOT NULL,
`consumed` float NOT NULL,
PRIMARY KEY (`project`,`date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_case`;
CREATE TABLE `zt_case` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`lib` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`path` mediumint(8) unsigned NOT NULL DEFAULT '0',
`story` mediumint(30) unsigned NOT NULL DEFAULT '0',
`storyVersion` smallint(6) NOT NULL DEFAULT '1',
`title` varchar(255) NOT NULL,
`precondition` text NOT NULL,
`keywords` varchar(255) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
`type` char(30) NOT NULL DEFAULT '1',
`stage` varchar(255) NOT NULL,
`howRun` varchar(30) NOT NULL,
`scriptedBy` varchar(30) NOT NULL,
`scriptedDate` date NOT NULL,
`scriptStatus` varchar(30) NOT NULL,
`scriptLocation` varchar(255) NOT NULL,
`status` char(30) NOT NULL DEFAULT '1',
`color` char(7) NOT NULL,
`frequency` enum('1','2','3') NOT NULL DEFAULT '1',
`order` tinyint(30) unsigned NOT NULL DEFAULT '0',
`openedBy` char(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`reviewedBy` varchar(255) NOT NULL,
`reviewedDate` date NOT NULL,
`lastEditedBy` char(30) NOT NULL DEFAULT '',
`lastEditedDate` datetime NOT NULL,
`version` tinyint(3) unsigned NOT NULL DEFAULT '0',
`linkCase` varchar(255) NOT NULL,
`fromBug` mediumint(8) unsigned NOT NULL,
`fromCaseID` mediumint(8) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
`lastRunner` varchar(30) NOT NULL,
`lastRunDate` datetime NOT NULL,
`lastRunResult` char(30) NOT NULL,
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `story` (`story`),
KEY `module` (`module`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_casestep`;
CREATE TABLE `zt_casestep` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`case` mediumint(8) unsigned NOT NULL DEFAULT '0',
`version` smallint(3) unsigned NOT NULL DEFAULT '0',
`type` varchar(10) NOT NULL DEFAULT 'step',
`desc` text NOT NULL,
`expect` text NOT NULL,
PRIMARY KEY (`id`),
KEY `case` (`case`),
KEY `version` (`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_company`;
CREATE TABLE `zt_company` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(120) DEFAULT NULL,
`phone` char(20) DEFAULT NULL,
`fax` char(20) DEFAULT NULL,
`address` char(120) DEFAULT NULL,
`zipcode` char(10) DEFAULT NULL,
`website` char(120) DEFAULT NULL,
`backyard` char(120) DEFAULT NULL,
`guest` enum('1','0') NOT NULL DEFAULT '0',
`admins` char(255) DEFAULT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_config`;
CREATE TABLE `zt_config` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`owner` char(30) NOT NULL DEFAULT '',
`module` varchar(30) NOT NULL,
`section` char(30) NOT NULL DEFAULT '',
`key` char(30) NOT NULL DEFAULT '',
`value` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `unique` (`owner`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_cron`;
CREATE TABLE `zt_cron` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`m` varchar(20) NOT NULL,
`h` varchar(20) NOT NULL,
`dom` varchar(20) NOT NULL,
`mon` varchar(20) NOT NULL,
`dow` varchar(20) NOT NULL,
`command` text NOT NULL,
`remark` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`buildin` tinyint(1) NOT NULL DEFAULT '0',
`status` varchar(20) NOT NULL,
`lastTime` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `lastTime` (`lastTime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_dept`;
CREATE TABLE `zt_dept` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(60) NOT NULL,
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`path` char(255) NOT NULL DEFAULT '',
`grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
`order` tinyint(3) unsigned NOT NULL DEFAULT '0',
`position` char(30) NOT NULL DEFAULT '',
`function` char(255) NOT NULL DEFAULT '',
`manager` char(30) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
KEY `path` (`path`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_doc`;
CREATE TABLE `zt_doc` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`lib` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL,
`title` varchar(255) NOT NULL,
`keywords` varchar(255) NOT NULL,
`type` varchar(30) NOT NULL,
`views` smallint(5) unsigned NOT NULL,
`collector` text NOT NULL,
`addedBy` varchar(30) NOT NULL,
`addedDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`acl` varchar(10) NOT NULL DEFAULT 'open',
`groups` varchar(255) NOT NULL,
`users` text NOT NULL,
`version` smallint(5) unsigned NOT NULL DEFAULT '1',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`),
KEY `lib` (`lib`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_doccontent`;
CREATE TABLE `zt_doccontent` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`doc` mediumint(8) unsigned NOT NULL,
`title` varchar(255) NOT NULL,
`digest` varchar(255) NOT NULL,
`content` text NOT NULL,
`files` text NOT NULL,
`type` varchar(10) NOT NULL,
`version` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `doc_version` (`doc`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_doclib`;
CREATE TABLE `zt_doclib` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(30) NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`name` varchar(60) NOT NULL,
`acl` varchar(10) NOT NULL DEFAULT 'open',
`groups` varchar(255) NOT NULL,
`users` text NOT NULL,
`main` enum('0','1') NOT NULL DEFAULT '0',
`collector` text NOT NULL,
`order` tinyint(5) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `project` (`project`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_effort`;
CREATE TABLE `zt_effort` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`user` char(30) NOT NULL DEFAULT '',
`todo` enum('1','0') NOT NULL DEFAULT '1',
`date` date NOT NULL,
`begin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`end` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`type` enum('1','2','3') NOT NULL DEFAULT '1',
`idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` char(30) NOT NULL DEFAULT '',
`desc` char(255) NOT NULL DEFAULT '',
`status` enum('1','2','3') NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `user` (`user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_entry`;
CREATE TABLE `zt_entry` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`account` varchar(30) NOT NULL DEFAULT '',
`code` varchar(20) NOT NULL,
`key` varchar(32) NOT NULL,
`ip` varchar(100) NOT NULL,
`desc` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_extension`;
CREATE TABLE `zt_extension` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(150) NOT NULL,
`code` varchar(30) NOT NULL,
`version` varchar(50) NOT NULL,
`author` varchar(100) NOT NULL,
`desc` text NOT NULL,
`license` text NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'extension',
`site` varchar(150) NOT NULL,
`zentaoCompatible` varchar(100) NOT NULL,
`installedTime` datetime NOT NULL,
`depends` varchar(100) NOT NULL,
`dirs` mediumtext NOT NULL,
`files` mediumtext NOT NULL,
`status` varchar(20) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`),
KEY `name` (`name`),
KEY `installedTime` (`installedTime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_file`;
CREATE TABLE `zt_file` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`pathname` char(50) NOT NULL,
`title` char(255) NOT NULL,
`extension` char(30) NOT NULL,
`size` int(10) unsigned NOT NULL DEFAULT '0',
`objectType` char(30) NOT NULL,
`objectID` mediumint(9) NOT NULL,
`addedBy` char(30) NOT NULL DEFAULT '',
`addedDate` datetime NOT NULL,
`downloads` mediumint(8) unsigned NOT NULL DEFAULT '0',
`extra` varchar(255) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `objectType` (`objectType`),
KEY `objectID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_group`;
CREATE TABLE `zt_group` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(30) NOT NULL,
`role` char(30) NOT NULL DEFAULT '',
`desc` char(255) NOT NULL DEFAULT '',
`acl` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_grouppriv`;
CREATE TABLE `zt_grouppriv` (
`group` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` char(30) NOT NULL DEFAULT '',
`method` char(30) NOT NULL DEFAULT '',
UNIQUE KEY `group` (`group`,`module`,`method`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_history`;
CREATE TABLE `zt_history` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`action` mediumint(8) unsigned NOT NULL DEFAULT '0',
`field` varchar(30) NOT NULL DEFAULT '',
`old` text NOT NULL,
`new` text NOT NULL,
`diff` mediumtext NOT NULL,
PRIMARY KEY (`id`),
KEY `action` (`action`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_lang`;
CREATE TABLE `zt_lang` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`lang` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL,
`section` varchar(30) NOT NULL,
`key` varchar(60) NOT NULL,
`value` text NOT NULL,
`system` enum('0','1') NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `lang` (`lang`,`module`,`section`,`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_log`;
CREATE TABLE `zt_log` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(30) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`action` mediumint(8) unsigned NOT NULL,
`date` datetime NOT NULL,
`url` varchar(255) NOT NULL,
`contentType` varchar(30) NOT NULL,
`data` text NOT NULL,
`result` text NOT NULL,
PRIMARY KEY (`id`),
KEY `objectType` (`objectType`),
KEY `obejctID` (`objectID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_module`;
CREATE TABLE `zt_module` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`root` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` char(60) NOT NULL DEFAULT '',
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`path` char(255) NOT NULL DEFAULT '',
`grade` tinyint(3) unsigned NOT NULL DEFAULT '0',
`order` smallint(5) unsigned NOT NULL DEFAULT '0',
`type` char(30) NOT NULL,
`owner` varchar(30) NOT NULL,
`collector` text NOT NULL,
`short` varchar(30) NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `root` (`root`),
KEY `type` (`type`),
KEY `path` (`path`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_notify`;
CREATE TABLE `zt_notify` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`objectType` varchar(50) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`action` mediumint(9) NOT NULL,
`toList` varchar(255) NOT NULL,
`ccList` text NOT NULL,
`subject` varchar(255) NOT NULL,
`data` text NOT NULL,
`createdBy` char(30) NOT NULL,
`createdDate` datetime NOT NULL,
`sendTime` datetime NOT NULL,
`status` varchar(10) NOT NULL DEFAULT 'wait',
`failReason` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_product`;
CREATE TABLE `zt_product` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(90) NOT NULL,
`code` varchar(45) NOT NULL,
`line` mediumint(8) NOT NULL,
`type` varchar(30) NOT NULL DEFAULT 'normal',
`status` varchar(30) NOT NULL DEFAULT '',
`desc` text NOT NULL,
`PO` varchar(30) NOT NULL,
`QD` varchar(30) NOT NULL,
`RD` varchar(30) NOT NULL,
`acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
`whitelist` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`createdVersion` varchar(20) NOT NULL,
`order` mediumint(8) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `order` (`order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_productplan`;
CREATE TABLE `zt_productplan` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`title` varchar(90) NOT NULL,
`desc` text NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`order` text NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `end` (`end`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_project`;
CREATE TABLE `zt_project` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`isCat` enum('1','0') NOT NULL DEFAULT '0',
`catID` mediumint(8) unsigned NOT NULL,
`type` varchar(20) NOT NULL DEFAULT 'sprint',
`parent` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` varchar(90) NOT NULL,
`code` varchar(45) NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`days` smallint(5) unsigned NOT NULL,
`status` varchar(10) NOT NULL,
`statge` enum('1','2','3','4','5') NOT NULL DEFAULT '1',
`pri` enum('1','2','3','4') NOT NULL DEFAULT '1',
`desc` text NOT NULL,
`openedBy` varchar(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`openedVersion` varchar(20) NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
`canceledBy` varchar(30) NOT NULL DEFAULT '',
`canceledDate` datetime NOT NULL,
`PO` varchar(30) NOT NULL DEFAULT '',
`PM` varchar(30) NOT NULL DEFAULT '',
`QD` varchar(30) NOT NULL DEFAULT '',
`RD` varchar(30) NOT NULL DEFAULT '',
`team` varchar(90) NOT NULL,
`acl` enum('open','private','custom') NOT NULL DEFAULT 'open',
`whitelist` text NOT NULL,
`order` mediumint(8) unsigned NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `parent` (`parent`),
KEY `begin` (`begin`),
KEY `end` (`end`),
KEY `status` (`status`),
KEY `order` (`order`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_projectproduct`;
CREATE TABLE `zt_projectproduct` (
`project` mediumint(8) unsigned NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`plan` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`project`,`product`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_projectstory`;
CREATE TABLE `zt_projectstory` (
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`product` mediumint(8) unsigned NOT NULL,
`story` mediumint(8) unsigned NOT NULL DEFAULT '0',
`version` smallint(6) NOT NULL DEFAULT '1',
`order` smallint(6) unsigned NOT NULL,
UNIQUE KEY `project` (`project`,`story`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_release`;
CREATE TABLE `zt_release` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`build` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL DEFAULT '',
`marker` enum('0','1') NOT NULL DEFAULT '0',
`date` date NOT NULL,
`stories` text NOT NULL,
`bugs` text NOT NULL,
`leftBugs` text NOT NULL,
`desc` text NOT NULL,
`status` varchar(20) NOT NULL DEFAULT 'normal',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `build` (`build`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_score`;
CREATE TABLE `zt_score` (
`id` bigint(12) unsigned NOT NULL AUTO_INCREMENT,
`account` varchar(30) NOT NULL,
`module` varchar(30) NOT NULL DEFAULT '',
`method` varchar(30) NOT NULL,
`desc` varchar(250) NOT NULL DEFAULT '',
`before` int(11) NOT NULL DEFAULT '0',
`score` int(11) NOT NULL DEFAULT '0',
`after` int(11) NOT NULL DEFAULT '0',
`time` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `model` (`module`),
KEY `method` (`method`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_story`;
CREATE TABLE `zt_story` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL DEFAULT '0',
`branch` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`plan` text,
`source` varchar(20) NOT NULL,
`sourceNote` varchar(255) NOT NULL,
`fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
`title` varchar(255) NOT NULL,
`keywords` varchar(255) NOT NULL,
`type` varchar(30) NOT NULL DEFAULT '',
`pri` tinyint(3) unsigned NOT NULL DEFAULT '3',
`estimate` float unsigned NOT NULL,
`status` enum('','changed','active','draft','closed') NOT NULL DEFAULT '',
`color` char(7) NOT NULL,
`stage` enum('','wait','planned','projected','developing','developed','testing','tested','verified','released','closed') NOT NULL DEFAULT 'wait',
`mailto` text,
`openedBy` varchar(30) NOT NULL DEFAULT '',
`openedDate` datetime NOT NULL,
`assignedTo` varchar(30) NOT NULL DEFAULT '',
`assignedDate` datetime NOT NULL,
`lastEditedBy` varchar(30) NOT NULL DEFAULT '',
`lastEditedDate` datetime NOT NULL,
`reviewedBy` varchar(255) NOT NULL,
`reviewedDate` date NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
`closedReason` varchar(30) NOT NULL,
`toBug` mediumint(9) NOT NULL,
`childStories` varchar(255) NOT NULL,
`linkStories` varchar(255) NOT NULL,
`duplicateStory` mediumint(8) unsigned NOT NULL,
`version` smallint(6) NOT NULL DEFAULT '1',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `status` (`status`),
KEY `assignedTo` (`assignedTo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_storyspec`;
CREATE TABLE `zt_storyspec` (
`story` mediumint(9) NOT NULL,
`version` smallint(6) NOT NULL,
`title` varchar(255) NOT NULL,
`spec` text NOT NULL,
`verify` text NOT NULL,
UNIQUE KEY `story` (`story`,`version`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_storystage`;
CREATE TABLE `zt_storystage` (
`story` mediumint(8) unsigned NOT NULL,
`branch` mediumint(8) unsigned NOT NULL,
`stage` varchar(50) NOT NULL,
KEY `story` (`story`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_suitecase`;
CREATE TABLE `zt_suitecase` (
`suite` mediumint(8) unsigned NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`case` mediumint(8) unsigned NOT NULL,
`version` smallint(5) unsigned NOT NULL,
UNIQUE KEY `suitecase` (`suite`,`case`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_task`;
CREATE TABLE `zt_task` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`parent` mediumint(8) NOT NULL DEFAULT '0',
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`module` mediumint(8) unsigned NOT NULL DEFAULT '0',
`story` mediumint(8) unsigned NOT NULL DEFAULT '0',
`storyVersion` smallint(6) NOT NULL DEFAULT '1',
`fromBug` mediumint(8) unsigned NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL,
`type` varchar(20) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
`estimate` float unsigned NOT NULL,
`consumed` float unsigned NOT NULL,
`left` float unsigned NOT NULL,
`deadline` date NOT NULL,
`status` enum('wait','doing','done','pause','cancel','closed') NOT NULL DEFAULT 'wait',
`color` char(7) NOT NULL,
`mailto` text,
`desc` text NOT NULL,
`openedBy` varchar(30) NOT NULL,
`openedDate` datetime NOT NULL,
`assignedTo` varchar(30) NOT NULL,
`assignedDate` datetime NOT NULL,
`estStarted` date NOT NULL,
`realStarted` date NOT NULL,
`finishedBy` varchar(30) NOT NULL,
`finishedDate` datetime NOT NULL,
`finishedList` text NOT NULL,
`canceledBy` varchar(30) NOT NULL,
`canceledDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL,
`closedDate` datetime NOT NULL,
`closedReason` varchar(30) NOT NULL,
`lastEditedBy` varchar(30) NOT NULL,
`lastEditedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `project` (`project`),
KEY `story` (`story`),
KEY `assignedTo` (`assignedTo`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_taskestimate`;
CREATE TABLE `zt_taskestimate` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`date` date NOT NULL,
`left` float unsigned NOT NULL DEFAULT '0',
`consumed` float unsigned NOT NULL,
`account` char(30) NOT NULL DEFAULT '',
`work` text,
PRIMARY KEY (`id`),
KEY `task` (`task`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_team`;
CREATE TABLE `zt_team` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`root` mediumint(8) unsigned NOT NULL DEFAULT '0',
`type` enum('project','task') NOT NULL DEFAULT 'project',
`account` char(30) NOT NULL DEFAULT '',
`role` char(30) NOT NULL DEFAULT '',
`limited` char(8) NOT NULL DEFAULT 'no',
`join` date NOT NULL DEFAULT '0000-00-00',
`days` smallint(5) unsigned NOT NULL,
`hours` float(2,1) unsigned NOT NULL DEFAULT '0.0',
`estimate` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`consumed` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`left` decimal(12,2) unsigned NOT NULL DEFAULT '0.00',
`order` tinyint(3) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `team` (`root`,`type`,`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_testreport`;
CREATE TABLE `zt_testreport` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL,
`tasks` varchar(255) NOT NULL,
`builds` varchar(255) NOT NULL,
`title` varchar(255) NOT NULL,
`begin` date NOT NULL,
`end` date NOT NULL,
`owner` char(30) NOT NULL,
`members` text NOT NULL,
`stories` text NOT NULL,
`bugs` text NOT NULL,
`cases` text NOT NULL,
`report` text NOT NULL,
`objectType` varchar(20) NOT NULL,
`objectID` mediumint(8) unsigned NOT NULL,
`createdBy` char(30) NOT NULL,
`createdDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_testresult`;
CREATE TABLE `zt_testresult` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`run` mediumint(8) unsigned NOT NULL,
`case` mediumint(8) unsigned NOT NULL,
`version` smallint(5) unsigned NOT NULL,
`caseResult` char(30) NOT NULL,
`stepResults` text NOT NULL,
`lastRunner` varchar(30) NOT NULL,
`date` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `case` (`case`),
KEY `version` (`version`),
KEY `run` (`run`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_testrun`;
CREATE TABLE `zt_testrun` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`task` mediumint(8) unsigned NOT NULL DEFAULT '0',
`case` mediumint(8) unsigned NOT NULL DEFAULT '0',
`version` tinyint(3) unsigned NOT NULL DEFAULT '0',
`assignedTo` char(30) NOT NULL DEFAULT '',
`lastRunner` varchar(30) NOT NULL,
`lastRunDate` datetime NOT NULL,
`lastRunResult` char(30) NOT NULL,
`status` char(30) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `task` (`task`,`case`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_testsuite`;
CREATE TABLE `zt_testsuite` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`product` mediumint(8) unsigned NOT NULL,
`name` varchar(255) NOT NULL,
`desc` text NOT NULL,
`type` varchar(20) NOT NULL,
`addedBy` char(30) NOT NULL,
`addedDate` datetime NOT NULL,
`lastEditedBy` char(30) NOT NULL,
`lastEditedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL,
PRIMARY KEY (`id`),
KEY `product` (`product`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_testtask`;
CREATE TABLE `zt_testtask` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(90) NOT NULL,
`product` mediumint(8) unsigned NOT NULL,
`project` mediumint(8) unsigned NOT NULL DEFAULT '0',
`build` char(30) NOT NULL,
`owner` varchar(30) NOT NULL,
`pri` tinyint(3) unsigned NOT NULL DEFAULT '0',
`begin` date NOT NULL,
`end` date NOT NULL,
`mailto` text,
`desc` text NOT NULL,
`report` text NOT NULL,
`status` enum('blocked','doing','wait','done') NOT NULL DEFAULT 'wait',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `product` (`product`),
KEY `build` (`build`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_todo`;
CREATE TABLE `zt_todo` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`date` date NOT NULL,
`begin` smallint(4) unsigned zerofill NOT NULL,
`end` smallint(4) unsigned zerofill NOT NULL,
`type` char(10) NOT NULL,
`cycle` tinyint(3) unsigned NOT NULL DEFAULT '0',
`idvalue` mediumint(8) unsigned NOT NULL DEFAULT '0',
`pri` tinyint(3) unsigned NOT NULL,
`name` char(150) NOT NULL,
`desc` text NOT NULL,
`status` enum('wait','doing','done','closed') NOT NULL DEFAULT 'wait',
`private` tinyint(1) NOT NULL,
`config` varchar(255) NOT NULL,
`assignedTo` varchar(30) NOT NULL DEFAULT '',
`assignedBy` varchar(30) NOT NULL DEFAULT '',
`assignedDate` datetime NOT NULL,
`finishedBy` varchar(30) NOT NULL DEFAULT '',
`finishedDate` datetime NOT NULL,
`closedBy` varchar(30) NOT NULL DEFAULT '',
`closedDate` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `assignedTo` (`assignedTo`),
KEY `finishedBy` (`finishedBy`),
KEY `date` (`date`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_user`;
CREATE TABLE `zt_user` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`dept` mediumint(8) unsigned NOT NULL DEFAULT '0',
`account` char(30) NOT NULL DEFAULT '',
`password` char(32) NOT NULL DEFAULT '',
`role` char(10) NOT NULL DEFAULT '',
`realname` varchar(100) NOT NULL DEFAULT '',
`nickname` char(60) NOT NULL DEFAULT '',
`commiter` varchar(100) NOT NULL,
`avatar` char(30) NOT NULL DEFAULT '',
`birthday` date NOT NULL DEFAULT '0000-00-00',
`gender` enum('f','m') NOT NULL DEFAULT 'f',
`email` char(90) NOT NULL DEFAULT '',
`skype` char(90) NOT NULL DEFAULT '',
`qq` char(20) NOT NULL DEFAULT '',
`yahoo` char(90) NOT NULL DEFAULT '',
`gtalk` char(90) NOT NULL DEFAULT '',
`wangwang` char(90) NOT NULL DEFAULT '',
`mobile` char(11) NOT NULL DEFAULT '',
`phone` char(20) NOT NULL DEFAULT '',
`address` char(120) NOT NULL DEFAULT '',
`zipcode` char(10) NOT NULL DEFAULT '',
`join` date NOT NULL DEFAULT '0000-00-00',
`visits` mediumint(8) unsigned NOT NULL DEFAULT '0',
`ip` char(15) NOT NULL DEFAULT '',
`last` int(10) unsigned NOT NULL DEFAULT '0',
`fails` tinyint(5) NOT NULL DEFAULT '0',
`locked` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`ranzhi` char(30) NOT NULL DEFAULT '',
`score` int(11) NOT NULL DEFAULT '0',
`scoreLevel` int(11) NOT NULL DEFAULT '0',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `account` (`account`),
KEY `dept` (`dept`),
KEY `email` (`email`),
KEY `commiter` (`commiter`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_usercontact`;
CREATE TABLE `zt_usercontact` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`listName` varchar(60) NOT NULL,
`userList` text NOT NULL,
PRIMARY KEY (`id`),
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_usergroup`;
CREATE TABLE `zt_usergroup` (
`account` char(30) NOT NULL DEFAULT '',
`group` mediumint(8) unsigned NOT NULL DEFAULT '0',
UNIQUE KEY `account` (`account`,`group`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_userquery`;
CREATE TABLE `zt_userquery` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`module` varchar(30) NOT NULL,
`title` varchar(90) NOT NULL,
`form` text NOT NULL,
`sql` text NOT NULL,
`shortcut` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `account` (`account`),
KEY `module` (`module`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_usertpl`;
CREATE TABLE `zt_usertpl` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`account` char(30) NOT NULL,
`type` char(30) NOT NULL,
`title` varchar(150) NOT NULL,
`content` text NOT NULL,
`public` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_userview`;
CREATE TABLE `zt_userview` (
`account` char(30) NOT NULL,
`products` mediumtext NOT NULL,
`projects` mediumtext NOT NULL,
UNIQUE KEY `account` (`account`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `zt_webhook`;
CREATE TABLE `zt_webhook` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`type` varchar(10) NOT NULL DEFAULT 'default',
`name` varchar(50) NOT NULL,
`url` varchar(255) NOT NULL,
`domain` varchar(255) NOT NULL,
`contentType` varchar(30) NOT NULL DEFAULT 'application/json',
`sendType` enum('sync','async') NOT NULL DEFAULT 'sync',
`products` text NOT NULL,
`projects` text NOT NULL,
`params` varchar(100) NOT NULL,
`actions` text NOT NULL,
`desc` text NOT NULL,
`createdBy` varchar(30) NOT NULL,
`createdDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL,
`editedDate` datetime NOT NULL,
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+1 -1
View File
@@ -533,7 +533,7 @@ CREATE TABLE IF NOT EXISTS `zt_release` (
`product` mediumint(8) unsigned NOT NULL default '0',
`branch` mediumint(8) unsigned NOT NULL default '0',
`build` mediumint(8) unsigned NOT NULL,
`name` char(30) NOT NULL default '',
`name` varchar(255) NOT NULL default '',
`marker` enum('0','1') NOT NULL default '0',
`date` date NOT NULL,
`stories` text NOT NULL,
+3
View File
@@ -335,6 +335,9 @@ $lang->doc = new stdclass();
$lang->doc->menu = new stdclass();
//$lang->doc->menu->createLib = array('link' => '<i class="icon icon-folder-plus"></i>&nbsp;Add Library|doc|createLib', 'float' => 'right');
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* Report menu settings. */
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
+5 -2
View File
@@ -262,7 +262,7 @@ $lang->task = new stdclass();
$lang->build = new stdclass();
$lang->task->menu = $lang->project->menu;
$lang->build->menu = $lang->project->menu;
$lang->build->menu->qa = array('link' => '測試|project|build|projectID=%s', 'subModule' => 'bug,build,testtask', 'alias' => 'build,testtask', 'class' => 'dropdown dropdown-hover');
$lang->build->menu->qa = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'bug,build,testtask', 'alias' => 'build,testtask', 'class' => 'dropdown dropdown-hover');
/* QA視圖菜單設置。*/
$lang->qa = new stdclass();
@@ -335,6 +335,9 @@ $lang->doc = new stdclass();
$lang->doc->menu = new stdclass();
//$lang->doc->menu->createLib = array('link' => '<i class="icon icon-folder-plus"></i>&nbsp;添加檔案夾|doc|createLib', 'float' => 'right');
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* 統計視圖菜單設置。*/
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -479,7 +482,7 @@ $lang->error->email = "『%s』應當為合法的EMAIL。";
$lang->error->date = "『%s』應當為合法的日期。";
$lang->error->datetime = "『%s』應當為合法的日期。";
$lang->error->code = "『%s』應當為字母或數字的組合。";
$lang->error->account = "『%s』應當為合法的用戶名";
$lang->error->account = "『%s』只能是字母和數字的組合三位以上";
$lang->error->passwordsame = "兩次密碼應當相等。";
$lang->error->passwordrule = "密碼應該符合規則,長度至少為六位。";
$lang->error->accessDenied = '您沒有訪問權限';
+1 -1
View File
@@ -167,7 +167,7 @@ class commonModel extends model
if($this->loadModel('user')->isLogon() or ($this->app->company->guest and $this->app->user->account == 'guest'))
{
if(stripos($method, 'ajax') !== false) return true;
if(stripos($method, 'downloadClient') !== false) return true;
if($module == 'misc' and $method == 'downloadClient') return true;
if($module == 'block' and $method == 'main') return true;
if($module == 'misc' and $method == 'changelog') return true;
if($module == 'tutorial') return true;
+6
View File
@@ -9,6 +9,12 @@ $lang->dev->params = '參數列表';
$lang->dev->type = '類型';
$lang->dev->desc = '描述';
$lang->dev->noParams = '無參數';
$lang->dev->post = 'POST參數';
$lang->dev->paramRange = '取值範圍:%s';
$lang->dev->paramDate = '日期格式:YY-mm-dd,如:2019-01-01';
$lang->dev->paramColor = '顏色格式:#RGB,如:#3da7f5';
$lang->dev->paramMailto = "填寫帳號,多個賬號用','分隔。";
$lang->dev->fields = array();
$lang->dev->fields['id'] = '序號';
-1
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
/* Methods. */
$lang->git = new stdclass();
$lang->git->common = 'Git';
$lang->git->cat = 'View Code';
$lang->git->diff = 'Diff Code';
-1
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
/* 方法列表。*/
$lang->git = new stdclass();
$lang->git->common = 'Git';
$lang->git->cat = '查看原始碼';
$lang->git->diff = '比較原始碼';
-249
View File
@@ -84,255 +84,6 @@ class misc extends control
echo $this->misc->hello2();
}
/**
* Download zentao client.
*
* @access public
* @param string $action
* @param string $os
* @return void
*/
public function downloadClient($action = 'check', $os = '')
{
if($_POST)
{
$os = $this->post->os;
die(js::locate($this->createLink('misc', 'downloadClient', "action=getPackage&os=$os"), 'parent'));
}
if($action == 'check')
{
$error = false;
$errorInfo = '';
$cacheDir = $this->app->getBasePath() . 'tmp/cache/';
if(!is_dir($cacheDir))
{
$result = mkdir($cacheDir, 0755, true);
if($result == false)
{
$error = true;
$errorInfo = sprintf($this->lang->misc->client->errorInfo->dirNotExist, $cacheDir, $cacheDir);
}
}
if(!is_writable($cacheDir))
{
$error = true;
$errorInfo = sprintf($this->lang->misc->client->errorInfo->dirNotWritable, $cacheDir, $cacheDir);
}
$this->view->error = $error;
$this->view->errorInfo = $errorInfo;
if(!$error) die(js::locate($this->createLink('misc', 'downloadClient', "action=selectPackage")));
}
if($action == 'selectPackage')
{
$os = 'win64';
$agentOS = helper::getOS();
if(strpos($agentOS, 'Windows') !== false) $os = 'win64';
if(strpos($agentOS, 'Linux') !== false) $os = 'linux64';
if(strpos($agentOS, 'Mac') !== false) $os = 'mac';
$this->view->os = $os;
}
if($action == 'getPackage')
{
$this->view->os = $os;
$this->view->account = $this->app->user->account;
}
if($action == 'clearTmpPackage')
{
$account = $this->app->user->account;
$tmpDir = $this->app->getBasePath() . 'tmp/cache/client/' . "$account/";
if(is_dir($tmpDir))
{
$zfile = $this->app->loadClass('zfile');
$zfile->removeDir($tmpDir);
}
die(js::closeModal('parent.parent', 'this'));
}
if($action == 'downloadPackage')
{
$account = $this->app->user->account;
$clientDir = $this->app->getBasePath() . 'tmp/cache/client/' . "$account/";
$clientFile = $clientDir . 'zentaoclient.zip';
$zipContent = file_get_contents($clientFile);
if(is_dir($clientDir))
{
$zfile = $this->app->loadClass('zfile');
$zfile->removeDir($clientDir);
}
$this->fetch('file', 'sendDownHeader', array('fileName' => "zentao_chat_client." . $os . '.zip', 'zip', $zipContent));
}
$this->view->action = $action;
$this->display();
}
/**
* Ajax get client package.
*
* @param string $os
* @access public
* @return void
*/
public function ajaxGetClientPackage($os = '')
{
set_time_limit (0);
session_write_close();
$response = array();
$response['result'] = 'success';
$response['message'] = '';
$clientDir = $this->app->getBasePath() . 'tmp/cache/client/';
if(!is_dir($clientDir)) mkdir($clientDir, 0755, true);
$version = $this->config->xuanxuan->version;
$packageDir = $clientDir . "/$version/";
if(!is_dir($packageDir)) mkdir($packageDir, 0755, true);
$account = $this->app->user->account;
$tmpDir = $clientDir . "/$account/";
if(!is_dir($tmpDir)) mkdir($tmpDir, 0755, true);
$needCache = false;
$clientName = "zentaoclient." . $os . ".zip";
$packageFile = $packageDir . $clientName;
if(!file_exists($packageFile))
{
$url = "http://dl.cnezsoft.com/zentaoclient/$version/";
$xxFile = $url . $clientName . "?t=" . rand();
$needCache = true;
}
else
{
$xxFile = $packageFile;
}
$clientFile = $tmpDir . 'zentaoclient.zip';
if($xxHd = fopen($xxFile, "rb"))
{
if($clientHd = fopen($clientFile, "wb"))
{
while(!feof($xxHd))
{
$result = fwrite($clientHd, fread($xxHd, 1024 * 8 ), 1024 * 8 );
if($result == false)
{
$response['result'] = 'fail';
$response['message'] = sprintf($this->lang->misc->client->errorInfo->manualOpt, $xxFile);
$this->send($response);
}
}
}
else
{
$response['result'] = 'fail';
$response['message'] = sprintf($this->lang->misc->client->errorInfo->manualOpt, $xxFile);
$this->send($response);
}
fclose($xxHd);
fclose($clientHd);
}
else
{
$response['result'] = 'fail';
$response['message'] = sprintf($this->lang->misc->client->errorInfo->manualOpt, $xxFile);
$this->send($response);
}
if($needCache) file_put_contents($packageFile, file_get_contents($clientFile));
$this->send($response);
}
/**
* Ajax set client config to client package.
*
* @param string $os
* @access public
* @return void
*/
public function ajaxSetClientConfig($os = '')
{
$response['result'] = 'success';
$account = $this->app->user->account;
$clientDir = $this->app->getBasePath() . 'tmp/cache/client/' . "$account/";
if(!is_dir($clientDir)) mkdir($clientDir, 0755, true);
/* write login info into config file. */
$loginInfo = new stdclass();
$loginInfo->ui = new stdclass();
$loginInfo->ui->defaultUser = new stdclass();
$loginInfo->ui->defaultUser->server = common::getSysURL();;
$loginInfo->ui->defaultUser->account = $this->app->user->account;
$loginInfo = json_encode($loginInfo);
$loginFile = $clientDir . 'config.json';
file_put_contents($loginFile, $loginInfo);
define('PCLZIP_TEMPORARY_DIR', $clientDir);
$this->app->loadClass('pclzip', true);
$clientFile = $clientDir . 'zentaoclient.zip';
$archive = new pclzip($clientFile);
if($os == 'mac')
{
$result = $archive->add($loginFile, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_ADD_PATH, 'zentaoclient/xuanxuan.app/Contents/Resouces');
}
else
{
$result = $archive->add($loginFile, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_ADD_PATH, 'zentaoclient/resources/build-in');
}
if($result == 0)
{
$response['result'] = 'fail';
$response['message'] = $archive->errorInfo(true);
$this->send($response);
}
$this->send($response);
}
/**
* Ajax get client package size.
*
* @access public
* @return void
*/
public function ajaxGetPackageSize()
{
$account = $this->app->user->account;
$packageFile = $this->app->getBasePath() . 'tmp/cache/client/' . $account . '/zentaoclient.zip';
$size = 0;
if(file_exists($packageFile))
{
$size = filesize($packageFile);
$size = $size ? round($size / 1048576, 2) : 0;
}
$response = array();
$response['result'] = 'success';
$response['size'] = $size;
$this->send($response);
}
/**
* Down notify.
*
+3 -22
View File
@@ -15,28 +15,6 @@ $lang->misc->ping = 'Ping';
$lang->misc->api = 'https://api.zentao.net';
$lang->misc->enApi = 'http://api.zentao.pm';
$lang->misc->client = new stdclass();
$lang->misc->client->version = 'Client Version';
$lang->misc->client->os = 'Select OS';
$lang->misc->client->download = 'Download';
$lang->misc->client->downloading = 'Downloading:';
$lang->misc->client->downloaded = 'Downloaded!';
$lang->misc->client->setting = 'Setting';
$lang->misc->client->setted = 'Setting is done!';
$lang->misc->client->osList['win64'] = 'Windows 64';
$lang->misc->client->osList['win32'] = 'Windows 32';
$lang->misc->client->osList['linux64'] = 'Linux 64';
$lang->misc->client->osList['linux32'] = 'Linux 32';
$lang->misc->client->osList['mac'] = 'Mac';
$lang->misc->client->errorInfo = new stdclass();
$lang->misc->client->errorInfo->downloadError = 'Failed to download package!';
$lang->misc->client->errorInfo->configError = 'Failed to set up!';
$lang->misc->client->errorInfo->manualOpt = 'Please get client package from %s .';
$lang->misc->client->errorInfo->dirNotExist = 'The dir <span class="code text-red">%s</span> does not exist. Create it.';
$lang->misc->client->errorInfo->dirNotWritable = 'The dir <span class="code text-red">%s</span> is not writable. <br /> Please exec:<span class="code text-red">sudo chmod 777 %s</span> in Linux.';
$lang->misc->zentao = new stdclass();
$lang->misc->zentao->version = 'Version %s';
$lang->misc->zentao->labels['about'] = 'About';
@@ -98,6 +76,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Latest Version';
$lang->misc->feature->detailed = 'Details';
$lang->misc->releaseDate['11.2.stable'] = '2019-01-30';
$lang->misc->releaseDate['11.1.stable'] = '2019-01-04';
$lang->misc->releaseDate['11.0.stable'] = '2018-12-21';
$lang->misc->releaseDate['10.6.stable'] = '2018-11-20';
@@ -120,6 +99,8 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['11.2.stable'][] = array('title'=>'Optimize details and fix bug.', 'desc' => '<p>Add upgrade logs and database checkup after upgrading</p><p>Fixed ZenTao client and other bugs, and optimized details.</p>');
$lang->misc->feature->all['11.1.stable'][] = array('title'=>'Fix Bug.');
$lang->misc->feature->all['11.0.stable'][] = array('title'=>'ZenTao integrate Xuanxuan');
+3 -22
View File
@@ -15,28 +15,6 @@ $lang->misc->ping = '防超时';
$lang->misc->api = 'https://api.zentao.net';
$lang->misc->enApi = 'http://api.zentao.pm';
$lang->misc->client = new stdclass();
$lang->misc->client->version = '客户端版本';
$lang->misc->client->os = '操作系统';
$lang->misc->client->download = '下载';
$lang->misc->client->downloading = '正在获取安装包:';
$lang->misc->client->downloaded = '成功获取安装包';
$lang->misc->client->setting = '正在设置配置信息';
$lang->misc->client->setted = '成功设置配置信息';
$lang->misc->client->osList['win64'] = 'Windows 64位';
$lang->misc->client->osList['win32'] = 'Windows 32位';
$lang->misc->client->osList['linux64'] = 'Linux 64位';
$lang->misc->client->osList['linux32'] = 'Linux 32位';
$lang->misc->client->osList['mac'] = 'Mac版';
$lang->misc->client->errorInfo = new stdclass();
$lang->misc->client->errorInfo->downloadError = '获取安装包失败';
$lang->misc->client->errorInfo->configError = '配置用户信息失败';
$lang->misc->client->errorInfo->manualOpt = '请从 %s 手动获取安装包。';
$lang->misc->client->errorInfo->dirNotExist = '客户端下载存储路径 <span class="code text-red">%s</span> 不存在,请创建该目录。';
$lang->misc->client->errorInfo->dirNotWritable = '客户端下载存储路径 <span class="code text-red">%s</span> 不可写 <br />linux下面请执行命令:<span class="code text-red">sudo chmod 777 %s</span>来修正';
$lang->misc->zentao = new stdclass();
$lang->misc->zentao->version = '版本%s';
$lang->misc->zentao->labels['about'] = '关于禅道';
@@ -98,6 +76,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '详情';
$lang->misc->releaseDate['11.2.stable'] = '2019-01-30';
$lang->misc->releaseDate['11.1.stable'] = '2019-01-04';
$lang->misc->releaseDate['11.0.stable'] = '2018-12-21';
$lang->misc->releaseDate['10.6.stable'] = '2018-11-20';
@@ -120,6 +99,8 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['11.2.stable'][] = array('title'=>'完善细节,修复Bug', 'desc' => '<p>增加升级日志和升级后数据库检查的功能</p><p>修复禅道集成客户端和其他若干bug,完善细节</p>');
$lang->misc->feature->all['11.1.stable'][] = array('title'=>'主要修复Bug。');
$lang->misc->feature->all['11.0.stable'][] = array('title'=>'禅道集成喧喧');
+3 -22
View File
@@ -15,28 +15,6 @@ $lang->misc->ping = '防超時';
$lang->misc->api = 'https://api.zentao.net';
$lang->misc->enApi = 'http://api.zentao.pm';
$lang->misc->client = new stdclass();
$lang->misc->client->version = '客戶端版本';
$lang->misc->client->os = '操作系統';
$lang->misc->client->download = '下載';
$lang->misc->client->downloading = '正在獲取安裝包:';
$lang->misc->client->downloaded = '成功獲取安裝包';
$lang->misc->client->setting = '正在設置配置信息';
$lang->misc->client->setted = '成功設置配置信息';
$lang->misc->client->osList['win64'] = 'Windows 64位';
$lang->misc->client->osList['win32'] = 'Windows 32位';
$lang->misc->client->osList['linux64'] = 'Linux 64位';
$lang->misc->client->osList['linux32'] = 'Linux 32位';
$lang->misc->client->osList['mac'] = 'Mac版';
$lang->misc->client->errorInfo = new stdclass();
$lang->misc->client->errorInfo->downloadError = '獲取安裝包失敗';
$lang->misc->client->errorInfo->configError = '配置用戶信息失敗';
$lang->misc->client->errorInfo->manualOpt = '請從 %s 手動獲取安裝包。';
$lang->misc->client->errorInfo->dirNotExist = '客戶端下載存儲路徑 <span class="code text-red">%s</span> 不存在,請創建該目錄。';
$lang->misc->client->errorInfo->dirNotWritable = '客戶端下載存儲路徑 <span class="code text-red">%s</span> 不可寫 <br />linux下面請執行命令:<span class="code text-red">sudo chmod 777 %s</span>來修正';
$lang->misc->zentao = new stdclass();
$lang->misc->zentao->version = '版本%s';
$lang->misc->zentao->labels['about'] = '關於禪道';
@@ -98,6 +76,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '詳情';
$lang->misc->releaseDate['11.2.stable'] = '2019-01-30';
$lang->misc->releaseDate['11.1.stable'] = '2019-01-04';
$lang->misc->releaseDate['11.0.stable'] = '2018-12-21';
$lang->misc->releaseDate['10.6.stable'] = '2018-11-20';
@@ -120,6 +99,8 @@ $lang->misc->releaseDate['7.2.stable'] = '2015-05-22';
$lang->misc->releaseDate['7.1.stable'] = '2015-03-07';
$lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['11.2.stable'][] = array('title'=>'完善細節,修復Bug', 'desc' => '<p>增加升級日誌和升級後資料庫檢查的功能</p><p>修復禪道整合客戶端和其他若干bug,完善細節</p>');
$lang->misc->feature->all['11.1.stable'][] = array('title'=>'主要修復Bug。');
$lang->misc->feature->all['11.0.stable'][] = array('title'=>'禪道整合喧喧');
-1
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
/* Methods. */
$lang->svn = new stdclass();
$lang->svn->common = 'Subversion';
$lang->svn->cat = 'View Code';
$lang->svn->diff = 'Diff Code';
-1
View File
@@ -10,7 +10,6 @@
* @link http://www.zentao.net
*/
/* 方法列表。*/
$lang->svn = new stdclass();
$lang->svn->common = 'Subversion';
$lang->svn->cat = '查看原始碼';
$lang->svn->diff = '比較原始碼';
-1
View File
@@ -171,7 +171,6 @@ $lang->testcase->reviewResultList[''] = '';
$lang->testcase->reviewResultList['pass'] = '确认通过';
$lang->testcase->reviewResultList['clarify'] = '继续完善';
$lang->testcase->statusList[''] = '';
$lang->testcase->statusList['wait'] = '待评审';
$lang->testcase->statusList['normal'] = '正常';
+1
View File
@@ -101,3 +101,4 @@ $lang->upgrade->fromVersions['10_5'] = '10.5';
$lang->upgrade->fromVersions['10_5_1'] = '10.5.1';
$lang->upgrade->fromVersions['10_6'] = '10.6';
$lang->upgrade->fromVersions['11_0'] = '11.0';
$lang->upgrade->fromVersions['11_1'] = '11.1';
+1 -1
View File
@@ -35,7 +35,7 @@ $lang->upgrade->setStatusFile = '<h4>升級之前請先完成下面的操
<li>%s</li>
<li>或者刪掉"<strong style="color:#ed980f">%s</strong>" 這個檔案 ,重新創建一個<strong style="color:#ed980f">ok.txt</strong>檔案,不需要內容。</li>
</ul>
<p><strong style="color:red">我已經仔細閲讀上面提示且完成上述工作,<a href="upgrade.php">繼續更新</a></strong></p>';
<p><strong style="color:red">我已經仔細閲讀上面提示且完成上述工作,<a href="#" onclick="location.reload()">繼續更新</a></strong></p>';
$lang->upgrade->selectVersion = '選擇版本';
$lang->upgrade->continue = '繼續';
$lang->upgrade->noteVersion = "務必選擇正確的版本,否則會造成數據丟失。";
+1
View File
@@ -347,6 +347,7 @@ class upgradeModel extends model
case '11_0': $this->saveLogs('Execute 11_0');
case '11_1':
$this->saveLogs('Execute 11_1');
$this->execSQL($this->getUpgradeFile('11.1'));
if(!isset($this->config->isINT) or !($this->config->isINT))
{
$xuanxuanSql = $this->app->getAppRoot() . 'db' . DS . 'upgradexuanxuan2.3.0.sql';
@@ -7,6 +7,9 @@ $lang->chat->xxdServer = 'Zentao Server';
$lang->chat->downloadXXD = 'Download XXD';
$lang->chat->zentaoIntegrate = 'Zentao Integrated';
$lang->chat->zentaoClient = 'ZenTao Client is added!';
$lang->chat->getChatUsers = 'Get Chat Users';
$lang->chat->getChatGroups = 'Get Chat Groups';
$lang->chat->notifyMSG = 'Notify';
$lang->chat->turnonList = array();
$lang->chat->turnonList[1] = 'Enable';
@@ -7,6 +7,9 @@ $lang->chat->xxdServer = '禅道服务器';
$lang->chat->downloadXXD = '下载喧喧服务端';
$lang->chat->zentaoIntegrate = '禅道集成';
$lang->chat->zentaoClient = '新增禅道客户端!';
$lang->chat->getChatUsers = '获取用户';
$lang->chat->getChatGroups = '获取讨论组';
$lang->chat->notifyMSG = '消息通知';
$lang->chat->turnonList = array();
$lang->chat->turnonList[1] = '是';
@@ -4,3 +4,8 @@ $lang->resource->admin->downloadxxd = 'downloadXXD';
$lang->admin->methodOrder[25] = 'xuanxuan';
$lang->admin->methodOrder[30] = 'downloadxxd';
$lang->resource->chat = new stdclass();
$lang->resource->chat->getChatUsers = 'getChatUsers';
$lang->resource->chat->getChatGroups = 'getChatGroups';
$lang->resource->chat->notifyMSG = 'notifyMSG';
@@ -4,3 +4,8 @@ $lang->resource->admin->downloadxxd = 'downloadXXD';
$lang->admin->methodOrder[25] = 'xuanxuan';
$lang->admin->methodOrder[30] = 'downloadxxd';
$lang->resource->chat = new stdclass();
$lang->resource->chat->getChatUsers = 'getChatUsers';
$lang->resource->chat->getChatGroups = 'getChatGroups';
$lang->resource->chat->notifyMSG = 'notifyMSG';
@@ -1,43 +0,0 @@
<?php
include '../../control.php';
class myMessage extends message
{
public function notify()
{
$response = array();
$response['result'] = true;
$response['message'] = '';
if(empty($_POST['userList']))
{
$response['result'] = false;
$response['message'] = $this->lang->message->error->noUserList;
die(json_encode($response));
}
if(empty($_POST['sender']))
{
$response['result'] = false;
$response['message'] = $this->lang->message->error->noSender;
die(json_encode($response));
}
$userList = empty($_POST['userList']) ? '' : $this->post->userList;
$title = empty($_POST['title']) ? '' : $this->post->title;
$subtitle = empty($_POST['subtitle']) ? '' : $this->post->subtitle;
$content = empty($_POST['content']) ? '' : $this->post->content;
$contentType = empty($_POST['contentType']) ? 'text' : $this->post->contentType;
$url = empty($_POST['url']) ? '' : $this->post->url;
$actions = empty($_POST['actions']) ? array() : $this->post->actions;
$sender = empty($_POST['sender']) ? 0 : $this->post->sender;
$result = $this->loadModel('chat')->createNotify($userList, $title, $subtitle, $content, $contentType, $url, $actions, $sender);
if(!$result)
{
$response['result'] = false;
$response['message'] = dao::getError();
}
die(json_encode($response));
}
}
@@ -2,7 +2,3 @@
$lang->message->typeList['xuanxuan'] = 'Client';
$lang->message->sender = 'ZentaoPMS';
if(!isset($lang->message->error)) $lang->message->error = new stdclass();
$lang->message->error->noUserList = 'Not set user id list.';
$lang->message->error->noSender = 'Not set sender information.';
@@ -2,7 +2,3 @@
$lang->message->typeList['xuanxuan'] = '客户端';
$lang->message->sender = '禅道项目管理';
if(!isset($lang->message->error)) $lang->message->error = new stdclass();
$lang->message->error->noUserList = '没有设置消息发送用户列表';
$lang->message->error->noSender = '没有设置发送方信息';
@@ -0,0 +1,82 @@
<?php
include '../../control.php';
class myMisc extends misc
{
/**
* Ajax get client package.
*
* @param string $os
* @access public
* @return void
*/
public function ajaxGetClientPackage($os = '')
{
set_time_limit (0);
session_write_close();
$response = array();
$response['result'] = 'success';
$response['message'] = '';
$clientDir = $this->app->getBasePath() . 'tmp/cache/client/';
if(!is_dir($clientDir)) mkdir($clientDir, 0755, true);
$version = $this->config->xuanxuan->version;
$packageDir = $clientDir . "/$version/";
if(!is_dir($packageDir)) mkdir($packageDir, 0755, true);
$account = $this->app->user->account;
$tmpDir = $clientDir . "/$account/";
if(!is_dir($tmpDir)) mkdir($tmpDir, 0755, true);
$needCache = false;
$clientName = "zentaoclient." . $os . ".zip";
$packageFile = $packageDir . $clientName;
if(!file_exists($packageFile))
{
$url = "http://dl.cnezsoft.com/zentaoclient/$version/";
$xxFile = $url . $clientName . "?t=" . rand();
$needCache = true;
}
else
{
$xxFile = $packageFile;
}
$clientFile = $tmpDir . 'zentaoclient.zip';
if($xxHd = fopen($xxFile, "rb"))
{
if($clientHd = fopen($clientFile, "wb"))
{
while(!feof($xxHd))
{
$result = fwrite($clientHd, fread($xxHd, 1024 * 8 ), 1024 * 8 );
if($result == false)
{
$response['result'] = 'fail';
$response['message'] = sprintf($this->lang->misc->client->errorInfo->manualOpt, $xxFile);
$this->send($response);
}
}
}
else
{
$response['result'] = 'fail';
$response['message'] = sprintf($this->lang->misc->client->errorInfo->manualOpt, $xxFile);
$this->send($response);
}
fclose($xxHd);
fclose($clientHd);
}
else
{
$response['result'] = 'fail';
$response['message'] = sprintf($this->lang->misc->client->errorInfo->manualOpt, $xxFile);
$this->send($response);
}
if($needCache) file_put_contents($packageFile, file_get_contents($clientFile));
$this->send($response);
}
}
@@ -0,0 +1,29 @@
<?php
include '../../control.php';
class myMisc extends misc
{
/**
* Ajax get client package size.
*
* @access public
* @return void
*/
public function ajaxGetPackageSize()
{
$account = $this->app->user->account;
$packageFile = $this->app->getBasePath() . 'tmp/cache/client/' . $account . '/zentaoclient.zip';
$size = 0;
if(file_exists($packageFile))
{
$size = filesize($packageFile);
$size = $size ? round($size / 1048576, 2) : 0;
}
$response = array();
$response['result'] = 'success';
$response['size'] = $size;
$this->send($response);
}
}
@@ -0,0 +1,54 @@
<?php
include '../../control.php';
class myMisc extends misc
{
/**
* Ajax set client config to client package.
*
* @param string $os
* @access public
* @return void
*/
public function ajaxSetClientConfig($os = '')
{
$response['result'] = 'success';
$account = $this->app->user->account;
$clientDir = $this->app->getBasePath() . 'tmp/cache/client/' . "$account/";
if(!is_dir($clientDir)) mkdir($clientDir, 0755, true);
/* write login info into config file. */
$loginInfo = new stdclass();
$loginInfo->ui = new stdclass();
$loginInfo->ui->defaultUser = new stdclass();
$loginInfo->ui->defaultUser->server = common::getSysURL();;
$loginInfo->ui->defaultUser->account = $this->app->user->account;
$loginInfo = json_encode($loginInfo);
$loginFile = $clientDir . 'config.json';
file_put_contents($loginFile, $loginInfo);
define('PCLZIP_TEMPORARY_DIR', $clientDir);
$this->app->loadClass('pclzip', true);
$clientFile = $clientDir . 'zentaoclient.zip';
$archive = new pclzip($clientFile);
if($os == 'mac')
{
$result = $archive->add($loginFile, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_ADD_PATH, 'zentaoclient/xuanxuan.app/Contents/Resouces');
}
else
{
$result = $archive->add($loginFile, PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_ADD_PATH, 'zentaoclient/resources/build-in');
}
if($result == 0)
{
$response['result'] = 'fail';
$response['message'] = $archive->errorInfo(true);
$this->send($response);
}
$this->send($response);
}
}
@@ -0,0 +1,100 @@
<?php
include '../../control.php';
class myMisc extends misc
{
/**
* Download zentao client.
*
* @access public
* @param string $action
* @param string $os
* @return void
*/
public function downloadClient($action = 'check', $os = '')
{
if($_POST)
{
$os = $this->post->os;
die(js::locate($this->createLink('misc', 'downloadClient', "action=getPackage&os=$os"), 'parent'));
}
if($action == 'check')
{
$error = false;
$errorInfo = '';
$cacheDir = $this->app->getBasePath() . 'tmp/cache/';
if(!is_dir($cacheDir))
{
$result = mkdir($cacheDir, 0755, true);
if($result == false)
{
$error = true;
$errorInfo = sprintf($this->lang->misc->client->errorInfo->dirNotExist, $cacheDir, $cacheDir);
}
}
if(!is_writable($cacheDir))
{
$error = true;
$errorInfo = sprintf($this->lang->misc->client->errorInfo->dirNotWritable, $cacheDir, $cacheDir);
}
$this->view->error = $error;
$this->view->errorInfo = $errorInfo;
if(!$error) die(js::locate($this->createLink('misc', 'downloadClient', "action=selectPackage")));
}
if($action == 'selectPackage')
{
$os = 'win64';
$agentOS = helper::getOS();
if(strpos($agentOS, 'Windows') !== false) $os = 'win64';
if(strpos($agentOS, 'Linux') !== false) $os = 'linux64';
if(strpos($agentOS, 'Mac') !== false) $os = 'mac';
$this->view->os = $os;
}
if($action == 'getPackage')
{
$this->view->os = $os;
$this->view->account = $this->app->user->account;
}
if($action == 'clearTmpPackage')
{
$account = $this->app->user->account;
$tmpDir = $this->app->getBasePath() . 'tmp/cache/client/' . "$account/";
if(is_dir($tmpDir))
{
$zfile = $this->app->loadClass('zfile');
$zfile->removeDir($tmpDir);
}
die(js::closeModal('parent.parent', 'this'));
}
if($action == 'downloadPackage')
{
$account = $this->app->user->account;
$clientDir = $this->app->getBasePath() . 'tmp/cache/client/' . "$account/";
$clientFile = $clientDir . 'zentaoclient.zip';
$zipContent = file_get_contents($clientFile);
if(is_dir($clientDir))
{
$zfile = $this->app->loadClass('zfile');
$zfile->removeDir($clientDir);
}
$this->fetch('file', 'sendDownHeader', array('fileName' => "zentao_chat_client." . $os . '.zip', 'zip', $zipContent));
}
$this->view->action = $action;
$this->display();
}
}
@@ -0,0 +1,22 @@
<?php
$lang->misc->client = new stdclass();
$lang->misc->client->version = 'Client Version';
$lang->misc->client->os = 'Select OS';
$lang->misc->client->download = 'Download';
$lang->misc->client->downloading = 'Downloading:';
$lang->misc->client->downloaded = 'Downloaded!';
$lang->misc->client->setting = 'Setting';
$lang->misc->client->setted = 'Setting is done!';
$lang->misc->client->osList['win64'] = 'Windows 64';
$lang->misc->client->osList['win32'] = 'Windows 32';
$lang->misc->client->osList['linux64'] = 'Linux 64';
$lang->misc->client->osList['linux32'] = 'Linux 32';
$lang->misc->client->osList['mac'] = 'Mac';
$lang->misc->client->errorInfo = new stdclass();
$lang->misc->client->errorInfo->downloadError = 'Failed to download package!';
$lang->misc->client->errorInfo->configError = 'Failed to set up!';
$lang->misc->client->errorInfo->manualOpt = 'Please get client package from %s .';
$lang->misc->client->errorInfo->dirNotExist = 'The dir <span class="code text-red">%s</span> does not exist. Create it.';
$lang->misc->client->errorInfo->dirNotWritable = 'The dir <span class="code text-red">%s</span> is not writable. <br /> Please exec:<span class="code text-red">sudo chmod 777 %s</span> in Linux.';
@@ -0,0 +1,23 @@
<?php
$lang->misc->client = new stdclass();
$lang->misc->client->version = '客户端版本';
$lang->misc->client->os = '操作系统';
$lang->misc->client->download = '下载';
$lang->misc->client->downloading = '正在获取安装包:';
$lang->misc->client->downloaded = '成功获取安装包';
$lang->misc->client->setting = '正在设置配置信息';
$lang->misc->client->setted = '成功设置配置信息';
$lang->misc->client->osList['win64'] = 'Windows 64位';
$lang->misc->client->osList['win32'] = 'Windows 32位';
$lang->misc->client->osList['linux64'] = 'Linux 64位';
$lang->misc->client->osList['linux32'] = 'Linux 32位';
$lang->misc->client->osList['mac'] = 'Mac版';
$lang->misc->client->errorInfo = new stdclass();
$lang->misc->client->errorInfo->downloadError = '获取安装包失败';
$lang->misc->client->errorInfo->configError = '配置用户信息失败';
$lang->misc->client->errorInfo->manualOpt = '请从 %s 手动获取安装包。';
$lang->misc->client->errorInfo->dirNotExist = '客户端下载存储路径 <span class="code text-red">%s</span> 不存在,请创建该目录。';
$lang->misc->client->errorInfo->dirNotWritable = '客户端下载存储路径 <span class="code text-red">%s</span> 不可写 <br />linux下面请执行命令:<span class="code text-red">sudo chmod 777 %s</span>来修正';