This commit is contained in:
liugang
2019-08-08 18:37:50 +08:00
22 changed files with 102 additions and 120 deletions
+2 -2
View File
@@ -617,7 +617,7 @@ class SMTP {
protected function parseHelloFields($type)
{
$this->server_caps = [];
$this->server_caps = array();
$lines = explode("\n", $this->helo_rply);
foreach ($lines as $n => $s) {
@@ -639,7 +639,7 @@ class SMTP {
break;
case 'AUTH':
if (!is_array($fields)) {
$fields = [];
$fields = array();
}
break;
default:
+3 -1
View File
@@ -45,9 +45,11 @@ class actionModel extends model
$action->actor = $actor;
$action->action = $actionType;
$action->date = helper::now();
$action->comment = trim(strip_tags($comment, $this->config->allowedTags));
$action->extra = $extra;
$_POST['comment'] = $comment;
$action->comment = fixer::input('post')->stripTags('comment')->get('comment');
/* Process action. */
$action = $this->loadModel('file')->processImgURL($action, 'comment', $this->post->uid);
if($autoDelete) $this->file->autoDelete($this->post->uid);
+1
View File
@@ -38,6 +38,7 @@ html[lang='en'] #deadlineTd .input-group-addon{padding: 5px 18px}
.title-group #severity + .chosen-container > .chosen-single {border-radius: 0!important;}
.title-group #pri + .chosen-container > .chosen-single {border-top-left-radius: 0!important; border-bottom-left-radius: 0!important;}
.title-group .has-icon-right{min-width:700px}
#mainContent .center-block{padding-bottom:40px;}
#typeBox {width:180px;}
#osBox {width:190px;}
+3 -2
View File
@@ -636,7 +636,7 @@ class productModel extends model
{
if(($plan->end != '0000-00-00' and strtotime($plan->end) - time() <= 0) or $plan->end == '2030-01-01') continue;
$year = substr($plan->end, 0, 4);
$roadmap[$year][$plan->branch][] = $plan;
$roadmap[$year][$plan->branch][$plan->end] = $plan;
$total++;
}
@@ -650,7 +650,7 @@ class productModel extends model
foreach($releases as $release)
{
$year = substr($release->date, 0, 4);
$roadmap[$year][$release->branch][] = $release;
$roadmap[$year][$release->branch][$release->date] = $release;
$total++;
if($count > 0 and $total >= $count) break;
@@ -664,6 +664,7 @@ class productModel extends model
{
foreach($branchRoadmaps as $branch => $roadmaps)
{
krsort($roadmaps);
$totalData = count($roadmaps);
$rows = ceil($totalData / 8);
$maxPerRow = ceil($totalData / $rows);
+1 -1
View File
@@ -115,7 +115,7 @@ $lang->project->statusList['closed'] = 'Closed';
$lang->project->aclList['open'] = "Default (Users who can visit {$lang->projectCommon} can access it.)";
$lang->project->aclList['private'] = 'Private (For team members only.)';
$lang->project->aclList['custom'] = 'Whitelist (Team members and the whitelist users can access it.)';
$lang->project->aclList['custom'] = 'Custom (Team members and the whitelist users can access it.)';
/* Method list. */
$lang->project->index = "{$lang->projectCommon} Home";
+12
View File
@@ -2002,6 +2002,13 @@ class projectModel extends model
{
foreach($taskTeam as $taskID => $team) $tasks[$taskID]->team = $team;
}
$parents = array();
foreach($tasks as $task)
{
if($task->parent > 0) $parents[$task->parent] = $task->parent;
}
$parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
foreach($tasks as $task)
{
@@ -2012,6 +2019,11 @@ class projectModel extends model
$tasks[$task->parent]->children[$task->id] = $task;
unset($tasks[$task->id]);
}
else
{
$parent = $parents[$task->parent];
$task->parentName = $parent->name;
}
}
}
return $this->loadModel('task')->processTasks($tasks);
+1
View File
@@ -28,6 +28,7 @@ $lang->release->confirmUnlinkStory = "您确认移除该需求吗?";
$lang->release->confirmUnlinkBug = "您确认移除该Bug吗?";
$lang->release->existBuild = '『版本』已经有『%s』这条记录了。您可以更改『发布名称』或者选择一个『版本』。';
$lang->release->noRelease = '暂时没有发布。';
$lang->release->errorDate = '发布日期不能大于今天。';
$lang->release->basicInfo = '基本信息';
+5
View File
@@ -106,6 +106,11 @@ class releaseModel extends model
$productID = (int)$productID;
$branch = (int)$branch;
$buildID = 0;
/* Check date must be not more than today. */
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
/* Auto create build when release is not link build. */
if($this->post->build == false && $this->post->name)
{
$build = $this->dao->select('*')->from(TABLE_BUILD)
-6
View File
@@ -61,12 +61,6 @@ class ssoModel extends model
$user = $this->dao->select('*')->from(TABLE_USER)->where('account')->eq($data->account)->fetch();
if($user) die(js::alert($this->lang->sso->bindHasAccount));
if(isset($this->config->safe->mode) and $this->user->computePasswordStrength($data->password1) < $this->config->safe->mode)
{
dao::$errors['password1'][] = $this->lang->user->weakPassword;
return false;
}
$user = new stdclass();
$user->account = $data->account;
$user->password = md5($data->password1);
+1 -1
View File
@@ -8,4 +8,4 @@ function checkLeft()
if(!result) setTimeout(function() {$.enableForm()}, 500);
return result;
}
}
}
+15 -53
View File
@@ -1655,41 +1655,9 @@ class taskModel extends model
$parents = array();
foreach($tasks as $task)
{
if($task->parent == -1) $parents[] = $task->id;
}
if(!empty($parents))
{
/* Select children task. */
$children = $this->dao->select('DISTINCT t1.*, t2.id AS storyID, t2.title AS storyTitle, t2.product, t2.branch, t2.version AS latestStoryVersion, t2.status AS storyStatus, t3.realname AS assignedToRealName')
->from(TABLE_TASK)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story = t2.id')
->leftJoin(TABLE_USER)->alias('t3')->on('t1.assignedTo = t3.account')
->leftJoin(TABLE_MODULE)->alias('t4')->on('t1.module = t4.id')
->where('t1.parent')->in($parents)
->andWhere('t1.deleted')->eq(0)
->beginIF($productID)->andWhere("((t4.root=" . (int)$productID . " and t4.type='story') OR t2.product=" . (int)$productID . ")")->fi()
->beginIF($type == 'undone')->andWhere("(t1.status = 'wait' or t1.status ='doing')")->fi()
->beginIF($type == 'needconfirm')->andWhere('t2.version > t1.storyVersion')->andWhere("t2.status = 'active'")->fi()
->beginIF($type == 'assignedtome')->andWhere('t1.assignedTo')->eq($this->app->user->account)->fi()
->beginIF($type == 'finishedbyme')
->andWhere('t1.finishedby', 1)->eq($this->app->user->account)
->orWhere('t1.finishedList')->like("%,{$this->app->user->account},%")
->markRight(1)
->fi()
->beginIF($type == 'delayed')->andWhere('t1.deadline')->gt('1970-1-1')->andWhere('t1.deadline')->lt(date(DT_DATE1))->andWhere('t1.status')->in('wait,doing')->fi()
->beginIF(is_array($type) or strpos(',all,undone,needconfirm,assignedtome,delayed,finishedbyme,myinvolved,', ",$type,") === false)->andWhere('t1.status')->in($type)->fi()
->beginIF($modules)->andWhere('t1.module')->in($modules)->fi()
->orderBy("t1.$orderBy")
->fetchAll('id');
if(!empty($children))
{
foreach($children as $child)
{
$tasks[$child->parent]->children[$child->id] = $child;
}
}
if($task->parent > 0) $parents[$task->parent] = $task->parent;
}
$parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
foreach($tasks as $task)
{
@@ -1700,6 +1668,11 @@ class taskModel extends model
$tasks[$task->parent]->children[$task->id] = $task;
unset($tasks[$task->id]);
}
else
{
$parent = $parents[$task->parent];
$task->parentName = $parent->name;
}
}
}
@@ -1842,26 +1815,9 @@ class taskModel extends model
$parents = array();
foreach($tasks as $task)
{
if($task->parent == -1) $parents[] = $task->id;
}
if(!empty($parents))
{
/* Select children task. */
$children = $this->dao->select('id, parent, name, assignedTo, pri, status, estimate, consumed, closedReason, `left`')
->from(TABLE_TASK)
->where('story')->eq((int)$storyID)
->andwhere('parent')->in($parents)
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
->fetchAll('id');
if(!empty($children))
{
foreach($children as $child)
{
$tasks[$child->parent]->children[$child->id] = $child;
}
}
if($task->parent > 0) $parents[$task->parent] = $task->parent;
}
$parents = $this->dao->select('*')->from(TABLE_TASK)->where('id')->in($parents)->fetchAll('id');
foreach($tasks as $task)
{
@@ -1872,6 +1828,11 @@ class taskModel extends model
$tasks[$task->parent]->children[$task->id] = $task;
unset($tasks[$task->id]);
}
else
{
$parent = $parents[$task->parent];
$task->parentName = $parent->name;
}
}
}
@@ -2671,6 +2632,7 @@ class taskModel extends model
echo "</span>";
break;
case 'name':
if($task->parent > 0 and isset($task->parentName)) $task->name = "{$task->parentName} / {$task->name}";
if(!empty($task->product) && isset($branchGroups[$task->product][$task->branch])) echo "<span class='label label-info label-outline'>" . $branchGroups[$task->product][$task->branch] . '</span> ';
if(empty($task->children) and $task->module and isset($modulePairs[$task->module])) echo "<span class='label label-gray label-badge'>" . $modulePairs[$task->module] . '</span> ';
if($task->parent > 0) echo '<span class="label label-badge label-light" title="' . $this->lang->task->children . '">' . $this->lang->task->childrenAB . '</span> ';
+6 -6
View File
@@ -68,10 +68,10 @@ $lang->testcase->stepNumberAB = 'S';
$lang->testcase->createBug = 'Report Bug';
$lang->testcase->fromModule = 'Source Module';
$lang->testcase->fromCase = 'Source Case';
$lang->testcase->sync = 'Sync. Case';
$lang->testcase->sync = 'Synchronize Case';
$lang->testcase->ignore = 'Ignore';
$lang->testcase->fromTesttask = 'From Test Request';
$lang->testcase->fromCaselib = 'From CaseLib';
$lang->testcase->fromCaselib = 'From Case Library';
$lang->testcase->deleted = 'Deleted';
$lang->case = $lang->testcase; // For dao checking using. Because 'case' is a php keywords, so the module name is testcase, table name is still case.
@@ -118,7 +118,7 @@ $lang->testcase->copy = 'Copy Case';
$lang->testcase->group = 'Group';
$lang->testcase->groupName = 'Group Name';
$lang->testcase->step = 'Steps';
$lang->testcase->stepChild = 'Child Step';
$lang->testcase->stepChild = 'Child Steps';
$lang->testcase->viewAll = 'All Cases';
$lang->testcase->new = 'New';
@@ -143,7 +143,7 @@ $lang->testcase->lblTypeValue = 'Type Value';
$lang->testcase->lblStageValue = 'Phase Value';
$lang->testcase->lblStatusValue = 'Status Value';
$lang->testcase->legendBasicInfo = 'Basic Info';
$lang->testcase->legendBasicInfo = 'Basic Information';
$lang->testcase->legendAttatch = 'Files';
$lang->testcase->legendLinkBugs = 'Bugs';
$lang->testcase->legendOpenAndEdit = 'Create/Edit';
@@ -168,8 +168,8 @@ $lang->testcase->priList[4] = 4;
$lang->testcase->typeList[''] = '';
$lang->testcase->typeList['feature'] = 'Feature';
$lang->testcase->typeList['performance'] = 'Performance';
$lang->testcase->typeList['config'] = 'Config';
$lang->testcase->typeList['install'] = 'Install';
$lang->testcase->typeList['config'] = 'Configuration';
$lang->testcase->typeList['install'] = 'Installation';
$lang->testcase->typeList['security'] = 'Security';
$lang->testcase->typeList['interface'] = 'Interface';
$lang->testcase->typeList['other'] = 'Others';
+1
View File
@@ -659,6 +659,7 @@ class testsuite extends control
$this->view->position[] = $this->lang->testsuite->view;
$this->view->lib = $lib;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('caselib', $libID);
$this->display();
}
+1 -1
View File
@@ -71,7 +71,7 @@ class tutorial extends control
{
$this->session->set('tutorialMode', false);
$this->loadModel('setting')->setItem($this->app->user->account . '.common.global.novice', 0);
if(empty($referer)) $referer = $this->createLink('index');
if(empty($referer)) $referer = helper::safe64Encode(helper::createLink('my', 'index', '', 'html'));
die(js::locate(helper::safe64Decode($referer), 'parent'));
}
+3 -3
View File
@@ -12,7 +12,7 @@
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php js::import($jsRoot . 'misc/base64.js'); ?>
<?php $referer = $referer ? $referer : helper::createLink('my', 'index', '', 'tutorial') ?>
<?php $referer = $referer ? $referer : helper::createLink('my', 'index', '', 'tutorial');?>
<div id='pageContainer'>
<div id='iframeWrapper'>
<iframe id='iframePage' name='iframePage' src='<?php echo $referer ?>' frameborder='no' allowtransparency='true' scrolling='auto' hidefocus='' style='width: 100%; height: 100%; left: 0; top: 0'></iframe>
@@ -22,7 +22,7 @@
<div class='finish-all'>
<div class='start-icon'><i class='icon icon-check-circle icon-front'></i></div>
<h3><?php echo $lang->tutorial->congratulation ?></h3>
<button type='button' class='btn btn-success btn-reset-tasks'><i class='icon icon-restart'></i> <?php echo $lang->tutorial->restart ?></button> &nbsp; <a href='<?php echo helper::createLink('tutorial', 'quit', 'referer=' . base64_encode($referer)) ?>' class='btn btn-success'><i class='icon icon-signout'></i> <?php echo $lang->tutorial->exit ?></a>
<button type='button' class='btn btn-success btn-reset-tasks'><i class='icon icon-restart'></i> <?php echo $lang->tutorial->restart ?></button> &nbsp; <a href='<?php echo helper::createLink('tutorial', 'quit');?>' class='btn btn-success'><i class='icon icon-signout'></i> <?php echo $lang->tutorial->exit ?></a>
</div>
<div class='finish'>
<div class='start-icon'><i class='icon icon-check-circle icon-front'></i></div>
@@ -36,7 +36,7 @@
<div class='start-icon'><i class='icon icon-certificate icon-back'></i><i class='icon icon-flag icon-front text-secondary'></i></div>
<h2><?php echo $lang->tutorial->common ?></h2>
<div class='actions'>
<a href='<?php echo helper::createLink('tutorial', 'quit', 'referer=' . base64_encode($referer)) ?>' class='btn btn-danger btn-sm'><i class="icon icon-signout"></i> <?php echo $lang->tutorial->exit ?></a>
<a href='<?php echo helper::createLink('tutorial', 'quit') ?>' class='btn btn-danger btn-sm'><i class="icon icon-signout"></i> <?php echo $lang->tutorial->exit ?></a>
</div>
</header>
<section id='current'>
+11 -8
View File
@@ -372,14 +372,17 @@ class user extends control
*/
public function setReferer($referer = '')
{
if(!empty($referer))
{
$this->referer = helper::safe64Decode($referer);
}
else
{
$this->referer = $this->server->http_referer ? $this->server->http_referer: '';
}
$this->referer = $this->server->http_referer ? $this->server->http_referer: '';
if(!empty($referer)) $this->referer = helper::safe64Decode($referer);
/* Build zentao link regular. */
$webRoot = $this->config->webRoot;
$linkReg = $webRoot . 'index.php?' . $this->config->moduleVar . '=\w+&' . $this->config->methodVar . '=\w+';
if($this->config->requestType == 'PATH_INFO') $linkReg = $webRoot . '\w+' . $this->config->requestFix . '\w+';
$linkReg = str_replace(array('/', '.', '?', '-'), array('\/', '\.', '\?', '\-'), $linkReg);
/* Check zentao link by regular. */
$this->referer = preg_match('/^' . $linkReg . '/', $this->referer) ? $this->referer : $webRoot;
}
/**
+14 -3
View File
@@ -10,15 +10,26 @@ function changeGroup(role, i)
}
$('#group' + i).trigger('chosen:updated');
}
function toggleCheck(obj, i)
{
if($(obj).val() == '')
var $this = $(obj);
var password = $this.val();
var $ditto = $('#ditto' + i);
var $passwordStrength = $this.closest('.input-group').find('.passwordStrength');
if(password == '')
{
$('#ditto' + i).attr('checked', true);
$ditto.attr('checked', true);
$ditto.closest('.input-group-addon').show();
$passwordStrength.hide();
$passwordStrength.html('');
}
else
{
$('#ditto' + i).removeAttr('checked');
$ditto.removeAttr('checked');
$ditto.closest('.input-group-addon').hide();
$passwordStrength.html(passwordStrengthList[computePasswordStrength(password)]);
$passwordStrength.show();
}
}
+3
View File
@@ -113,6 +113,7 @@ $lang->user->loginFailed = "登录失败,请检查您的用户名或密码是
$lang->user->lockWarning = "您还有%s次尝试机会。";
$lang->user->loginLocked = "密码尝试次数太多,请联系管理员解锁,或%s分钟后重试。";
$lang->user->weakPassword = "您的密码强度小于系统设定。";
$lang->user->errorWeak = "密码不能使用【%s】这些常用弱口令。";
$lang->user->roleList[''] = '';
$lang->user->roleList['dev'] = '研发';
@@ -171,6 +172,8 @@ $lang->user->error->realname = "【ID %s】的真实姓名必须填写";
$lang->user->error->password = "【ID %s】的密码必须为六位以上";
$lang->user->error->mail = "【ID %s】的邮箱地址不正确";
$lang->user->error->reserved = "【ID %s】的用户名已被系统预留";
$lang->user->error->weakPassword = "【ID %s】的密码强度小于系统设定。";
$lang->user->error->commonWeak = "【ID %s】的密码不能使用【%s】这些常用若口令。";
$lang->user->error->verifyPassword = "验证失败,请检查您的系统登录密码是否正确";
$lang->user->error->originalPassword = "原密码不正确";
+14 -31
View File
@@ -220,12 +220,6 @@ class userModel extends model
->remove('group, password1, password2, verifyPassword')
->get();
if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
{
dao::$errors['password1'][] = $this->lang->user->weakPassword;
return false;
}
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand))
{
dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword;
@@ -276,17 +270,21 @@ class userModel extends model
$users->account[$i] = trim($users->account[$i]);
if($users->account[$i] != '')
{
if(strtolower($users->account[$i]) == 'guest') die(js::error(sprintf($this->lang->user->error->reserved, $i+1)));
if(strtolower($users->account[$i]) == 'guest') die(js::error(sprintf($this->lang->user->error->reserved, $i + 1)));
$account = $this->dao->select('account')->from(TABLE_USER)->where('account')->eq($users->account[$i])->fetch();
if($account) die(js::error(sprintf($this->lang->user->error->accountDupl, $i+1)));
if(in_array($users->account[$i], $accounts)) die(js::error(sprintf($this->lang->user->error->accountDupl, $i+1)));
if(!validater::checkAccount($users->account[$i])) die(js::error(sprintf($this->lang->user->error->account, $i+1)));
if($users->realname[$i] == '') die(js::error(sprintf($this->lang->user->error->realname, $i+1)));
if($users->email[$i] and !validater::checkEmail($users->email[$i])) die(js::error(sprintf($this->lang->user->error->mail, $i+1)));
if($account) die(js::error(sprintf($this->lang->user->error->accountDupl, $i + 1)));
if(in_array($users->account[$i], $accounts)) die(js::error(sprintf($this->lang->user->error->accountDupl, $i + 1)));
if(!validater::checkAccount($users->account[$i])) die(js::error(sprintf($this->lang->user->error->account, $i + 1)));
if($users->realname[$i] == '') die(js::error(sprintf($this->lang->user->error->realname, $i + 1)));
if($users->email[$i] and !validater::checkEmail($users->email[$i])) die(js::error(sprintf($this->lang->user->error->mail, $i + 1)));
$users->password[$i] = (isset($prev['password']) and $users->ditto[$i] == 'on' and empty($users->password[$i])) ? $prev['password'] : $users->password[$i];
if(!validater::checkReg($users->password[$i], '|(.){6,}|')) die(js::error(sprintf($this->lang->user->error->password, $i+1)));
if(!validater::checkReg($users->password[$i], '|(.){6,}|')) die(js::error(sprintf($this->lang->user->error->password, $i + 1)));
$role = $users->role[$i] == 'ditto' ? (isset($prev['role']) ? $prev['role'] : '') : $users->role[$i];
/* Check weak and common weak password. */
if(isset($this->config->safe->mode) and $this->computePasswordStrength($users->password[$i]) < $this->config->safe->mode) die(js::error(sprintf($this->lang->user->error->weakPassword, $i + 1)));
if(!empty($this->config->safe->changeWeak) and strpos(",{$this->config->safe->weak},", ",{$this->post->password1},") !== false) die(js::error(sprintf($this->lang->user->error->commonWeak, $i + 1, $this->config->safe->weak)));
$data[$i] = new stdclass();
$data[$i]->dept = $users->dept[$i] == 'ditto' ? (isset($prev['dept']) ? $prev['dept'] : 0) : $users->dept[$i];
$data[$i]->account = $users->account[$i];
@@ -377,12 +375,6 @@ class userModel extends model
->remove('password1, password2, groups,verifyPassword')
->get();
if(isset($this->config->safe->mode) and isset($user->password) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
{
dao::$errors['password1'][] = $this->lang->user->weakPassword;
return false;
}
if(empty($_POST['verifyPassword']) or $this->post->verifyPassword != md5($this->app->user->password . $this->session->rand))
{
dao::$errors['verifyPassword'][] = $this->lang->user->error->verifyPassword;
@@ -560,12 +552,6 @@ class userModel extends model
->remove('account, password1, password2, originalPassword')
->get();
if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
{
dao::$errors['password1'][] = $this->lang->user->weakPassword;
return false;
}
if(empty($_POST['originalPassword']) or md5($this->post->originalPassword) != $this->app->user->password)
{
dao::$errors['originalPassword'][] = $this->lang->user->error->originalPassword;
@@ -595,12 +581,6 @@ class userModel extends model
if(!$user) return false;
$password = md5($this->post->password1);
if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode)
{
dao::$errors['password1'][] = $this->lang->user->weakPassword;
return false;
}
$this->dao->update(TABLE_USER)->set('password')->eq($password)->autoCheck()->where('account')->eq($this->post->account)->exec();
return !dao::isError();
}
@@ -620,6 +600,9 @@ class userModel extends model
{
if($this->post->password1 != $this->post->password2) dao::$errors['password'][] = $this->lang->error->passwordsame;
if(!validater::checkReg($this->post->password1, '|(.){6,}|')) dao::$errors['password'][] = $this->lang->error->passwordrule;
if(isset($this->config->safe->mode) and $this->computePasswordStrength($this->post->password1) < $this->config->safe->mode) dao::$errors['password1'][] = $this->lang->user->weakPassword;
if(!empty($this->config->safe->changeWeak) and strpos(",{$this->config->safe->weak},", ",{$this->post->password1},") !== false) dao::$errors['password1'][] = sprintf($this->lang->user->errorWeak, $this->config->safe->weak);
}
return !dao::isError();
}
+2
View File
@@ -76,6 +76,7 @@
<div class='input-group'>
<?php
echo html::input("password[$i]", '', "class='form-control' onkeyup='toggleCheck(this, $i)'");
echo "<span class='input-group-addon passwordStrength'></span>";
if($i != 0) echo "<span class='input-group-addon'><input type='checkbox' name='ditto[$i]' id='ditto$i' " . ($i> 0 ? "checked" : '') . " /> {$lang->user->ditto}</span>";
?>
</div>
@@ -116,4 +117,5 @@
</form>
</div>
<?php echo html::hidden('verifyRand', $rand);?>
<?php js::set('passwordStrengthList', $lang->user->passwordStrengthList)?>
<?php include '../../common/view/footer.html.php';?>
+2 -1
View File
@@ -12,9 +12,9 @@
/* Judge my.php exists or not. */
define('IN_UPGRADE', true);
$dbConfig = dirname(dirname(__FILE__)) . '/config/db.php';
$myConfig = dirname(dirname(__FILE__)) . '/config/my.php';
if(file_exists($dbConfig))
{
$myConfig = dirname(dirname(__FILE__)) . '/config/my.php';
if(file_exists($myConfig))
{
$myContent = trim(file_get_contents($myConfig));
@@ -35,6 +35,7 @@ if(file_exists($dbConfig))
file_put_contents($myConfig, $myContent);
}
}
if(!file_exists($myConfig)) die(header('location: install.php'));
error_reporting(0);
@@ -92,7 +92,7 @@ class xuanxuanChat extends chatModel
$position = strrpos($host, ':');
$port = $position === false ? '' : substr($host, $position + 1);
$server = $this->config->xuanxuan->server;
if($port and strpos($server, ":$port") === false)
if($port and strpos($server, ":") === false)
{
$server = rtrim($server, '/');
$server = "{$server}:{$port}";