Merge branch '12.x'

This commit is contained in:
wangyidong
2020-12-11 20:42:10 +08:00
89 changed files with 1780 additions and 363 deletions
+7
View File
@@ -164,6 +164,13 @@ if %requestType% == 'PATH_INFO' (
echo %deletelog% > %baseDir%deletelog.bat
echo deletelog.bat ok
:: encrypt.
if exist "%baseDir%php\encrypt.php" (
SET encrypt= %phpcli% %baseDir%php\encrypt.php %%*
echo %encrypt% > %baseDir%encrypt.bat
echo encrypt.bat ok
)
:: create crond.bat
SET cron= %phpcli% %baseDir%php\crond.php
echo %cron% > %baseDir%crond.bat
+7
View File
@@ -167,6 +167,13 @@ fi
echo $deletelog > $basePath/deletelog.sh
echo "deletelog.sh ok"
# encrypt.
if [ -f "$basePath/php/encrypt.php" ]; then
encrypt="$phpcli $basePath/php/encrypt.php \$*"
echo $encrypt > $basePath/encrypt.sh
echo "encrypt.sh ok"
fi
# cron
if [ ! -d "$basePath/cron" ]; then
mkdir $basePath/cron
+2 -1
View File
@@ -115,7 +115,8 @@ $config->framework->detectDevice['fr'] = true; // 在en语言情况下,是
$config->framework->detectDevice['vi'] = true; // 在en语言情况下,是否启用设备检测功能。 Whether enable device detect or not.
/* IP white list settings.*/
$config->ipWhiteList = '*';
$config->ipWhiteList = '*';
$config->xFrameOptions = 'SAMEORIGIN';
/* Switch for zentao features. */
$config->features = new stdclass();
+109
View File
@@ -0,0 +1,109 @@
CREATE TABLE IF NOT EXISTS `zt_im_chat` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`gid` char(40) NOT NULL DEFAULT '',
`name` varchar(60) NOT NULL DEFAULT '',
`type` varchar(20) NOT NULL DEFAULT 'group',
`admins` varchar(255) NOT NULL DEFAULT '',
`committers` varchar(255) NOT NULL DEFAULT '',
`subject` mediumint(8) unsigned NOT NULL DEFAULT 0,
`public` enum('0', '1') NOT NULL DEFAULT '0',
`createdBy` varchar(30) NOT NULL DEFAULT '',
`createdDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`editedBy` varchar(30) NOT NULL DEFAULT '',
`editedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`lastActiveTime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`dismissDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`),
KEY `gid` (`gid`),
KEY `name` (`name`),
KEY `type` (`type`),
KEY `public` (`public`),
KEY `createdBy` (`createdBy`),
KEY `editedBy` (`editedBy`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_chatuser` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`cgid` char(40) NOT NULL DEFAULT '',
`user` mediumint(8) NOT NULL DEFAULT 0,
`order` smallint(5) NOT NULL DEFAULT 0,
`star` enum('0', '1') NOT NULL DEFAULT '0',
`hide` enum('0', '1') NOT NULL DEFAULT '0',
`mute` enum('0', '1') NOT NULL DEFAULT '0',
`freeze` enum('0', '1') NOT NULL DEFAULT '0',
`join` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`quit` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`category` varchar(40) NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `cgid` (`cgid`),
KEY `user` (`user`),
KEY `order` (`order`),
KEY `star` (`star`),
KEY `hide` (`hide`),
UNIQUE KEY `chatuser` (`cgid`, `user`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_client` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`version` char(30) NOT NULL DEFAULT '',
`desc` varchar(100) NOT NULL DEFAULT '',
`changeLog` text NOT NULL,
`strategy` varchar(10) NOT NULL DEFAULT '',
`downloads` text NOT NULL,
`createdDate` datetime NOT NULL,
`createdBy` varchar(30) NOT NULL DEFAULT '',
`editedDate` datetime NOT NULL,
`editedBy` varchar(30) NOT NULL DEFAULT '',
`status` enum('released','wait') NOT NULL DEFAULT 'wait',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_message` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`gid` char(40) NOT NULL DEFAULT '',
`cgid` char(40) NOT NULL DEFAULT '',
`user` varchar(30) NOT NULL DEFAULT '',
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`order` bigint(8) unsigned NOT NULL,
`type` enum('normal', 'broadcast', 'notify') NOT NULL DEFAULT 'normal',
`content` text NOT NULL DEFAULT '',
`contentType` enum('text', 'plain', 'emotion', 'image', 'file', 'object', 'code') NOT NULL DEFAULT 'text',
`data` text NOT NULL DEFAULT '',
`deleted` enum('0','1') NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `mgid` (`gid`),
KEY `mcgid` (`cgid`),
KEY `muser` (`user`),
KEY `mtype` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_messagestatus` (
`user` mediumint(8) NOT NULL DEFAULT 0,
`message` int(11) unsigned NOT NULL,
`status` enum('waiting','sent','readed','deleted') NOT NULL DEFAULT 'waiting',
UNIQUE KEY `user` (`user`,`message`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_queue` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`type` char(30) NOT NULL,
`content` text NOT NULL,
`addDate` datetime NOT NULL,
`processDate` datetime NOT NULL,
`result` text NOT NULL,
`status` char(30) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_conference` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`rid` char(24) NOT NULL DEFAULT '',
`cgid` char(40) NOT NULL DEFAULT '',
`status` enum('closed','open') NOT NULL DEFAULT 'closed',
`participants` text NOT NULL,
`openedBy` mediumint(8) NOT NULL DEFAULT 0,
`openedDate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `zt_im_conferenceaction` (
`id` mediumint(8) unsigned NOT NULL auto_increment,
`rid` char(24) NOT NULL DEFAULT '',
`type` enum('create','join','leave','close') NOT NULL DEFAULT 'create',
`user` mediumint(8) NOT NULL DEFAULT 0,
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
File diff suppressed because it is too large Load Diff
+8
View File
@@ -1,3 +1,11 @@
2020-11-29 12.5.1
修复的Bug
3406 AppScan漏洞
3648 CNVD-2014-08794--ZenTaoPMS(禅道)任意文件上传漏洞
3649 CNVD-2017-04121--青岛易软天创网络科技有限公司禅道项目管理软件后台存在设计缺陷漏洞
3651 CNVD-2017-06354--禅道项目管理软件存在权限控制逻辑漏洞
3702 CNVD-C-2020-275684 禅道4.0.3后台存在SQL注入漏洞
2020-11-19 12.5.stable
完成的需求
5487 在禅道专业版、企业版的授权中增加版本号限制
+60
View File
@@ -298,6 +298,66 @@ class baseHelper
return (function_exists('get_magic_quotes_gpc') and get_magic_quotes_gpc()) ? addslashes(json_encode($data)) : json_encode($data);
}
/**
* Encrypt password
*
* @param string $password
* @static
* @access public
* @return string
*/
public static function encryptPassword($password)
{
global $config;
$encrypted = '';
if(!empty($config->encryptSecret) and $password)
{
$secret = $config->encryptSecret;
if(function_exists('mcrypt_encrypt'))
{
$encrypted = base64_encode(@mcrypt_encrypt(MCRYPT_DES, $secret, $password, MCRYPT_MODE_CBC));
}
elseif(function_exists('openssl_encrypt'))
{
$encrypted = @openssl_encrypt($password, 'des-cbc', $secret);
}
}
if(empty($encrypted)) $encrypted = $password;
return $encrypted;
}
/**
* Decrypt password.
*
* @param string $password
* @static
* @access public
* @return string
*/
public static function decryptPassword($password)
{
global $config;
$decryptedPassword = '';
if(!empty($config->encryptSecret) and $password)
{
$secret = $config->encryptSecret;
if(function_exists('mcrypt_decrypt'))
{
$decryptedPassword = mcrypt_decrypt(MCRYPT_DES, $secret, base64_decode($password), MCRYPT_MODE_CBC);
}
elseif(function_exists('openssl_decrypt'))
{
$decryptedPassword = openssl_decrypt($password, 'des-cbc', $secret);
}
}
if(empty($decryptedPassword)) $decryptedPassword = $password;
return $decryptedPassword;
}
/**
* 判断是否是utf8编码
* Judge a string is utf-8 or not.
+3 -1
View File
@@ -2161,7 +2161,9 @@ class baseRouter
}
try
{
$dbh = new PDO($dsn, $params->user, $params->password, array(PDO::ATTR_PERSISTENT => $params->persistant));
$dbPassword = helper::decryptPassword($params->password);
$dbh = new PDO($dsn, $params->user, $dbPassword, array(PDO::ATTR_PERSISTENT => $params->persistant));
$dbh->exec("SET NAMES {$params->encoding}");
/*
+4 -4
View File
@@ -239,10 +239,10 @@ class scm
*/
function escapeCmd($cmd)
{
$codes = array('#', '&', ';', '`', '|', '*', '?', '~', '<', '>', '^', '[', ']', '{', '}', '$', ',', '\x0A', '\xFF');
if(DIRECTORY_SEPARATOR == '/') $codes[] = '\\';
foreach($codes as $code) $cmd = str_replace($code, '\\' . $code, $cmd);
return $cmd;
$codes = array('#', '&', ';', '`', '|', '*', '?', '~', '<', '>', '^', '[', ']', '{', '}', '$', ',', '\x0A', '\xFF');
if(DIRECTORY_SEPARATOR == '/') $cmd = str_replace('\\', '\\\\', $cmd);
foreach($codes as $code) $cmd = str_replace($code, "\\{$code}", $cmd);
return $cmd;
}
/**
+1 -1
View File
@@ -38,7 +38,7 @@ if(!$selfCall) die(include('./todolist.html.php'));
<div class='panel-body'>
<div class="todoes-input">
<div class="todo-form-trigger"><input type="text" placeholder="<?php echo $lang->todo->lblClickCreate?>" autocomplete="off" class="form-control"></div>
<form class="form-horizontal todoes-form layer" method='post' target='hiddenwin' action='<?php echo $this->createLink('todo', 'create', 'date=today&account=&from=block');?>'>
<form class="form-horizontal todoes-form layer" method='post' target='hiddenwin' action='<?php echo $this->createLink('todo', 'create', 'date=today&userID=&from=block');?>'>
<h3><?php echo $lang->todo->create;?></h3>
<div class="form-group">
<?php $leftWidth = common::checkNotCN() ? 'col-sm-3' : 'col-sm-2';?>
+6 -4
View File
@@ -1383,15 +1383,17 @@ class bug extends control
/**
* AJAX: get bugs of a user in html select.
*
* @param string $account
* @param int $userID
* @param string $id the id of the select control.
* @access public
* @return string
*/
public function ajaxGetUserBugs($account = '', $id = '')
public function ajaxGetUserBugs($userID = '', $id = '')
{
if($account == '') $account = $this->app->user->account;
$bugs = $this->bug->getUserBugPairs($account);
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$bugs = $this->bug->getUserBugPairs($account);
if($id) die(html::select("bugs[$id]", $bugs, '', 'class="form-control"'));
die(html::select('bug', $bugs, '', 'class=form-control'));
+1
View File
@@ -50,6 +50,7 @@ $lang->build->noBuild = '暫時沒有版本。';
$lang->build->notice = new stdclass();
$lang->build->notice->changeProduct = "已經關聯{$lang->productSRCommon}或Bug的版本,不能修改其所屬產品";
$lang->build->notice->changeProject = "提交測試單的版本,不能修改其所屬{$lang->projectCommon}";
$lang->build->finishStories = " 本次共完成 %s 個{$lang->productSRCommon}";
$lang->build->resolvedBugs = ' 本次共解決 %s 個Bug';
+3
View File
@@ -145,6 +145,9 @@ class buildModel extends model
$this->session->set('projectBuildForm', $query->form);
}
}
if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
$buildQuery = $this->session->projectBuildQuery;
if($this->session->projectBuildQuery == false) $this->session->set('projectBuildQuery', ' 1 = 1');
$buildQuery = $this->session->projectBuildQuery;
+1 -1
View File
@@ -688,7 +688,7 @@ $lang->error->URL = "『%s』should be url.";
$lang->error->date = "『%s』should be valid date.";
$lang->error->datetime = "『%s』should be valid date.";
$lang->error->code = "『%s』should be letters or numbers.";
$lang->error->account = "『%s』should be >= 3 letters or numbers.";
$lang->error->account = "『%s』should be >= 3 letters, underline or numbers.";
$lang->error->passwordsame = "The two passwords should be the same.";
$lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters.";
$lang->error->accessDenied = 'Access is denied.';
+1 -1
View File
@@ -688,7 +688,7 @@ $lang->error->URL = "『%s』should be url.";
$lang->error->date = "『%s』should be valid date.";
$lang->error->datetime = "『%s』should be valid date.";
$lang->error->code = "『%s』nên là chữ hoặc số.";
$lang->error->account = "『%s』should be >= 3 letters or numbers.";
$lang->error->account = "『%s』should be >= 3 letters, underline or numbers.";
$lang->error->passwordsame = "The two passwords should be the same.";
$lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters.";
$lang->error->accessDenied = 'Truy cập bị từ chối.';
+1 -1
View File
@@ -684,7 +684,7 @@ $lang->error->URL = "『%s』应当为合法的URL。";
$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 = '您没有访问权限';
+7 -6
View File
@@ -46,6 +46,7 @@ class commonModel extends model
{
header("Content-Type: text/html; Language={$this->config->charset}");
header("Cache-control: private");
if($this->loadModel('setting')->getItem('owner=system&module=sso&key=turnon'))
{
if(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on')
@@ -56,7 +57,7 @@ class commonModel extends model
}
else
{
header("X-Frame-Options: SAMEORIGIN");
if(!empty($this->config->xFrameOptions)) header("X-Frame-Options: {$this->config->xFrameOptions}");
}
}
@@ -1519,17 +1520,17 @@ EOD;
/* Set the query condition session. */
if($onlyCondition)
{
$queryCondition = explode('WHERE', $sql);
$queryCondition = explode(' WHERE ', $sql);
$queryCondition = isset($queryCondition[1]) ? $queryCondition[1] : '';
if($queryCondition)
{
$queryCondition = explode('ORDER', $queryCondition);
$queryCondition = explode(' ORDER BY ', $queryCondition);
$queryCondition = str_replace('t1.', '', $queryCondition[0]);
}
}
else
{
$queryCondition = explode('ORDER', $sql);
$queryCondition = explode(' ORDER BY ', $sql);
$queryCondition = $queryCondition[0];
}
$queryCondition = trim($queryCondition);
@@ -1539,11 +1540,11 @@ EOD;
$this->session->set($objectType . 'OnlyCondition', $onlyCondition);
/* Set the query condition session. */
$orderBy = explode('ORDER BY', $sql);
$orderBy = explode(' ORDER BY ', $sql);
$orderBy = isset($orderBy[1]) ? $orderBy[1] : '';
if($orderBy)
{
$orderBy = explode('LIMIT', $orderBy);
$orderBy = explode(' LIMIT ', $orderBy);
$orderBy = $orderBy[0];
if($onlyCondition) $orderBy = str_replace('t1.', '', $orderBy);
}
+18 -9
View File
@@ -142,10 +142,10 @@ class company extends control
* Company dynamic.
*
* @param string $browseType
* @param string $orderBy
* @param string $param
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param string $date
* @param string $direction next|pre
* @access public
* @return void
*/
@@ -178,7 +178,13 @@ class company extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Set the user and type. */
$account = $browseType == 'account' ? $param : 'all';
$account = 'all';
$user = '';
if($browseType == 'account')
{
$user = $this->loadModel('user')->getById((int)$param, 'id');
if($user) $account = $user->account;
}
$product = $browseType == 'product' ? $param : 'all';
$project = $browseType == 'project' ? $param : 'all';
$period = ($browseType == 'account' or $browseType == 'product' or $browseType == 'project') ? 'all' : $browseType;
@@ -196,9 +202,12 @@ class company extends control
$this->view->projects = $projects;
/* Get users.*/
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted|noletter');
$users[''] = $this->lang->company->user;
$this->view->users = $users;
$userIdPairs = $this->loadModel('user')->getPairs('noclosed|nodeleted|noletter|useid');
$userIdPairs[''] = $this->lang->company->user;
$this->view->userIdPairs = $userIdPairs;
$accountPairs = $this->user->getPairs('noclosed|nodeleted|noletter');
$accountPairs[''] = '';
/* The header and position. */
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->dynamic;
@@ -217,7 +226,6 @@ class company extends control
/* Build search form. */
$projects[0] = '';
$products[0] = '';
$users[''] = '';
ksort($projects);
ksort($products);
$projects['all'] = $this->lang->project->allProject;
@@ -233,7 +241,7 @@ class company extends control
$this->config->company->dynamic->search['params']['action']['values'] = $this->lang->action->search->label;
$this->config->company->dynamic->search['params']['project']['values'] = $projects;
$this->config->company->dynamic->search['params']['product']['values'] = $products;
$this->config->company->dynamic->search['params']['actor']['values'] = $users;
$this->config->company->dynamic->search['params']['actor']['values'] = $accountPairs;
$this->loadModel('search')->setSearchParams($this->config->company->dynamic->search);
/* Assign. */
@@ -244,6 +252,7 @@ class company extends control
$this->view->queryID = $queryID;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->user = $user;
$this->view->param = $param;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $browseType);
$this->view->direction = $direction;
+4 -4
View File
@@ -87,12 +87,12 @@ js::set('confirmDelete', $lang->user->confirmDelete);
<tr>
<td class='c-id'>
<?php if($canBatchEdit):?>
<?php echo html::checkbox('users', array($user->account => '')) . html::a(helper::createLink('user', 'view', "account=$user->account"), sprintf('%03d', $user->id));?>
<?php echo html::checkbox('users', array($user->account => '')) . html::a(helper::createLink('user', 'view', "userID=$user->id"), sprintf('%03d', $user->id));?>
<?php else:?>
<?php printf('%03d', $user->id);?>
<?php endif;?>
</td>
<td><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
<td><?php if(!common::printLink('user', 'view', "userID=$user->id", $user->realname, '', "title='$user->realname'")) echo $user->realname;?></td>
<td><?php echo $user->account;?></td>
<td class="w-90px" title='<?php echo zget($lang->user->roleList, $user->role, '');?>'><?php echo zget($lang->user->roleList, $user->role, '');?></td>
<td class="c-url" title="<?php echo $user->email;?>"><?php echo html::mailto($user->email);?></td>
@@ -103,8 +103,8 @@ js::set('confirmDelete', $lang->user->confirmDelete);
<td class='c-num text-center'><?php echo $user->visits;?></td>
<td class='c-actions'>
<?php
if(!empty($config->sso->turnon)) common::printIcon('user', 'unbind', "userID=$user->account", $user, 'list', 'unlink', "hiddenwin");
common::printIcon('user', 'unlock', "userID=$user->account", $user, 'list', 'unlock', "hiddenwin");
if(!empty($config->sso->turnon)) common::printIcon('user', 'unbind', "userID=$user->id", $user, 'list', 'unlink', "hiddenwin");
common::printIcon('user', 'unlock', "userID=$user->id", $user, 'list', 'unlock', "hiddenwin");
common::printIcon('user', 'edit', "userID=$user->id&from=company", '', 'list');
$deleteClass = (strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete')) ? 'btn iframe' : 'btn disabled';
+2 -2
View File
@@ -25,7 +25,7 @@
echo html::a(inlink('dynamic', "browseType=$period"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
<?php endforeach;?>
<div class="input-control space w-150px"><?php echo html::select('account', $users, $account, 'onchange=changeUser(this.value) class="form-control chosen"');?></div>
<div class="input-control space w-150px"><?php echo html::select('account', $userIdPairs, $user ? $user->id : '', 'onchange=changeUser(this.value) class="form-control chosen"');?></div>
<div class="input-control space w-150px"><?php echo html::select('product', $products, $product, 'onchange=changeProduct(this.value) class="form-control chosen"');?></div>
<div class="input-control space w-150px"><?php echo html::select('project', $projects, $project, 'onchange=changeProject(this.value) class="form-control chosen"'); ?></div>
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->action->dynamic->search;?></a>
@@ -54,7 +54,7 @@
<div>
<span class="timeline-tag"><?php echo $action->time?></span>
<span class="timeline-text">
<?php echo zget($users, $action->actor);?>
<?php echo zget($accountPairs, $action->actor);?>
<span class='label-action'><?php echo ' ' . $action->actionLabel;?></span>
<?php if($action->action != 'login' and $action->action != 'logout'):?>
<span class="text"><?php echo $action->objectLabel;?></span>
+2 -2
View File
@@ -204,8 +204,8 @@ $lang->custom->moduleName['project'] = $lang->projectCommon;
$lang->custom->conceptQuestions['overview'] = "1. Which combination of management fits your company?";
$lang->custom->conceptQuestions['story'] = "2. Do you use the concept of requirement or user story in your company?";
$lang->custom->conceptQuestions['requirementpoint'] = "2. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "2. Do you use hours or story points to make estimations in your company?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "3. Do you use hours or story points to make estimations in your company?";
$lang->custom->conceptOptions = new stdclass;
+2 -2
View File
@@ -204,8 +204,8 @@ $lang->custom->moduleName['project'] = $lang->projectCommon;
$lang->custom->conceptQuestions['overview'] = "1. Quelle combinaison de gestion convient le mieux à votre entreprise ?";
$lang->custom->conceptQuestions['story'] = "2. Utilisez-vous le concept d'exigence ou de user story dans votre entreprise ?";
$lang->custom->conceptQuestions['requirementpoint'] = "2. Utilisez-vous des heures ou des points de fonction pour faire des estimations dans votre entreprise ?";
$lang->custom->conceptQuestions['storypoint'] = "2. Utilisez-vous des heures ou des points de Story pour faire des estimations dans votre entreprise ?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Utilisez-vous des heures ou des points de fonction pour faire des estimations dans votre entreprise ?";
$lang->custom->conceptQuestions['storypoint'] = "3. Utilisez-vous des heures ou des points de Story pour faire des estimations dans votre entreprise ?";
$lang->custom->conceptOptions = new stdclass;
+2 -2
View File
@@ -204,8 +204,8 @@ $lang->custom->moduleName['project'] = $lang->projectCommon;
$lang->custom->conceptQuestions['overview'] = "1. Sự kết hợp quản lý nào phù hợp với công ty của bạn?";
$lang->custom->conceptQuestions['story'] = "2. Bạn có sử dụng mô hình điều kiện hay câu chuyện người dùng trong doanh nghiệp của bạn?";
$lang->custom->conceptQuestions['requirementpoint'] = "2. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "2. Bạn có dùng giờ hoặc điểm để tạo dự kiến trong doanh nghiệp của bạn ?";
$lang->custom->conceptQuestions['requirementpoint'] = "3. Do you use hours or function points to make estimations in your company?";
$lang->custom->conceptQuestions['storypoint'] = "3. Bạn có dùng giờ hoặc điểm để tạo dự kiến trong doanh nghiệp của bạn ?";
$lang->custom->conceptOptions = new stdclass;
+5 -2
View File
@@ -384,13 +384,16 @@ class deptModel extends model
* Get user pairs of a department.
*
* @param int $deptID
* @param string $params
* @access public
* @return array
*/
public function getDeptUserPairs($deptID = 0)
public function getDeptUserPairs($deptID = 0, $params = '')
{
$childDepts = $this->getAllChildID($deptID);
return $this->dao->select('account, realname')->from(TABLE_USER)
$keyField = strpos($params, 'useid') !== false ? 'id' : 'account';
return $this->dao->select("$keyField, realname")->from(TABLE_USER)
->where('deleted')->eq(0)
->beginIF($deptID)->andWhere('dept')->in($childDepts)->fi()
->orderBy('account')
+6 -39
View File
@@ -61,7 +61,7 @@ class extension extends control
$extension->viewLink = $release->viewLink;
if(isset($release->latestRelease) and $extension->version != $release->latestRelease->releaseVersion and $this->extension->checkVersion($release->latestRelease->zentaoCompatible))
{
$upgradeLink = inlink('upgrade', "extension=$release->code&downLink=" . helper::safe64Encode($release->latestRelease->downLink) . "&md5={$release->latestRelease->md5}&type=$release->type");
$upgradeLink = inlink('upgrade', "extension=$release->code&downLink=&md5=&type=$release->type");
$upgradeLink = ($release->latestRelease->charge or !$release->latestRelease->public) ? $release->latestRelease->downLink : $upgradeLink;
$extension->upgradeLink = $upgradeLink;
}
@@ -153,39 +153,6 @@ class extension extends control
/* Get the package file name. */
$packageFile = $this->extension->getPackageFile($extension);
if($downLink)
{
/* Checking download path. */
$return = $this->extension->checkDownloadPath();
if($return->result != 'ok')
{
$this->view->error = $return->error;
die($this->display());
}
/* Check file exists or not. */
if(file_exists($packageFile) and $overridePackage == 'no')
{
$overrideLink = inlink('install', "extension=$extension&downLink=$downLink&md5=$md5&type=$type&overridePackage=yes&ignoreCompatible=$ignoreCompatible&overrideFile=$overrideFile&agreeLicense=$agreeLicense&upgrade=$upgrade");
$this->view->error = sprintf($this->lang->extension->errorPackageFileExists, $packageFile, $installType, $overrideLink);
die($this->display());
}
/* Download the package file. */
if(!file_exists($packageFile) or ($md5 != '' and md5_file($packageFile) != $md5)) $this->extension->downloadPackage($extension, helper::safe64Decode($downLink));
if(!file_exists($packageFile))
{
$this->view->error = sprintf($this->lang->extension->errorDownloadFailed, $packageFile);
die($this->display());
}
elseif($md5 != '' and md5_file($packageFile) != $md5)
{
unlink($packageFile);
$this->view->error = sprintf($this->lang->extension->errorMd5Checking, $packageFile);
die($this->display());
}
}
/* Check the package file exists or not. */
if(!file_exists($packageFile))
{
@@ -280,7 +247,7 @@ class extension extends control
$zentaoCompatible = $condition->zentao['compatible'];
if(!$this->extension->checkVersion($zentaoCompatible) and $ignoreCompatible == 'no')
{
$ignoreLink = inlink('install', "extension=$extension&downLink=$downLink&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=yes&overrideFile=$overrideFile&agreeLicense=$agreeLicense&upgrade=$upgrade");
$ignoreLink = inlink('install', "extension=$extension&downLink=&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=yes&overrideFile=$overrideFile&agreeLicense=$agreeLicense&upgrade=$upgrade");
$returnLink = inlink('obtain');
$this->view->error = sprintf($this->lang->extension->errorCheckIncompatible, $installType, $ignoreLink, $installType, $returnLink);
die($this->display());
@@ -292,7 +259,7 @@ class extension extends control
$return = $this->extension->checkFile($extension);
if($return->result != 'ok')
{
$overrideLink = inlink('install', "extension=$extension&downLink=$downLink&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=$ignoreCompatible&overrideFile=yes&agreeLicense=$agreeLicense&upgrade=$upgrade");
$overrideLink = inlink('install', "extension=$extension&downLink=&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=$ignoreCompatible&overrideFile=yes&agreeLicense=$agreeLicense&upgrade=$upgrade");
$returnLink = inlink('obtain');
$this->view->error = sprintf($this->lang->extension->errorFileConflicted, $return->error, $overrideLink, $returnLink);
die($this->display());
@@ -312,7 +279,7 @@ class extension extends control
{
$extensionInfo = $this->extension->getInfoFromPackage($extension);
$license = $this->extension->processLicense($extensionInfo->license);
$agreeLink = inlink('install', "extension=$extension&downLink=$downLink&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=$ignoreCompatible&overrideFile=$overrideFile&agreeLicense=yes&upgrade=$upgrade");
$agreeLink = inlink('install', "extension=$extension&downLink=&md5=$md5&type=$type&overridePackage=$overridePackage&ignoreCompatible=$ignoreCompatible&overrideFile=$overrideFile&agreeLicense=yes&upgrade=$upgrade");
$this->view->license = $license;
$this->view->author = $extensionInfo->author;
$this->view->agreeLink = $agreeLink;
@@ -350,7 +317,7 @@ class extension extends control
/* Update status, dirs, files and installed time. */
$this->extension->updateExtension($extension, $data);
$this->view->downloadedPackage = !empty($downLink);
$this->view->downloadedPackage = false;
/* The postInstall hook file. */
$hook = $upgrade == 'yes' ? 'postupgrade' : 'postinstall';
@@ -519,7 +486,7 @@ class extension extends control
public function upgrade($extension, $downLink = '', $md5 = '', $type = '')
{
$this->extension->removePackage($extension);
$this->locate(inlink('install', "extension=$extension&downLink=$downLink&md5=$md5&type=$type&overridePackage=no&ignoreCompatible=yes&overrideFile=no&agreeLicense=no&upgrade=yes"));
$this->locate(inlink('install', "extension=$extension&downLink=&md5=$md5&type=$type&overridePackage=no&ignoreCompatible=yes&overrideFile=no&agreeLicense=no&upgrade=yes"));
}
/**
-14
View File
@@ -153,20 +153,6 @@ class extensionModel extends model
}
/**
* Download an extension.
*
* @param string $extension
* @param string $downLink
* @access public
* @return void
*/
public function downloadPackage($extension, $downLink)
{
$packageFile = $this->getPackageFile($extension);
file_put_contents($packageFile, common::http($downLink));
}
/**
* Get extensions by status.
*
-6
View File
@@ -92,7 +92,6 @@
<div class='pull-right'>
<div class='btn-group'>
<?php
$installLink = inlink('install', "extension=$extension->code&downLink=" . helper::safe64Encode($currentRelease->downLink) . "&md5={$currentRelease->md5}&type=$extension->type&overridePackage=no&ignoreCompitable=yes");
echo html::a($extension->viewLink, $lang->extension->view, '', 'class="btn extension"');
if($currentRelease->public)
{
@@ -110,11 +109,6 @@
echo html::commonButton("<i class='icon-ok'></i> " . $lang->extension->installed, "disabled='disabled'", 'btn text-success');
}
}
else
{
$label = $currentRelease->compatible ? $lang->extension->installAuto : $lang->extension->installForce;
echo html::a($installLink, $label, '', 'class="iframe btn"');
}
}
}
echo html::a($currentRelease->downLink, $lang->extension->downloadAB, '_blank', 'class="btn"');
+5
View File
@@ -901,6 +901,9 @@ class fileModel extends model
/* Set the downloading cookie, thus the export form page can use it to judge whether to close the window or not. */
setcookie('downloading', 1, 0, $this->config->webRoot, '', false, false);
/* Only download upload file that is in zentao. */
if($type == 'file' and stripos($content, $this->savePath) !== 0) die();
/* Append the extension name auto. */
$extension = '.' . $fileType;
if(strpos($fileName, $extension) === false) $fileName .= $extension;
@@ -919,6 +922,8 @@ class fileModel extends model
if($type == 'content') die($content);
if($type == 'file' and file_exists($content))
{
if(stripos($content, $this->app->getBasePath()) !== 0) die();
set_time_limit(0);
$chunkSize = 10 * 1024 * 1024;
$handle = fopen($content, "r");
+2 -1
View File
@@ -91,6 +91,7 @@ class gitModel extends model
$lastTag = '';
foreach($tags as $tag)
{
if(empty($tag)) continue;
if(!$isNew and $tag == $job->lastTag)
{
$isNew = true;
@@ -99,7 +100,7 @@ class gitModel extends model
if(!$isNew) continue;
$lastTag = $tag;
$this->loadModel('compile')->createByJob($job->id, $lastTag, 'tag');
if($lastTag) $this->loadModel('compile')->createByJob($job->id, $lastTag, 'tag');
}
if($lastTag) $this->dao->update(TABLE_JOB)->set('lastTag')->eq($lastTag)->where('id')->eq($job->id)->exec();
}
+1 -1
View File
@@ -38,7 +38,7 @@ $lang->job->commitEx = "用於匹配創建構建任務的關鍵字,多個
$lang->job->cronSample = '如 0 0 2 * * 2-6/1 表示每個工作日凌晨2點';
$lang->job->sendExec = '發送執行請求成功!執行結果:%s';
$lang->job->inputName = '請輸入參數名稱。';
$lang->job->invalidName = '參數名稱應該是英文字母、數字或下劃綫的組合。';
$lang->job->invalidName = '參數名稱應該是英文字母、數字或下劃線的組合。';
$lang->job->buildTypeList['build'] = '僅構建';
$lang->job->buildTypeList['buildAndDeploy'] = '構建部署';
+2
View File
@@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Letzte Version';
$lang->misc->feature->detailed = 'Details';
$lang->misc->releaseDate['12.5.1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
$lang->misc->releaseDate['20.0.alpha1'] = '2020-10-30';
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
@@ -139,6 +140,7 @@ $lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['20.0.alpha1'][] = array('title'=>'Add program, reset priv.', 'desc' => '');
$lang->misc->feature->all['12.5.1'][] = array('title' => 'Fix Bug', 'desc' => '');
$lang->misc->feature->all['12.5.stable'][] = array('title' => 'Fix Bug. Complete high priority story.', 'desc' => '');
$lang->misc->feature->all['12.4.4'][] = array('title'=>'Compatible with professional and enterprise editions', 'desc' => '');
+2
View File
@@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Latest Version';
$lang->misc->feature->detailed = 'Detail';
$lang->misc->releaseDate['12.5.1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
$lang->misc->releaseDate['20.0.alpha1'] = '2020-10-30';
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
@@ -139,6 +140,7 @@ $lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['20.0.alpha1'][] = array('title'=>'Add program, reset priv.', 'desc' => '');
$lang->misc->feature->all['12.5.1'][] = array('title' => 'Fix Bug', 'desc' => '');
$lang->misc->feature->all['12.5.stable'][] = array('title' => 'Fix Bug. Complete high priority story.', 'desc' => '');
$lang->misc->feature->all['12.4.4'][] = array('title'=>'Compatible with professional and enterprise editions', 'desc' => '');
+2
View File
@@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Dernière Version';
$lang->misc->feature->detailed = 'Détail';
$lang->misc->releaseDate['12.5.1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
$lang->misc->releaseDate['20.0.alpha1'] = '2020-10-30';
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
@@ -139,6 +140,7 @@ $lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['20.0.alpha1'][] = array('title'=>'Add program, reset priv.', 'desc' => '');
$lang->misc->feature->all['12.5.1'][] = array('title' => 'Fix Bug', 'desc' => '');
$lang->misc->feature->all['12.5.stable'][] = array('title' => 'Fix Bug. Complete high priority story.', 'desc' => '');
$lang->misc->feature->all['12.4.4'][] = array('title'=>'Compatible with professional and enterprise editions', 'desc' => '');
+2
View File
@@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = 'Latest Version';
$lang->misc->feature->detailed = 'Chi tiết';
$lang->misc->releaseDate['12.5.1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
$lang->misc->releaseDate['20.0.alpha1'] = '2020-10-30';
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
@@ -139,6 +140,7 @@ $lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['20.0.alpha1'][] = array('title'=>'Add program, reset priv.', 'desc' => '');
$lang->misc->feature->all['12.5.1'][] = array('title' => 'Fix Bug', 'desc' => '');
$lang->misc->feature->all['12.5.stable'][] = array('title' => 'Fix Bug. Complete high priority story.', 'desc' => '');
$lang->misc->feature->all['12.4.4'][] = array('title'=>'Compatible with professional and enterprise editions', 'desc' => '');
+2
View File
@@ -87,6 +87,7 @@ $lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '详情';
$lang->misc->releaseDate['20.0.beta1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
$lang->misc->releaseDate['20.0.alpha1'] = '2020-10-30';
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
@@ -141,6 +142,7 @@ $lang->misc->releaseDate['6.3.stable'] = '2014-11-07';
$lang->misc->feature->all['20.0.beta1'][] = array('title'=>'禅道20beta版本,修复bug,完善细节', 'desc' => '');
$lang->misc->feature->all['20.0.alpha1'][] = array('title'=>'禅道20版本大更新,重构导航,增加瀑布模型', 'desc' => '<p>增加项目集和项目概念</p><p>将原项目概念变为迭代或阶段概念</p><p>增加瀑布开发模板</p>');
$lang->misc->feature->all['12.5.1'][] = array('title' => '修复漏洞。', 'desc' => '');
$lang->misc->feature->all['12.5.stable'][] = array('title' => '解决bug,完成高优先级需求。', 'desc' => '');
$lang->misc->feature->all['12.4.4'][] = array('title'=>'兼容专业版和企业版', 'desc' => '');
+2
View File
@@ -86,6 +86,7 @@ $lang->misc->feature = new stdclass();
$lang->misc->feature->lastest = '最新版本';
$lang->misc->feature->detailed = '詳情';
$lang->misc->releaseDate['12.5.1'] = '2020-11-30';
$lang->misc->releaseDate['12.5.stable'] = '2020-11-19';
$lang->misc->releaseDate['12.4.4'] = '2020-10-30';
$lang->misc->releaseDate['12.4.3'] = '2020-10-13';
@@ -136,6 +137,7 @@ $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['12.5.1'][] = array('title' => '修復漏洞。', 'desc' => '');
$lang->misc->feature->all['12.5.stable'][] = array('title' => '解決bug,完成高優先順序需求。', 'desc' => '');
$lang->misc->feature->all['12.4.4'][] = array('title' => '兼容專業版和企業版', 'desc' => '');
+58
View File
@@ -60,4 +60,62 @@ class miscModel extends model
}
return $remind;
}
/**
* Check one click package.
*
* @access public
* @return array
*/
public function checkOneClickPackage()
{
$weakSites = array();
if(strpos('|/zentao/|/pro/|/biz/|', "|{$this->config->webRoot}|") !== false)
{
$databases = array('zentao' => 'zentao', 'zentaopro' => 'zentaopro', 'zentaobiz' => 'zentaobiz', 'zentaoep' => 'zentaoep');
if($this->config->webRoot == '/zentao/') unset($databases['zentao']);
if($this->config->webRoot == '/pro/') unset($databases['zentaopro']);
if($this->config->webRoot == '/biz/')
{
unset($databases['zentaobiz']);
unset($databases['zentaoep']);
}
$basePath = dirname($this->app->getBasePath());
foreach($databases as $database)
{
$zentaoDirName = $database;
if(!is_dir($basePath . '/' . $zentaoDirName))
{
if($zentaoDirName == 'zentaobiz' and !is_dir($basePath . '/zentaoep')) continue;
if($zentaoDirName == 'zentaoep' and !is_dir($basePath . '/zentaobiz')) continue;
if($zentaoDirName == 'zentao' or $zentaoDirName == 'zentaopro') continue;
if($zentaoDirName == 'zentaobiz') $zentaoDirName = 'zentaoep';
if($zentaoDirName == 'zentaoep') $zentaoDirName = 'zentaobiz';
}
try
{
$webRoot = "/{$database}/";
if($database == 'zentao') $webRoot = '/zentao/';
if($database == 'zentaopro') $webRoot = '/pro/';
if($database == 'zentaobiz') $webRoot = '/biz/';
if($database == 'zentaoep') $webRoot = '/biz/';
$user = $this->dbh->query("select * from {$database}.`zt_user` where account = 'admin' and password='" . md5('123456') . "'")->fetch();
if($user)
{
$site = array();
$site['path'] = basename($basePath) . '/' . $zentaoDirName;
$site['database'] = $database;
$weakSites[$database] = $site;
}
}
catch(Exception $e){}
}
}
return $weakSites;
}
}
+9 -5
View File
@@ -71,7 +71,7 @@ class my extends control
* My todos.
*
* @param string $type
* @param string $account
* @param int $userID
* @param string $status
* @param int $recTotal
* @param int $recPerPage
@@ -79,7 +79,7 @@ class my extends control
* @access public
* @return void
*/
public function todo($type = 'all', $account = '', $status = 'all', $orderBy = "date_desc,status,begin", $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function todo($type = 'all', $userID = '', $status = 'all', $orderBy = "date_desc,status,begin", $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
$uri = $this->app->getURI(true);
@@ -95,6 +95,10 @@ class my extends control
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
$pager = pager::init($recTotal, $recPerPage, $pageID);
if(empty($userID)) $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
/* The title and position. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->todo;
$this->view->position[] = $this->lang->my->todo;
@@ -110,6 +114,7 @@ class my extends control
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
$this->view->status = $status;
$this->view->user = $user;
$this->view->account = $this->app->user->account;
$this->view->orderBy = $orderBy == 'date_desc,status,begin,id_desc' ? '' : $orderBy;
$this->view->pager = $pager;
@@ -620,10 +625,9 @@ class my extends control
* My dynamic.
*
* @param string $type
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param string $date
* @param string $direction next|pre
* @access public
* @return void
*/
+4 -4
View File
@@ -18,7 +18,7 @@
<?php foreach($lang->todo->periods as $period => $label):?>
<?php
$vars = "date=$period";
if($period == 'before') $vars .= "&account={$app->user->account}&status=undone";
if($period == 'before') $vars .= "&userID={$app->user->id}&status=undone";
$label = "<span class='text'>$label</span>";
$active = '';
if($period == $type)
@@ -35,7 +35,7 @@
</div>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::hasPriv('todo', 'export')) echo html::a(helper::createLink('todo', 'export', "account=$account&orderBy=$orderBy", 'html', true), "<i class='icon-export muted'> </i> " . $lang->todo->export, '', "class='btn btn-link export'");?>
<?php if(common::hasPriv('todo', 'export')) echo html::a(helper::createLink('todo', 'export', "userID={$user->id}&orderBy=$orderBy", 'html', true), "<i class='icon-export muted'> </i> " . $lang->todo->export, '', "class='btn btn-link export'");?>
<?php common::printLink('todo', 'batchCreate', '', "<i class='icon icon-plus'></i> " . $lang->todo->batchCreate, '', "id='batchCreate' class='btn btn-secondary iframe' data-width='80%'", '', 'true');?>
<?php common::printLink('todo', 'create', '', "<i class='icon icon-plus'></i> " . $lang->todo->create, '', "id='create' class='btn btn-primary iframe' data-width='80%'", '', 'true');?>
</div>
@@ -60,7 +60,7 @@
$canbatchAction = ($type != 'cycle' and ($canBatchEdit or $canBatchFinish or $canBatchClose or (common::hasPriv('todo', 'import2Today') and $importFuture)));
?>
<table class="table has-sort-head" id='todoList'>
<?php $vars = "type=$type&account=$account&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php $vars = "type=$type&userID={$user->id}&status=$status&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class="w-100px">
@@ -142,7 +142,7 @@
<?php
if($canBatchEdit)
{
$actionLink = $this->createLink('todo', 'batchEdit', "from=myTodo&type=$type&account=$account&status=$status");
$actionLink = $this->createLink('todo', 'batchEdit', "from=myTodo&type=$type&userID={$user->id}&status=$status");
echo html::commonButton($lang->edit, "onclick=\"setFormAction('$actionLink')\"");
}
if($canBatchFinish)
+15 -6
View File
@@ -559,11 +559,12 @@ class product extends control
/**
* Product dynamic.
*
* @param int $productID
* @param string $type
* @param string $orderBy
* @param string $param
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param string $date
* @param string $direction next|pre
* @access public
* @return void
*/
@@ -593,7 +594,12 @@ class product extends control
$pager = new pager($recTotal, $recPerPage = 50, $pageID = 1);
/* Set the user and type. */
$account = $type == 'account' ? $param : 'all';
$account = 'all';
if($type == 'account')
{
$user = $this->loadModel('user')->getById((int)$param, 'id');
if($user) $account = $user->account;
}
$period = $type == 'account' ? 'all' : $type;
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, $productID, 'all', $date, $direction);
@@ -605,12 +611,15 @@ class product extends control
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, $type);
$this->view->userIdPairs = $this->loadModel('user')->getPairs('noletter|nodeleted|noclosed|useid');
$this->view->accountPairs = $this->user->getPairs('noletter|nodeleted|noclosed');
/* Assign. */
$this->view->productID = $productID;
$this->view->type = $type;
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted|noclosed');
$this->view->account = $account;
$this->view->orderBy = $orderBy;
$this->view->account = $account;
$this->view->user = isset($user) ? $user : '';
$this->view->param = $param;
$this->view->pager = $pager;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
+8 -8
View File
@@ -27,9 +27,9 @@
<?php endforeach;?>
<div class="btn-group">
<?php
$withSearch = count($users) > 8;
$withSearch = count($accountPairs) > 8;
$active = $param ? 'btn-active-text' : '';
$current = $param ? zget($users, $param, $param) : $lang->product->viewByUser;
$current = $param ? zget($accountPairs, $account) : $lang->product->viewByUser;
$current = "<span class='text'>" . $current . '</span>' . ' <span class="caret"></span>';
?>
<?php echo html::a('###', $current, '', "class='btn btn-link $active' data-toggle='dropdown'");?>
@@ -43,12 +43,12 @@
<?php endif;?>
<div class='list-group'>
<?php
$usersPinYin = common::convert2Pinyin($users);
foreach($users as $account => $name)
$usersPinYin = common::convert2Pinyin($userIdPairs);
foreach($userIdPairs as $userID => $name)
{
if(!$account) continue;
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $account, '') . '"') : '';
echo html::a($this->createLink('product', 'dynamic', "productID=$productID&type=account&param=$account"), $name, '', $searchKey);
if(!$userID) continue;
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $userID, '') . '"') : '';
echo html::a($this->createLink('product', 'dynamic', "productID=$productID&type=account&param=$userID"), $name, '', $searchKey);
}
?>
</div>
@@ -82,7 +82,7 @@
<div>
<span class="timeline-tag"><?php echo $action->time?></span>
<span class="timeline-text">
<?php echo zget($users, $action->actor);?>
<?php echo zget($accountPairs, $action->actor);?>
<span class='label-action'><?php echo ' ' . $action->actionLabel;?></span>
<span class="text"><?php echo $action->objectLabel;?></span>
<span class="label label-id"><?php echo $action->objectID;?></span>
+35 -29
View File
@@ -2069,38 +2069,36 @@ class project extends control
* Unlink a memeber.
*
* @param int $projectID
* @param string $account
* @param int $userID
* @param string $confirm yes|no
* @access public
* @return void
*/
public function unlinkMember($projectID, $account, $confirm = 'no')
public function unlinkMember($projectID, $userID, $confirm = 'no')
{
if($confirm == 'no')
{
die(js::confirm($this->lang->project->confirmUnlinkMember, $this->inlink('unlinkMember', "projectID=$projectID&account=$account&confirm=yes")));
}
else
{
$this->project->unlinkMember($projectID, $account);
if($confirm == 'no') die(js::confirm($this->lang->project->confirmUnlinkMember, $this->inlink('unlinkMember', "projectID=$projectID&userID=$userID&confirm=yes")));
/* if ajax request, send result. */
if($this->server->ajax)
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$this->project->unlinkMember($projectID, $account);
/* if ajax request, send result. */
if($this->server->ajax)
{
if(dao::isError())
{
if(dao::isError())
{
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
else
{
$response['result'] = 'success';
$response['message'] = '';
}
$this->send($response);
$response['result'] = 'fail';
$response['message'] = dao::getError();
}
die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent'));
else
{
$response['result'] = 'success';
$response['message'] = '';
}
$this->send($response);
}
die(js::locate($this->inlink('team', "projectID=$projectID"), 'parent'));
}
/**
@@ -2272,11 +2270,12 @@ class project extends control
/**
* Project dynamic.
*
* @param int $projectID
* @param string $type
* @param string $orderBy
* @param string $param
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param string $date
* @param string $direction next|pre
* @access public
* @return void
*/
@@ -2317,7 +2316,12 @@ class project extends control
$pager = new pager($recTotal, $recPerPage = 50, $pageID = 1);
/* Set the user and type. */
$account = $type == 'account' ? $param : 'all';
$account = 'all';
if($type == 'account')
{
$user = $this->loadModel('user')->getById((int)$param, 'id');
if($user) $account = $user->account;
}
$period = $type == 'account' ? 'all' : $type;
$date = empty($date) ? '' : date('Y-m-d', $date);
$actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', $projectID, $date, $direction);
@@ -2328,13 +2332,15 @@ class project extends control
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
$this->view->position[] = $this->lang->project->dynamic;
$this->view->userIdPairs = $this->loadModel('user')->getPairs('noletter|nodeleted|useid');
$this->view->accountPairs = $this->user->getPairs('noletter|nodeleted');
/* Assign. */
$this->view->projectID = $projectID;
$this->view->type = $type;
$this->view->users = $this->loadModel('user')->getPairs('noletter|nodeleted');
$this->view->account = $account;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->account = $account;
$this->view->param = $param;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $type);
$this->view->direction = $direction;
+8 -7
View File
@@ -2200,7 +2200,7 @@ class projectModel extends model
$project = $this->getByID($projectID);
if(empty($project)) return array();
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, t2.id as userID, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.root')->eq((int)$projectID)
->andWhere('t1.type')->eq($project->type)
@@ -2225,24 +2225,25 @@ class projectModel extends model
$project = $this->getByID($projectID);
if(empty($project)) return array();
$users = $this->dao->select('t1.account, t2.realname')->from(TABLE_TEAM)->alias('t1')
$keyField = strpos($params, 'useid') !== false ? 'id' : 'account';
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
->where('t1.root')->eq((int)$projectID)
->andWhere('t1.type')->eq($project->type)
->beginIF($params == 'nodeleted' or empty($this->config->user->showDeleted))
->andWhere('t2.deleted')->eq(0)
->fi()
->fetchPairs();
->fetchAll($keyField);
if($usersToAppended) $users += $this->dao->select('account, realname')->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchPairs();
if($usersToAppended) $users += $this->dao->select("id, account, realname")->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchPairs($keyField);
if(!$users) return array('' => '');
foreach($users as $account => $realName)
foreach($users as $account => $user)
{
$firstLetter = ucfirst(substr($account, 0, 1)) . ':';
$firstLetter = ucfirst(substr($user->account, 0, 1)) . ':';
if(!empty($this->config->isINT)) $firstLetter = '';
$users[$account] = $firstLetter . ($realName ? $realName : $account);
$users[$account] = $firstLetter . ($user->realname ? $user->realname : $user->account);
}
return array('' => '') + $users;
}
+8 -8
View File
@@ -27,9 +27,9 @@
<?php endforeach;?>
<div class="btn-group">
<?php
$withSearch = count($users) > 8;
$withSearch = count($accountPairs) > 8;
$active = $param ? 'btn-active-text' : '';
$current = $param ? zget($users, $param, $param) : $lang->project->viewByUser;
$current = $param ? zget($accountPairs, $account, $account) : $lang->project->viewByUser;
$current = "<span class='text'>" . $current . '</span>' . ' <span class="caret"></span>';
?>
<?php echo html::a('###', $current, '', "class='btn btn-link $active' data-toggle='dropdown'");?>
@@ -43,12 +43,12 @@
<?php endif;?>
<div class='list-group'>
<?php
$usersPinYin = common::convert2Pinyin($users);
foreach($users as $account => $name)
$usersPinYin = common::convert2Pinyin($userIdPairs);
foreach($userIdPairs as $userID => $name)
{
if(!$account) continue;
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $account, '') . '"') : '';
echo html::a($this->createLink('project', 'dynamic', "productID=$projectID&type=account&param=$account"), $name);
if(!$userID) continue;
$searchKey = $withSearch ? ('data-key="' . zget($usersPinYin, $userID, '') . '"') : '';
echo html::a($this->createLink('project', 'dynamic', "productID=$projectID&type=account&param=$userID"), $name);
}
?>
</div>
@@ -83,7 +83,7 @@
<div>
<span class="timeline-tag"><?php echo $action->time?></span>
<span class="timeline-text">
<?php echo zget($users, $action->actor);?>
<?php echo zget($accountPairs, $action->actor);?>
<span class='label-action'><?php echo ' ' . $action->actionLabel;?></span>
<span class="text"><?php echo $action->objectLabel;?></span>
<span class="label label-id"><?php echo $action->objectID;?></span>
+2 -2
View File
@@ -66,7 +66,7 @@
<tr>
<td>
<?php
if(!common::printLink('user', 'view', "account=$member->account", $member->realname)) print $member->realname;
if(!common::printLink('user', 'view', "userID={$member->userID}", $member->realname)) print $member->realname;
$memberHours = $member->days * $member->hours;
$totalHours += $memberHours;
?>
@@ -82,7 +82,7 @@
<?php
if (common::hasPriv('project', 'unlinkMember', $member))
{
$unlinkURL = $this->createLink('project', 'unlinkMember', "projectID=$project->id&account=$member->account&confirm=yes");
$unlinkURL = $this->createLink('project', 'unlinkMember', "projectID=$project->id&userID=$member->userID&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"mainContent\", confirmUnlinkMember)", '<i class="icon-green-project-unlinkMember icon-unlink"></i>', '', "class='btn' title='{$lang->project->unlinkMember}'");
}
?>
+1 -1
View File
@@ -1,4 +1,3 @@
.checkbox.btn{margin-top:0px}
#releaseInfo > div {padding-top: 15px;}
@@ -9,3 +8,4 @@
#tabsNav .nav-tabs > li.pull-right {margin-right: 120px; margin-top: -5px}
#tabsNav .nav-tabs > li.active + li.pull-right {margin-right: 0;}
ol, ul { padding-left: 20px; }
.c-id {overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
+1 -1
View File
@@ -172,7 +172,7 @@
<?php $vars = "releaseID={$release->id}&type=bug&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<th class='c-id text-left w-110px'>
<?php if($canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
+3 -3
View File
@@ -298,7 +298,7 @@ class repo extends control
$oldRevision = isset($this->post->revision[1]) ? $this->post->revision[1] : '';
$newRevision = isset($this->post->revision[0]) ? $this->post->revision[0] : '';
$this->locate( $this->repo->createLink('diff', "repoID=$repoID&entry=" . $this->repo->encodePath(urldecode($path)) . "&oldrevision=$oldRevision&newRevision=$newRevision"));
$this->locate($this->repo->createLink('diff', "repoID=$repoID&entry=&oldrevision=$oldRevision&newRevision=$newRevision", "path=" . $this->repo->encodePath($path)));
}
/* Cache infos. */
@@ -405,7 +405,7 @@ class repo extends control
$oldRevision = isset($this->post->revision[1]) ? $this->post->revision[1] : '';
$newRevision = isset($this->post->revision[0]) ? $this->post->revision[0] : '';
$this->locate( $this->repo->createLink('diff', "repoID=$repoID&entry=" . $this->repo->encodePath(urldecode($path)) . "&oldrevision=$oldRevision&newRevision=$newRevision"));
$this->locate($this->repo->createLink('diff', "repoID=$repoID&entry=&oldrevision=$oldRevision&newRevision=$newRevision", "entry=" . $this->repo->encodePath($path)));
}
$this->scm->setEngine($repo);
@@ -605,7 +605,7 @@ class repo extends control
}
if($this->post->encoding) $encoding = $this->post->encoding;
$this->locate( $this->repo->createLink('diff', "repoID=$repoID&entry=$entry&oldrevision=$oldRevision&newRevision=$newRevision&showBug=&encoding=$encoding"));
$this->locate($this->repo->createLink('diff', "repoID=$repoID&entry=&oldrevision=$oldRevision&newRevision=$newRevision&showBug=&encoding=$encoding", 'entry=' . $this->repo->encodePath($entry)));
}
$this->scm->setEngine($repo);
+1 -1
View File
@@ -12,7 +12,7 @@
include '../../common/view/header.html.php';
include '../../common/view/form.html.php';
include '../../common/view/kindeditor.html.php';
css::import($jsRoot . 'misc/highlight/styles/github.css');
css::import($jsRoot . 'misc/highlight/styles/code.css');
js::import($jsRoot . 'misc/highlight/highlight.pack.js');
$encodePath = $this->repo->encodePath($entry);
$version = " <span class=\"label label-info\">$revisionName</span>";
+7 -5
View File
@@ -1273,7 +1273,7 @@ class story extends control
$this->executeHooks($storyID);
if(isonlybody()) die(js::closeModal('parent.parent', 'this'));
if(isonlybody()) die(js::closeModal('parent.parent', 'this', 'function(){parent.parent.$(\'[data-ride="searchList"]\').searchList();}'));
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
}
@@ -1995,15 +1995,17 @@ class story extends control
/**
* AJAX: get storys of a user in html select.
*
* @param string $account
* @param int $userID
* @param string $id the id of the select control.
* @access public
* @return string
*/
public function ajaxGetUserStorys($account = '', $id = '')
public function ajaxGetUserStorys($userID = '', $id = '')
{
if($account == '') $account = $this->app->user->account;
$storys = $this->story->getUserStoryPairs($account);
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$storys = $this->story->getUserStoryPairs($account);
if($id) die(html::select("storys[$id]", $storys, '', 'class="form-control"'));
die(html::select('story', $storys, '', 'class=form-control'));
+6 -3
View File
@@ -1252,15 +1252,18 @@ class task extends control
/**
* AJAX: return tasks of a user in html select.
*
* @param string $account
* @param int $userID
* @param string $id
* @param string $status
* @access public
* @return string
*/
public function ajaxGetUserTasks($account = '', $id = '', $status = 'wait,doing')
public function ajaxGetUserTasks($userID = '', $id = '', $status = 'wait,doing')
{
if($account == '') $account = $this->app->user->account;
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$tasks = $this->task->getUserTaskPairs($account, $status);
if($id) die(html::select("tasks[$id]", $tasks, '', 'class="form-control"'));
+1
View File
@@ -1,4 +1,5 @@
.chosen-container[id^="story"] {width: 200px; max-width: 150px;}
select[id^="story"] + .picker-single {width: 130px; max-width: 130px;}
[id^=name] {min-width: 165px;}
#mainContent .main-header h2{max-width:300px}
+12 -5
View File
@@ -1127,7 +1127,7 @@ class taskModel extends model
$task->left = 0;
if(!$task->finishedBy) $task->finishedBy = $this->app->user->account;
if($task->closedReason) $task->closedDate = $now;
$task->finishedDate = $oldTask->status == 'done' ? $oldTask->finishedDate : $now;
$task->finishedDate = $oldTask->status == 'done' ? $oldTask->finishedDate : $now;
$task->canceledBy = '';
$task->canceledDate = '';
@@ -1136,15 +1136,22 @@ class taskModel extends model
$task->assignedTo = $oldTask->openedBy;
$task->assignedDate = $now;
if(!$task->canceledBy) $task->canceledBy = $this->app->user->account;
if(!$task->canceledDate) $task->canceledDate = $now;
if(!$task->canceledBy)
{
$task->canceledBy = $this->app->user->account;
$task->canceledDate = $now;
}
$task->finishedBy = '';
$task->finishedDate = '';
break;
case 'closed':
if(!$task->closedBy) $task->closedBy = $this->app->user->account;
if(!$task->closedDate) $task->closedDate = $now;
if(!$task->closedBy)
{
$task->closedBy = $this->app->user->account;
$task->closedDate = $now;
}
if($task->closedReason == 'cancel' and $task->finishedDate == '0000-00-00 00:00:00') $task->finishedDate = '';
break;
case 'wait':
if($task->consumed > 0 and $task->left > 0) $task->status = 'doing';
+24 -1
View File
@@ -135,7 +135,30 @@
<td class='text-left<?php echo zget($visibleFields, 'finishedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("finishedBys[$taskID]", $members, $tasks[$taskID]->finishedBy, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'canceledBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("canceledBys[$taskID]", $members, $tasks[$taskID]->canceledBy, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'closedBy', ' hidden')?>' style='overflow:visible'><?php echo html::select("closedBys[$taskID]", $members, $tasks[$taskID]->closedBy, "class='form-control chosen'");?></td>
<td <?php echo zget($visibleFields, 'closedReason', "class='hidden'")?>><?php echo html::select("closedReasons[$taskID]", $lang->task->reasonList, $tasks[$taskID]->closedReason, 'class=form-control');?></td>
<td <?php echo zget($visibleFields, 'closedReason', "class='hidden'")?>>
<?php
$reasonList[''] = '';
$closedReason = $tasks[$taskID]->closedReason;
if(!empty($closedReason))
{
$reasonList[$closedReason] = $lang->task->reasonList[$closedReason];
}
else
{
$status = $tasks[$taskID]->status;
if($status == 'done' or $status == 'cancel')
{
$reasonList[$status] = $lang->task->reasonList[$status];
}
else
{
$reasonList = $lang->task->reasonList;
}
}
echo html::select("closedReasons[$taskID]", $reasonList, $closedReason, 'class=form-control');
?>
</td>
<?php foreach($extendFields as $extendField) echo "<td" . (($extendField->control == 'select' or $extendField->control == 'multi-select') ? " style='overflow:visible'" : '') . ">" . $this->loadModel('flow')->getFieldControl($extendField, $tasks[$taskID], $extendField->field . "[{$taskID}]") . "</td>";?>
</tr>
<?php endforeach;?>
+1
View File
@@ -12,6 +12,7 @@ tbody > tr > td .icon-share{font-size: 9px;}
.table-footer .table-actions .input-group #assignedTo_chosen .chosen-single div{line-height:10px;}
td.c-story{overflow: hidden; text-overflow:ellipsis; white-space: nowrap;}
td .warning{color: red;}
#modules .active{font-weight: bolder;}
.fail .result-fail, .blocked .result-blocked{color:#f00;}
.pass .result-pass{color:green;}
+21 -12
View File
@@ -30,14 +30,18 @@ class todo extends control
* Create a todo.
*
* @param string|date $date
* @param string $account
* @param int $userID
* @access public
* @return void
*/
public function create($date = 'today', $account = '', $from = 'todo')
public function create($date = 'today', $userID = '', $from = 'todo')
{
if($date == 'today') $date = date::today();
if($account == '') $account = $this->app->user->account;
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
if(!empty($_POST))
{
$todoID = $this->todo->create($date, $account);
@@ -65,7 +69,7 @@ class todo extends control
if($this->app->getViewType() == 'xhtml') die(js::locate($this->createLink('todo', 'view', "todoID=$todoID"), 'parent'));
if(isonlybody()) die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent.parent'));
die(js::locate($this->createLink('my', 'todo', "type=all&account=&status=all&orderBy=id_desc"), 'parent'));
die(js::locate($this->createLink('my', 'todo', "type=all&userID=&status=all&orderBy=id_desc"), 'parent'));
}
unset($this->lang->todo->typeList['cycle']);
@@ -82,11 +86,10 @@ class todo extends control
* Batch create todo
*
* @param string $date
* @param string $account
* @access public
* @return void
*/
public function batchCreate($date = 'today', $account = '')
public function batchCreate($date = 'today')
{
if($date == 'today') $date = date(DT_DATE1, time());
if(!empty($_POST))
@@ -164,12 +167,12 @@ class todo extends control
*
* @param string $from example:myTodo, todoBatchEdit.
* @param string $type
* @param string $account
* @param int $userID
* @param string $status
* @access public
* @return void
*/
public function batchEdit($from = '', $type = 'today', $account = '', $status = 'all')
public function batchEdit($from = '', $type = 'today', $userID = '', $status = 'all')
{
/* Get form data for my-todo. */
if($from == 'myTodo')
@@ -179,7 +182,10 @@ class todo extends control
$todoIDList = array();
$columns = 7;
if($account == '') $account = $this->app->user->account;
if($userID == '') $userID = $this->app->user->id;
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$bugs = $this->bug->getUserBugPairs($account);
$tasks = $this->task->getUserTaskPairs($account, $status);
$storys = $this->loadModel('story')->getUserStoryPairs($account);
@@ -356,7 +362,6 @@ class todo extends control
{
$this->lang->todo->menu = $this->lang->user->menu;
$this->lang->todo->menuOrder = $this->lang->user->menuOrder;
$this->user->setMenu($this->user->getPairs(), $todo->account);
$this->lang->company->menu->browseUser['subModule'] = 'todo';
$this->lang->set('menugroup.todo', $from);
}
@@ -377,6 +382,7 @@ class todo extends control
$this->view->todo = $todo;
$this->view->times = date::buildTimeList($this->config->todo->times->begin, $this->config->todo->times->end, $this->config->todo->times->delta);
$this->view->users = $this->user->getPairs('noletter');
$this->view->user = $this->user->getById($todo->account);
$this->view->actions = $this->loadModel('action')->getList('todo', $todoID);
$this->view->from = $from;
$this->view->projects = $projects;
@@ -507,15 +513,18 @@ class todo extends control
/**
* Get data to export
*
* @param string $productID
* @param int $userID
* @param string $orderBy
* @access public
* @return void
*/
public function export($account, $orderBy)
public function export($userID, $orderBy)
{
if($_POST)
{
$user = $this->loadModel('user')->getById($userID, 'id');
$account = $user->account;
$todoLang = $this->lang->todo;
$todoConfig = $this->config->todo;
+1 -1
View File
@@ -23,7 +23,7 @@ function loadList(type, id)
divID = '#nameBox';
}
var param = 'account=' + account;
var param = 'userID=' + userID;
if(id) param += '&id=' + id;
if(type == 'bug')
{
+1 -1
View File
@@ -1,2 +1,2 @@
<?php js::set('account', $app->user->account)?>
<?php js::set('userID', $app->user->id)?>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -52,7 +52,7 @@
}
else
{
$browseLink = $this->createLink('user', 'todo', "account=$todo->account");
$browseLink = $this->createLink('user', 'todo', "userID=$user->id");
}
if($this->app->user->admin or ($this->app->user->account == $todo->account) or ($this->app->user->account == $todo->assignedTo))
+1
View File
@@ -130,4 +130,5 @@ $lang->upgrade->fromVersions['12_4_2'] = '12.4.2';
$lang->upgrade->fromVersions['12_4_3'] = '12.4.3';
$lang->upgrade->fromVersions['12_4_4'] = '12.4.4';
$lang->upgrade->fromVersions['12_5'] = '12.5';
$lang->upgrade->fromVersions['12_5_1'] = '12.5.1';
$lang->upgrade->fromVersions['20_0_alpha1'] = '20.0.alpha1';
+4
View File
@@ -626,6 +626,9 @@ class upgradeModel extends model
case '12_5':
$this->saveLogs('Execute 12_5');
$this->appendExec('12_5');
case '12_5_1':
$this->saveLogs('Execute 12_5_1');
$this->appendExec('12_5_1');
case '20_0_alpha':
$this->saveLogs('Execute 20_0_alpha');
$this->execSQL($this->getUpgradeFile('20.0.alpha'));
@@ -822,6 +825,7 @@ class upgradeModel extends model
case '12_4_3':
case '12_4_4': $confirmContent .= file_get_contents($this->getUpgradeFile('12.4.4'));
case '12_5':
case '12_5_1':
case '20_0_alpha' : $confirmContent .= file_get_contents($this->getUpgradeFile('20.0.alpha'));
case '20_0_alpha1': $confirmContent .= file_get_contents($this->getUpgradeFile('20.0.alpha1'));
}
+80 -76
View File
@@ -31,19 +31,19 @@ class user extends control
/**
* View a user.
*
* @param string $account
* @param string $userID
* @access public
* @return void
*/
public function view($account)
public function view($userID)
{
$this->locate($this->createLink('user', 'todo', "account=$account"));
$this->locate($this->createLink('user', 'todo', "userID=$userID"));
}
/**
* Todos of a user.
*
* @param string $account
* @param string $userID
* @param string $type the todo type, today|lastweek|thisweek|all|undone, or a date.
* @param string $status
* @param string $orderBy
@@ -53,7 +53,7 @@ class user extends control
* @access public
* @return void
*/
public function todo($account, $type = 'today', $status = 'all', $orderBy='date,status,begin', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function todo($userID, $type = 'today', $status = 'all', $orderBy='date,status,begin', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Set thie url to session. */
$uri = $this->app->getURI(true);
@@ -69,14 +69,14 @@ class user extends control
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Get user, totos. */
$user = $this->user->getById($account);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
$todos = $this->todo->getList($type, $account, $status, 0, $pager, $sort);
$date = (int)$type == 0 ? helper::today() : $type;
/* set menus. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->todo;
$this->view->position[] = $this->lang->user->todo;
@@ -84,7 +84,6 @@ class user extends control
$this->view->date = $date;
$this->view->todos = $todos;
$this->view->user = $user;
$this->view->account = $account;
$this->view->type = $type;
$this->view->status = $status;
$this->view->orderBy = $orderBy;
@@ -96,7 +95,7 @@ class user extends control
/**
* Story of a user.
*
* @param string $account
* @param int $userID
* @param string $type
* @param int $recTotal
* @param int $recPerPage
@@ -104,7 +103,7 @@ class user extends control
* @access public
* @return void
*/
public function story($account, $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function story($userID, $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session. */
$this->session->set('storyList', $this->app->getURI(true));
@@ -113,9 +112,11 @@ class user extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* Set menu. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
/* Assign. */
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->story;
@@ -123,9 +124,9 @@ class user extends control
$this->view->stories = $this->loadModel('story')->getUserStories($account, $type, 'id_desc', $pager);
$this->view->users = $this->user->getPairs('noletter');
$this->view->type = $type;
$this->view->account = $account;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->view->pager = $pager;
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
$this->display();
}
@@ -133,7 +134,7 @@ class user extends control
/**
* Tasks of a user.
*
* @param string $account
* @param int $userID
* @param string $type
* @param int $recTotal
* @param int $recPerPage
@@ -141,7 +142,7 @@ class user extends control
* @access public
* @return void
*/
public function task($account, $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function task($userID, $type = 'assignedTo', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save the session. */
$this->session->set('taskList', $this->app->getURI(true));
@@ -150,9 +151,12 @@ class user extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* Set the menu. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
/* Assign. */
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task;
@@ -160,8 +164,7 @@ class user extends control
$this->view->tabID = 'task';
$this->view->tasks = $this->loadModel('task')->getUserTasks($account, $type, 0, $pager);
$this->view->type = $type;
$this->view->account = $account;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->view->pager = $pager;
$this->display();
@@ -170,7 +173,7 @@ class user extends control
/**
* User bugs.
*
* @param string $account
* @param int $userID
* @param string $type
* @param string $orderBy
* @param int $recTotal
@@ -179,7 +182,7 @@ class user extends control
* @access public
* @return void
*/
public function bug($account, $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function bug($userID, $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save the session. */
$this->session->set('bugList', $this->app->getURI(true));
@@ -188,9 +191,12 @@ class user extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* Set menu. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
/* Load the lang of bug module. */
$this->app->loadLang('bug');
@@ -199,9 +205,8 @@ class user extends control
$this->view->position[] = $this->lang->user->bug;
$this->view->tabID = 'bug';
$this->view->bugs = $this->loadModel('bug')->getUserBugs($account, $type, $orderBy, 0, $pager);
$this->view->account = $account;
$this->view->type = $type;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->view->users = $this->user->getPairs('noletter');
$this->view->pager = $pager;
@@ -211,7 +216,7 @@ class user extends control
/**
* User's testtask
*
* @param string $account
* @param int $userID
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
@@ -219,15 +224,18 @@ class user extends control
* @access public
* @return void
*/
public function testtask($account, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function testtask($userID, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* Set menu. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
/* Save session. */
$this->session->set('testtaskList', $this->app->getURI(true));
@@ -241,8 +249,7 @@ class user extends control
$this->view->position[] = $this->lang->user->testTask;
$this->view->tasks = $this->loadModel('testtask')->getByUser($account, $pager, $sort);
$this->view->users = $this->user->getPairs('noletter');
$this->view->account = $account;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->view->recTotal = $recTotal;
$this->view->recPerPage = $recPerPage;
$this->view->pageID = $pageID;
@@ -254,6 +261,7 @@ class user extends control
/**
* User's test case.
*
* @param int $userID
* @param string $type
* @param string $orderBy
* @param int $recTotal
@@ -262,7 +270,7 @@ class user extends control
* @access public
* @return void
*/
public function testcase($account, $type = 'case2Him', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
public function testcase($userID, $type = 'case2Him', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
{
/* Save session, load lang. */
$this->session->set('caseList', $this->app->getURI(true));
@@ -272,12 +280,14 @@ class user extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
/* Set menu. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
$cases = array();
if($type == 'case2Him')
@@ -293,8 +303,7 @@ class user extends control
/* Assign. */
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->testCase;
$this->view->position[] = $this->lang->user->testCase;
$this->view->account = $account;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->view->cases = $cases;
$this->view->users = $this->user->getPairs('noletter');
$this->view->tabID = 'test';
@@ -304,6 +313,7 @@ class user extends control
$this->view->pageID = $pageID;
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
$this->display();
}
@@ -311,23 +321,25 @@ class user extends control
/**
* User projects.
*
* @param string $account
* @param int $userID
* @access public
* @return void
*/
public function project($account)
public function project($userID)
{
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* Set the menus. */
$this->loadModel('project');
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted'), $account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID);
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->project;
$this->view->position[] = $this->lang->user->project;
$this->view->tabID = 'project';
$this->view->projects = $this->user->getProjects($account);
$this->view->account = $account;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->display();
}
@@ -335,27 +347,25 @@ class user extends control
/**
* The profile of a user.
*
* @param string $account
* @param int $userID
* @access public
* @return void
*/
public function profile($account = '')
public function profile($userID = '')
{
if(empty($account)) $account = $this->app->user->account;
if(empty($userID)) $userID = $this->app->user->id;
/* Set menu. */
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted'), $account);
$user = $this->user->getById($account);
$user = $this->user->getById($userID, 'id');
$account = $user->account;
$this->view->title = "USER #$user->id $user->account/" . $this->lang->user->profile;
$this->view->position[] = $this->lang->user->common;
$this->view->position[] = $this->lang->user->profile;
$this->view->account = $account;
$this->view->user = $user;
$this->view->groups = $this->loadModel('group')->getByAccount($account);
$this->view->deptPath = $this->dept->getParents($user->dept);
$this->view->personalData = $this->user->getPersonalData($user->account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclose|nodeleted|useid'), $userID);
$this->display();
}
@@ -609,43 +619,35 @@ class user extends control
/**
* Unlock a user.
*
* @param int $account
* @param int $userID
* @param string $confirm
* @access public
* @return void
*/
public function unlock($account, $confirm = 'no')
public function unlock($userID, $confirm = 'no')
{
if($confirm == 'no')
{
die(js::confirm($this->lang->user->confirmUnlock, $this->createLink('user', 'unlock', "account=$account&confirm=yes")));
}
else
{
$this->user->cleanLocked($account);
die(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse'), 'parent'));
}
if($confirm == 'no') die(js::confirm($this->lang->user->confirmUnlock, $this->createLink('user', 'unlock', "userID=$userID&confirm=yes")));
$user = $this->user->getById($userID, 'id');
$this->user->cleanLocked($user->account);
die(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse'), 'parent'));
}
/**
* Unbind Ranzhi
*
* @param string $account
* @param string $userID
* @param string $confirm
* @access public
* @return void
*/
public function unbind($account, $confirm = 'no')
public function unbind($userID, $confirm = 'no')
{
if($confirm == 'no')
{
die(js::confirm($this->lang->user->confirmUnbind, $this->createLink('user', 'unbind', "account=$account&confirm=yes")));
}
else
{
$this->user->unbind($account);
die(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse'), 'parent'));
}
if($confirm == 'no') die(js::confirm($this->lang->user->confirmUnbind, $this->createLink('user', 'unbind', "userID=$userID&confirm=yes")));
$user = $this->user->getById($userID, 'id');
$this->user->unbind($user->account);
die(js::locate($this->session->userList ? $this->session->userList : $this->createLink('company', 'browse'), 'parent'));
}
@@ -816,13 +818,14 @@ class user extends control
$this->view->demoUsers = $demoUsers;
}
$this->app->loadLang('misc');
$this->loadModel('misc');
$this->view->noGDLib = sprintf($this->lang->misc->noGDLib, common::getSysURL() . $this->config->webRoot, '', false, true);
$this->view->title = $this->lang->user->login;
$this->view->referer = $this->referer;
$this->view->s = zget($this->config->global, 'sn', '');
$this->view->keepLogin = $this->cookie->keepLogin ? $this->cookie->keepLogin : 'off';
$this->view->rand = $this->user->updateSessionRandom();
$this->view->weakSites = $this->misc->checkOneClickPackage();
$this->display();
}
}
@@ -933,19 +936,21 @@ class user extends control
* User dynamic.
*
* @param string $period
* @param string $account
* @param string $orderBy
* @param int $userID
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @param string $date
* @param string $direction next|pre
* @access public
* @return void
*/
public function dynamic($period = 'today', $account = '', $recTotal = 0, $date = '', $direction = 'next')
public function dynamic($period = 'today', $userID = '', $recTotal = 0, $date = '', $direction = 'next')
{
$user = $this->user->getById($userID, 'id');
$account = $user->account;
/* set menus. */
$this->lang->set('menugroup.user', 'company');
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted'), $account);
$this->view->userList = $this->user->setUserList($this->user->getPairs('noempty|noclosed|nodeleted|useid'), $userID);
/* Save session. */
$uri = $this->app->getURI(true);
@@ -977,9 +982,8 @@ class user extends control
/* Assign. */
$this->view->type = $period;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->account = $account;
$this->view->pager = $pager;
$this->view->user = $this->user->getById($account);
$this->view->user = $user;
$this->view->dateGroups = $this->action->buildDateGroup($actions, $direction, $period);
$this->view->direction = $direction;
$this->display();
+3
View File
@@ -16,3 +16,6 @@ html[lang='en'] #loginPanel .table-form > tbody > tr > th {width: 80px;}
#langs > .dropdown-menu {min-width: 0; width: 85px;}
#logo-box img{margin-left:40px; width: 100px;}
.showNotice{color:yellow;}
.showNotice:hover{color:yellow;}
+5
View File
@@ -65,3 +65,8 @@ $(document).ready(function()
return false;
});
});
function showNotice()
{
if(typeof(process4Safe) == 'string') bootbox.alert(process4Safe)
}
+1 -1
View File
@@ -1,6 +1,6 @@
function changeDate(date)
{
location.href = createLink('user', 'todo', 'account=' + account + '&type=' + date.replace(/\-/g, ''));
location.href = createLink('user', 'todo', 'userID=' + userID + '&type=' + date.replace(/\-/g, ''));
}
$(function()
+3 -1
View File
@@ -225,4 +225,6 @@ $lang->user->noticeResetFile = "<h5>Kontaktieren Sie den Administrator um Ihr Pa
<li>Die Datei muss leer sein.</li>
<li>Wenn die Datei bereits existiert löschen Sie diese und erstellen Sie eine neue.</li>
</ol>";
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
+4 -2
View File
@@ -181,7 +181,7 @@ $lang->user->placeholder->passwordStrength[1] = '>= 6 letters and numbers';
$lang->user->placeholder->passwordStrength[2] = '>= 10 letters, numbers and special characters';
$lang->user->error = new stdclass();
$lang->user->error->account = "ID %s,account must be >= 3 letters, underline, or numbers";
$lang->user->error->account = "ID %s,account must be >= 3 letters, underline or numbers";
$lang->user->error->accountDupl = "ID %s,account is used.";
$lang->user->error->realname = "ID %s,must be real name";
$lang->user->error->password = "ID %s,password must be >= 6 characters.";
@@ -225,4 +225,6 @@ $lang->user->noticeResetFile = "<h5>Contact the Administrator to reset your pass
<li>Keep the file empty.</li>
<li>If the file exists, remove it and create it again.</li>
</ol>";
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
+3 -1
View File
@@ -225,4 +225,6 @@ $lang->user->noticeResetFile = "<h5>Contactez l'administrateur pour réinitialis
<li>Gardez ce fichier vide.</li>
<li>Si le fichier existe déjà, supprimez le et créez le à nouveau.</li><li>Bonne chance.</li>
</ol>";
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
+3 -1
View File
@@ -225,4 +225,6 @@ $lang->user->noticeResetFile = "<h5>Liên hệ quản trị viên để thiết
<li>Giữ tập tin này rỗng.</li>
<li>Nếu tập tin đã tồn tại, xóa và tạo lại.</li>
</ol>";
$lang->user->notice4Safe = "It is detected that you may be using the one click installation package environment, and other sites in the environment are still using a simple password. For security, please change the password in time. Login address of other sites: <br />%s";
$lang->user->notice4Safe = "Warning: Weak password of one click package detected";
$lang->user->process4DIR = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Delete or rename the %s directory. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
$lang->user->process4DB = "It is detected that you may be using the one click installation package environment. Other sites in the environment are still using simple passwords. For security reasons, if you do not use other sites, please handle them in time. Please login database and modify password field of zt_user table of %s database. Visit: <a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
+3 -1
View File
@@ -225,4 +225,6 @@ $lang->user->noticeResetFile = "<h5>普通用户请联系管理员重置密码</
<li>文件内容为空。</li>
<li>如果之前文件存在,删除之后重新创建。</li>
</ol>";
$lang->user->notice4Safe = "检测到您可能在使用一键安装包环境,该环境中其他站点还在用简单密码,安全起见,请及时修改密码。其他站点的登录地址:<br />%s";
$lang->user->notice4Safe = "警告:检测到一键安装包密码口令弱";
$lang->user->process4DIR = "检测到您可能在使用一键安装包环境,该环境中其他站点还在用简单密码,安全起见,如果不使用其他站点,请及时处理。将 %s 目录删除或改名。详情查看:<a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
$lang->user->process4DB = "检测到您可能在使用一键安装包环境,该环境中其他站点还在用简单密码,安全起见,如果不使用其他站点,请及时处理。请登录数据库,修改 %s 数据库的zt_user表的password字段。详情查看:<a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
+3
View File
@@ -216,3 +216,6 @@ $lang->user->noticeResetFile = "<h5>普通用戶請聯繫管理員重置密碼</
<li>檔案內容為空。</li>
<li>如果之前檔案存在,刪除之後重新創建。</li>
</ol>";
$lang->user->notice4Safe = "警告:檢測到一鍵安裝包密碼口令弱";
$lang->user->process4DIR = "檢測到您可能在使用一鍵安裝包環境,該環境中其他站點還在用簡單密碼,安全起見,如果不使用其他站點,請及時處理。將 %s 目錄刪除或改名。詳情查看:<a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
$lang->user->process4DB = "檢測到您可能在使用一鍵安裝包環境,該環境中其他站點還在用簡單密碼,安全起見,如果不使用其他站點,請及時處理。請登錄資料庫,修改 %s 資料庫的zt_user表的password欄位。詳情查看:<a href='https://www.zentao.net/book/zentaopmshelp/467.html' target='_blank'>https://www.zentao.net/book/zentaopmshelp/467.html</a>";
+10 -24
View File
@@ -13,25 +13,6 @@
<?php
class userModel extends model
{
/**
* Set the menu.
*
* @param array $users user pairs
* @param string $account current account
* @access public
* @return void
*/
public function setMenu($users, $account)
{
$methodName = $this->app->getMethodName();
$selectHtml = html::select('account', $users, $account, "onchange=\"switchAccount(this.value, '$methodName')\"");
foreach($this->lang->user->menu as $key => $value)
{
$replace = ($key == 'account') ? $selectHtml : $account;
common::setMenuVars($this->lang->user->menu, $key, $replace);
}
}
/**
* Set users list.
*
@@ -82,7 +63,7 @@ class userModel extends model
* If there's xxfirst in the params, use INSTR function to get the position of role fields in a order string,
* thus to make sure users of this role at first.
*/
$fields = 'account, realname, deleted';
$fields = 'id, account, realname, deleted';
$type = (strpos($params, 'outside') !== false) ? 'outside' : 'inside';
if(strpos($params, 'pofirst') !== false) $fields .= ", INSTR(',pd,po,', role) AS roleOrder";
if(strpos($params, 'pdfirst') !== false) $fields .= ", INSTR(',po,pd,', role) AS roleOrder";
@@ -92,6 +73,8 @@ class userModel extends model
if(strpos($params, 'devfirst')!== false) $fields .= ", INSTR(',td,pm,qd,qa,dev,', role) AS roleOrder";
$orderBy = strpos($params, 'first') !== false ? 'roleOrder DESC, account' : 'account';
$keyField = (strpos($params, 'useid')!== false) ? 'id' : "account";
/* Get raw records. */
$this->app->loadConfig('user');
unset($this->config->user->moreLink);
@@ -102,7 +85,7 @@ class userModel extends model
->beginIF(strpos($params, 'nodeleted') !== false or empty($this->config->user->showDeleted))->andWhere('deleted')->eq('0')->fi()
->orderBy($orderBy)
->beginIF($maxCount)->limit($maxCount)->fi()
->fetchAll('account');
->fetchAll($keyField);
if($maxCount and $maxCount == count($users))
{
@@ -112,14 +95,14 @@ class userModel extends model
$this->config->user->moreLink = helper::createLink('user', 'ajaxGetMore') . $connectString . "params=" . base64_encode($moreLinkParams);
}
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll('account');
if($usersToAppended) $users += $this->dao->select($fields)->from(TABLE_USER)->where('account')->in($usersToAppended)->fetchAll($keyField);
/* Cycle the user records to append the first letter of his account. */
foreach($users as $account => $user)
{
$firstLetter = ucfirst(substr($account, 0, 1)) . ':';
$firstLetter = ucfirst(substr($user->account, 0, 1)) . ':';
if(strpos($params, 'noletter') !== false or !empty($this->config->isINT)) $firstLetter = '';
$users[$account] = $firstLetter . (($user->deleted and strpos($params, 'realname') === false) ? $account : ($user->realname ? $user->realname : $account));
$users[$account] = $firstLetter . (($user->deleted and strpos($params, 'realname') === false) ? $user->account : ($user->realname ? $user->realname : $user->account));
}
/* Append empty, closed, and guest users. */
@@ -195,6 +178,9 @@ class userModel extends model
*/
public function getById($userID, $field = 'account')
{
if($field == 'id') $userID = (int)$userID;
if($field == 'account') $userID = str_replace(' ', '', $userID);
$user = $this->dao->select('*')->from(TABLE_USER)->where("`$field`")->eq($userID)->fetch();
if(!$user) return false;
$user->last = date(DT_DATETIME1, $user->last);
+4 -4
View File
@@ -19,16 +19,16 @@
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
$active = $type == 'assignedTo' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "account=$account&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
$active = $type == 'openedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "account=$account&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
$active = $type == 'resolvedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "account=$account&type=resolvedBy"), sprintf($lang->user->resolvedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=resolvedBy"), sprintf($lang->user->resolvedBy, $that)) . "</li>";
$active = $type == 'closedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('bug', "account=$account&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('bug', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
?>
</ul>
</nav>
+3 -3
View File
@@ -25,7 +25,7 @@
$active = 'btn-active-text';
$label .= " <span class='label label-light label-badge'>{$pager->recTotal}</span>";
}
echo html::a(inlink('dynamic', "type=$period&account=$account"), $label, '', "class='btn btn-link $active' id='{$period}'")
echo html::a(inlink('dynamic', "type=$period&userID={$user->id}"), $label, '', "class='btn btn-link $active' id='{$period}'")
?>
<?php endforeach;?>
</div>
@@ -76,8 +76,8 @@ $firstDate = date('Y-m-d', strtotime($firstAction->originalDate) + 24 * 3600);
$lastDate = substr($action->originalDate, 0, 10);
$hasPre = $this->action->hasPreOrNext($firstDate, 'pre');
$hasNext = $this->action->hasPreOrNext($lastDate, 'next');
$preLink = $hasPre ? inlink('dynamic', "type=$type&account=$account&recTotal={$pager->recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
$nextLink = $hasNext ? inlink('dynamic', "type=$type&account=$account&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
$preLink = $hasPre ? inlink('dynamic', "type=$type&userID={$user->id}&recTotal={$pager->recTotal}&date=" . strtotime($firstDate) . '&direction=pre') : 'javascript:;';
$nextLink = $hasNext ? inlink('dynamic', "type=$type&userID={$user->id}&recTotal={$pager->recTotal}&date=" . strtotime($lastDate) . '&direction=next') : 'javascript:;';
?>
<?php if($hasPre or $hasNext):?>
<div id="mainActions" class='main-actions'>
+1 -1
View File
@@ -18,7 +18,7 @@
<div class="main-header">
<h2>
<span class="label label-id"><?php echo $user->id;?></span>
<strong><?php if(!common::printLink('user', 'view', "account=$user->account", $user->realname)) echo $user->realname;?> <small>(<?php echo $user->account;?>)</small></strong>
<strong><?php if(!common::printLink('user', 'view', "userID=$user->id", $user->realname)) echo $user->realname;?> <small>(<?php echo $user->account;?>)</small></strong>
<small><?php echo $lang->arrow . $lang->user->edit;?></small>
</h2>
</div>
+8 -8
View File
@@ -10,35 +10,35 @@
$label = "<span class='text'>{$lang->user->schedule}</span>";
$active = $methodName == 'todo' ? ' btn-active-text' : '';
common::printLink('user', 'todo', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'todo', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->story}</span>";
$active = $methodName == 'story' ? ' btn-active-text' : '';
common::printLink('user', 'story', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'story', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->task}</span>";
$active = $methodName == 'task' ? ' btn-active-text' : '';
common::printLink('user', 'task', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'task', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->bug}</span>";
$active = $methodName == 'bug' ? ' btn-active-text' : '';
common::printLink('user', 'bug', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'bug', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->test}</span>";
$active = ($methodName == 'testtask' or $methodName == 'testcase')? ' btn-active-text' : '';
common::printLink('user', 'testtask', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'testtask', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->dynamic}</span>";
$active = $methodName == 'dynamic' ? ' btn-active-text' : '';
common::printLink('user', 'dynamic', "type=today&account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'dynamic', "type=today&userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->project}</span>";
$active = $methodName == 'project' ? ' btn-active-text' : '';
common::printLink('user', 'project', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'project', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
$label = "<span class='text'>{$lang->user->profile}</span>";
$active = $methodName == 'profile' ? ' btn-active-text' : '';
common::printLink('user', 'profile', "account=$account", $label, '', "class='btn btn-link $active'");
common::printLink('user', 'profile', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
?>
</div>
</div>
+23
View File
@@ -81,6 +81,9 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
<div id="info" class="table-row">
<div class="table-col text-middle text-center">
<div id="poweredby">
<?php if($weakSites):?>
<div><a class='showNotice' href='javascript:showNotice()',><?php echo $lang->user->notice4Safe;?></a></div>
<?php endif;?>
<?php if($config->checkVersion):?>
<iframe id='updater' class='hidden' frameborder='0' width='100%' height='45' scrolling='no' allowtransparency='true' src="<?php echo $this->createLink('misc', 'checkUpdate', "sn=$s");?>"></iframe>
<?php endif;?>
@@ -89,4 +92,24 @@ if(empty($config->notMd5Pwd))js::import($jsRoot . 'md5.js');
</div>
</div>
</main>
<?php
if($weakSites)
{
$paths = array();
$databases = array();
$isXampp = false;
foreach($weakSites as $webRoot => $site)
{
$path = $site['path'];
if(strpos($path, 'xampp') !== false) $isXampp = true;
$paths[] = $site['path'];
$databases[] = $site['database'];
}
$process4Safe = $isXampp ? $lang->user->process4DB : $lang->user->process4DIR;
$process4Safe = sprintf($process4Safe, join(' ', $isXampp ? $databases : $paths));
js::set('process4Safe', $process4Safe);
}
?>
<?php include '../../common/view/footer.lite.html.php';?>
+4 -4
View File
@@ -19,16 +19,16 @@
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
$active = $type == 'assignedTo' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "account=$account&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
$active = $type == 'openedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "account=$account&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
$active = $type == 'reviewedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "account=$account&type=reviewedBy"), sprintf($lang->user->reviewedBy ,$that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=reviewedBy"), sprintf($lang->user->reviewedBy ,$that)) . "</li>";
$active = $type == 'closedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('story', "account=$account&type=closedBy"), sprintf($lang->user->closedBy ,$that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('story', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy ,$that)) . "</li>";
?>
</ul>
</nav>
+5 -5
View File
@@ -19,19 +19,19 @@
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
$active = $type == 'assignedTo' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "account=$account&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=assignedTo"), sprintf($lang->user->assignedTo, $that)) . "</li>";
$active = $type == 'openedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "account=$account&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=openedBy"), sprintf($lang->user->openedBy, $that)) . "</li>";
$active = $type == 'finishedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "account=$account&type=finishedBy"), sprintf($lang->user->finishedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=finishedBy"), sprintf($lang->user->finishedBy, $that)) . "</li>";
$active = $type == 'closedBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "account=$account&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=closedBy"), sprintf($lang->user->closedBy, $that)) . "</li>";
$active = $type == 'canceledBy' ? 'active' : '';
echo "<li class='$active'>" . html::a(inlink('task', "account=$account&type=canceledBy"), sprintf($lang->user->canceledBy, $that)) . "</li>";
echo "<li class='$active'>" . html::a(inlink('task', "userID={$user->id}&type=canceledBy"), sprintf($lang->user->canceledBy, $that)) . "</li>";
?>
</ul>
</nav>
+4 -4
View File
@@ -17,12 +17,12 @@
<ul class='nav nav-default'>
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
echo "<li id='testtaskTab'>" . html::a($this->createLink('user', 'testtask', "account=$account"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
echo "<li id='testtaskTab'>" . html::a($this->createLink('user', 'testtask', "userID={$user->id}"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
$active = $type == 'case2Him' ? 'active' : '';
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "account=$account&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
$active = $type == 'caseByHim' ? 'active' : '';
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "account=$account&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
echo "<li class='$active'>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
?>
</ul>
</nav>
@@ -30,7 +30,7 @@
<div class='main-table'>
<table class='table has-sort-head'>
<?php
$vars = "account=$account&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID";
$vars = "userID={$user->id}&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID";
$this->app->loadLang('testtask');
?>
<thead>
+4 -4
View File
@@ -17,16 +17,16 @@
<ul class='nav nav-default'>
<?php
$that = zget($lang->user->thirdPerson, $user->gender);
echo "<li class='active'>" . html::a($this->createLink('user', 'testtask', "account=$account"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "account=$account&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "account=$account&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
echo "<li class='active'>" . html::a($this->createLink('user', 'testtask', "userID={$user->id}"), sprintf($lang->user->testTask2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=case2Him"), sprintf($lang->user->case2Him, $that)) . "</li>";
echo "<li>" . html::a($this->createLink('user', 'testcase', "userID={$user->id}&type=caseByHim"), sprintf($lang->user->caseByHim, $that)) . "</li>";
?>
</ul>
</nav>
<div class='main-table'>
<table class='table has-sort-head'>
<?php $vars = "account=$account&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<?php $vars = "userID={$user->id}&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
<tr>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
+3 -3
View File
@@ -13,7 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include "../../common/view/datepicker.html.php"; ?>
<?php include './featurebar.html.php';?>
<?php js::set('account', $account);?>
<?php js::set('userID', $user->id);?>
<?php js::set('type', $type);?>
<div id='mainContent'>
<nav id='contentNav'>
@@ -22,7 +22,7 @@
foreach($lang->todo->periods as $period => $label)
{
$active = $type == $period ? 'active' : '';
$vars = "account={$account}&date=$period";
$vars = "userID={$user->id}&date=$period";
if($period == 'before') $vars .= "&status=undone";
echo "<li id='$period' class='$active'>" . html::a(inlink('todo', $vars), $label) . '</li> ';
}
@@ -32,7 +32,7 @@
<form method='post' target='hiddenwin' action='<?php echo $this->createLink('todo', 'import2Today');?>' data-ride='table' id='todoform' class='main-table table-todo'>
<table class='table has-sort-head table-fixed'>
<?php $vars = "account=$account&type=$type&status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
<?php $vars = "userID={$user->id}&type=$type&status=$status&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"; ?>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
-4
View File
@@ -30,10 +30,6 @@ php_value display_errors 1
php_value max_input_vars 100000
</IfModule>
<IfModule mod_headers.c>
Header always append X-Frame-Options SAMEORIGIN
</IfModule>
# yslow settings.
<IfModule mod_expires.c>
ExpiresActive On
-4
View File
@@ -26,10 +26,6 @@ php_value display_errors 1
php_value max_input_vars 100000
</IfModule>
<IfModule mod_headers.c>
Header always append X-Frame-Options SAMEORIGIN
</IfModule>
# yslow settings.
<IfModule mod_expires.c>
ExpiresActive On
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -35,7 +35,7 @@
pathName = location.pathname;
pathName = pathName.substring(0, pathName.lastIndexOf ('/') + 1);
document.cookie = "lang=" + lang + "; path=" + pathName + "; HttpOnly;";
document.cookie = "lang=" + lang + "; path=" + pathName + ";";
location.href = window.location.protocol + "//" + window.location.host + pathName;
}
</script>
@@ -12,7 +12,7 @@ public function downloadZipPackage($version, $link)
$decodeLink = helper::safe64Decode($link);
if(!preg_match('/^https?\:\/\//', $decodeLink)) return false;
$file = basename($link);
$file = basename($decodeLink);
$extension = substr($file, strrpos($file, '.') + 1);
if(strpos(",{$this->config->file->allowed},", ",{$extension},") === false) return false;