Skip to content

Commit c10bb32

Browse files
committed
fixed
1 parent f699729 commit c10bb32

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

BotApp.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public function __construct($auth)
5353
{
5454
$this->auth = $auth;
5555
$this->params = $this->loadParams();
56-
5756
$this->language = $this->params[$_REQUEST['auth']['application_token']]['LANGUAGE_ID'];
5857
$this->messages = $this->loadMessages();
5958
}
@@ -85,7 +84,7 @@ public function uninstall()
8584
{
8685
$configFileName = '/config_' . trim(str_replace('.', '_', $_REQUEST['auth']['domain'])) . '.php';
8786

88-
if (file_exists($configFileName)) {
87+
if (file_exists(__DIR__.'/../../../'.$configFileName)) {
8988
unlink($configFileName);
9089
}
9190

@@ -114,7 +113,7 @@ public function saveParams($params)
114113
$config = "<?php\n";
115114
$config .= "\return " . var_export($params, true) . ";\n";
116115
$configFileName = '/config_' . trim(str_replace('.', '_', $_REQUEST['auth']['domain'])) . '.php';
117-
file_put_contents(__DIR__ . $configFileName, $config);
116+
file_put_contents(__DIR__ . '/../../../' . $configFileName, $config);
118117

119118
return true;
120119
}
@@ -169,8 +168,8 @@ protected function call($method, array $params = array())
169168
protected function loadParams()
170169
{
171170
$configFileName = '/config_' . trim(str_replace('.', '_', $_REQUEST['auth']['domain'])) . '.php';
172-
if (file_exists(__DIR__ . $configFileName)) {
173-
return include_once __DIR__ . $configFileName;
171+
if (file_exists(realpath(__DIR__ . '/../../../' . $configFileName))) {
172+
return include __DIR__ . '/../../../' . $configFileName;
174173
}
175174

176175
return false;
@@ -183,8 +182,8 @@ protected function loadParams()
183182
*/
184183
protected function loadMessages()
185184
{
186-
if ($this->language != $this->default_language && file_exists(__DIR__.'/messages/'.$this->language.'.php')) {
187-
return include __DIR__.'/messages/'.$this->messages.'.php';
185+
if ($this->language != $this->default_language && file_exists(realpath(__DIR__.'/../../../messages/'.$this->language.'.php'))) {
186+
return include __DIR__.'/../../../messages/'.$this->language.'.php';
188187
}
189188

190189
return [];

Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function __construct($url, $title, $dialog_id = 0)
3333
{
3434
$this->dialog_id = $dialog_id;
3535
$this->title = $title;
36-
$this->url = $url;
36+
$this->link = $url;
3737
}
3838

3939
/**

0 commit comments

Comments
 (0)