исправление иморта деловых линий
This commit is contained in:
parent
fc38285d06
commit
a11a21d1ab
File diff suppressed because it is too large
Load Diff
|
@ -24,9 +24,9 @@ class DellinController extends Controller
|
||||||
/**
|
/**
|
||||||
* Импортировать терминалы из ДеловыеЛинии
|
* Импортировать терминалы из ДеловыеЛинии
|
||||||
*/
|
*/
|
||||||
public function actionImportTerminals()
|
public function actionImportTerminals(?int $account = null)
|
||||||
{
|
{
|
||||||
if (Dellin::importTerminals()) {
|
if (Dellin::importTerminals($account)) {
|
||||||
return ExitCode::OK;
|
return ExitCode::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -295,15 +295,19 @@ class Dellin extends Model
|
||||||
if (is_null($account)) {
|
if (is_null($account)) {
|
||||||
// Данные аккаунта не переданы
|
// Данные аккаунта не переданы
|
||||||
|
|
||||||
if (yii::$app->user->isGuest) {
|
if (isset(yii::$app->user)) {
|
||||||
// Аккаунт не аутентифицирован
|
if (yii::$app->user->isGuest) {
|
||||||
|
// Аккаунт не аутентифицирован
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
} else {
|
||||||
|
// Аккаунт аутентифицирован
|
||||||
|
|
||||||
|
// Инициализация
|
||||||
|
$account = yii::$app->user->identity;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Аккаунт аутентифицирован
|
return 0;
|
||||||
|
|
||||||
// Инициализация
|
|
||||||
$account = yii::$app->user->identity;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (is_int($account)) {
|
if (is_int($account)) {
|
||||||
|
|
Reference in New Issue