Skip to content

Commit 94046d1

Browse files
committed
fix
1 parent a9996f2 commit 94046d1

3 files changed

Lines changed: 29 additions & 19 deletions

File tree

src/controller/InstallDBController.php

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,8 @@ public function doIndex()
6767

6868

6969
$config = require($sampleFileName);
70-
7170
$sqliteName = "";
72-
7371
$this->lang = isset($_GET['lang']) ? $_GET['lang'] : "1";
74-
7572
$method = $_SERVER['REQUEST_METHOD'];
7673
if ($method == 'POST') {
7774
//install site
@@ -206,16 +203,15 @@ public function doIndex()
206203
$curlResult = $this->curl->request($testCurlUrl, 'get');
207204
$doucmentRoot = isset($_SERVER['DOCUMENT_ROOT']) ? str_replace("//", "/", $_SERVER['DOCUMENT_ROOT']) : "";
208205
$scriptRoot = isset($_SERVER['SCRIPT_FILENAME']) ? str_replace("//", "/", $_SERVER['SCRIPT_FILENAME']) : "";
209-
$isInstallRootPath = true;
206+
$doucmentUri = isset($_SERVER['DOCUMENT_URI']) ? $_SERVER['DOCUMENT_URI'] : "";
210207

208+
$isInstallRootPath = true;
211209
if(!$doucmentRoot || !$scriptRoot) {
212210
$isInstallRootPath = false;
213211
}
214-
215-
if($doucmentRoot.DIRECTORY_SEPARATOR."index.php" != $scriptRoot) {
212+
if($doucmentRoot.$doucmentUri != $scriptRoot) {
216213
$isInstallRootPath = false;
217214
}
218-
219215
if($isInstallRootPath === false) {
220216
echo $this->lang == 1 ? "目前只支持根目录运行" : "Currently only the root directory is supported.";
221217
return;
@@ -458,6 +454,30 @@ private function initPluginMiniProgram()
458454
'permissionType' => Zaly\Proto\Core\PluginPermissionType::PluginPermissionAll,
459455
'authKey' => "",
460456
],
457+
[
458+
'pluginId' => 104,
459+
'name' => "gif小程序",
460+
'logo' => "",
461+
'sort' => 2, //order = 2
462+
'landingPageUrl' => "index.php?action=miniProgram.gif.index",
463+
'landingPageWithProxy' => 1, //1 表示走site代理
464+
'usageType' => Zaly\Proto\Core\PluginUsageType::PluginUsageU2Message,
465+
'loadingType' => Zaly\Proto\Core\PluginLoadingType::PluginLoadingChatbox,
466+
'permissionType' => Zaly\Proto\Core\PluginPermissionType::PluginPermissionAll,
467+
'authKey' => "",
468+
],
469+
[
470+
'pluginId' => 104,
471+
'name' => "gif小程序",
472+
'logo' => "",
473+
'sort' => 2, //order = 2
474+
'landingPageUrl' => "index.php?action=miniProgram.gif.index",
475+
'landingPageWithProxy' => 1, //1 表示走site代理
476+
'usageType' => Zaly\Proto\Core\PluginUsageType::PluginUsageGroupMessage,
477+
'loadingType' => Zaly\Proto\Core\PluginLoadingType::PluginLoadingChatbox,
478+
'permissionType' => Zaly\Proto\Core\PluginPermissionType::PluginPermissionAll,
479+
'authKey' => "",
480+
],
461481
[
462482
'pluginId' => 105,
463483
'name' => "账户密码管理",

src/public/js/im/zalyGroupMsg.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,9 +2176,8 @@ function updateInfo(profileId, profileType)
21762176
}catch (error) {
21772177

21782178
}
2179-
21802179
var subName = name;
2181-
if(name.length>10) {
2180+
if(name!=undefined && name.length>10) {
21822181
subName = name.substr(0, 8) + "...";
21832182
}
21842183
$(".nickname_"+profileId).html(name);
@@ -2475,8 +2474,6 @@ $(document).on("click", ".permission-join", function () {
24752474
showWindow($("#permission-join"));
24762475
});
24772476

2478-
2479-
24802477
$(document).on("click", ".mark_down", function () {
24812478
var isMarkDown = $(".mark_down").attr("is_on");
24822479
if(isMarkDown == "on") {
@@ -2488,8 +2485,6 @@ $(document).on("click", ".mark_down", function () {
24882485
}
24892486
});
24902487

2491-
2492-
24932488
$(document).on("click", ".imgDiv", function () {
24942489
var imgDivs = $(".imgDiv");
24952490
var length = imgDivs.length;
@@ -2653,11 +2648,6 @@ function handleHtmlLanguage(html)
26532648

26542649

26552650

2656-
2657-
2658-
2659-
2660-
26612651
//-----------------------------------api.friend.update---------------------------------------------------------
26622652

26632653

src/public/js/im/zalyMsg.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ function appendOrInsertRoomList(msg, isInsert, showNotification)
206206

207207
}
208208

209-
if(name.length>10) {
209+
if(name !=undefined && name.length>10) {
210210
name = name.substr(0, 8) + "...";
211211
}
212212
var html = template("tpl-chatSession", {

0 commit comments

Comments
 (0)