Skip to content

Commit 9715c30

Browse files
committed
Merge branch 'master' into dev_sam
2 parents 5de5555 + f799c7b commit 9715c30

5 files changed

Lines changed: 21 additions & 14 deletions

File tree

src/config.sample.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*/
88

99
return array(
10-
'siteVersionName' => '1.0.9',
11-
'siteVersionCode' => '10009',
10+
'siteVersionName' => '1.0.11',
11+
'siteVersionCode' => '10011',
1212
'apiPageIndex' => './index.php?action=page.index',
1313
'apiPageLogin' => './index.php?action=page.login',
1414
'apiPageLogout' => './index.php?action=page.logout',

src/controller/Api/Group/Api_Group_UpdateController.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ private function handleValues($values, $groupId)
113113
$this->ctx->Wpf_Logger->info($tag, " group profile updateValues =". json_encode($updateValues));
114114
$this->ctx->Wpf_Logger->info($tag, " group profile writeUpdateAdminType =". $writeUpdateAdminType);
115115

116-
117-
//只有群主管理员可以修改
118-
$this->isGroupAdmin($groupId);
119-
120116
$groupInfo = $this->getGroupProfile($groupId);
121117

122118
if($writeUpdateAdminType !== false) {
@@ -152,6 +148,9 @@ private function handleValues($values, $groupId)
152148
return;
153149
}
154150

151+
//只有群主管理员可以修改
152+
$this->isGroupAdmin($groupId);
153+
155154
$where = [
156155
"groupId" => $groupId
157156
];

src/controller/InstallDBController.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,16 +204,15 @@ public function doIndex()
204204
$testCurlUrl = $sampleFile['test_curl'];
205205
$testCurlUrl = ZalyHelper::getFullReqUrl($testCurlUrl);
206206
$curlResult = $this->curl->request($testCurlUrl, 'get');
207-
$doucmentRoot = isset($_SERVER['DOCUMENT_ROOT']) ? str_replace("//", "/", $_SERVER['DOCUMENT_ROOT']) : "";
208-
$scriptRoot = isset($_SERVER['SCRIPT_FILENAME']) ? str_replace("//", "/", $_SERVER['SCRIPT_FILENAME']) : "";
207+
//防止自己配置nginx的时候,多写一个/
208+
$requestUri = isset($_SERVER['REQUEST_URI']) ? str_replace(array("\\", "//"), array("/", "/"), $_SERVER['REQUEST_URI']) : "";
209+
$requestUris = explode("/", $requestUri);
209210
$isInstallRootPath = true;
210211

211-
if(!$doucmentRoot || !$scriptRoot) {
212-
$isInstallRootPath = false;
213-
}
214-
if($doucmentRoot."/index.php" != $scriptRoot) {
212+
if(count($requestUris) > 2) {
215213
$isInstallRootPath = false;
216214
}
215+
217216
if($isInstallRootPath === false) {
218217
echo $this->lang == 1 ? "目前只支持根目录运行" : "Currently only the root directory is supported.";
219218
return;

src/public/js/im/zalyGroupMsg.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1950,7 +1950,11 @@ function updateInfo(profileId, profileType)
19501950
var name = template("tpl-string", {
19511951
string : name
19521952
});
1953-
name = name.trim();
1953+
try{
1954+
name = name.trim();
1955+
}catch (error) {
1956+
1957+
}
19541958
var subName = name;
19551959
if(name.length>10) {
19561960
subName = name.substr(0, 8) + "...";

src/public/js/im/zalyMsg.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ function appendOrInsertRoomList(msg, isInsert, showNotification)
185185
}
186186

187187
var avatar = msg.roomType == GROUP_MSG ? msg.avatar : msg.userAvatar;
188-
name = name.trim();
188+
189+
try{
190+
name = name.trim();
191+
}catch (error) {
192+
193+
}
189194
if(name.length>10) {
190195
name = name.substr(0, 8) + "...";
191196
}

0 commit comments

Comments
 (0)