From 6908956c24e8232ce0d03c2d527f30620bd040b0 Mon Sep 17 00:00:00 2001 From: zenggang Date: Thu, 14 Apr 2022 06:28:31 +0000 Subject: [PATCH] * Fix bug#17082,17990 --- module/story/js/x.create.js | 2 +- module/user/model.php | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/module/story/js/x.create.js b/module/story/js/x.create.js index b8d1419540..f107b0e075 100644 --- a/module/story/js/x.create.js +++ b/module/story/js/x.create.js @@ -2,7 +2,7 @@ $(function() { $('#sourceNote').prev('span').remove(); $('#sourceNote').remove(); - $('table tbody tr th').addClass('w-70px'); + $('table tbody tr th').addClass('w-100px'); $('#tplBoxWrapper .btn-toolbar .btn-group').remove(); }) diff --git a/module/user/model.php b/module/user/model.php index aec68513da..3f14ded9f0 100644 --- a/module/user/model.php +++ b/module/user/model.php @@ -891,6 +891,13 @@ class userModel extends model /* Create cycle todo in login. */ $todoList = $this->dao->select('*')->from(TABLE_TODO)->where('cycle')->eq(1)->andWhere('deleted')->eq('0')->andWhere('account')->eq($user->account)->fetchAll('id'); $this->loadModel('todo')->createByCycle($todoList); + + /* Fix bug #17082. */ + if($user->avatar) + { + $avatarRoot = substr($user->avatar, 0, strpos($user->avatar, 'data/upload/')); + if($this->config->webRoot != $avatarRoot) $user->avatar = substr_replace($user->avatar, $this->config->webRoot, 0, strlen($avatarRoot)); + } } return $user; }