Completed
Push — master ( 0afdc4...0e57e6 )
by Alexey
04:27
created
system/modules/Users/widgets/cabinet/usersTree.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -2,12 +2,12 @@  discard block
 block discarded – undo
2 2
 if (!empty($_POST['partnerInvite']['email'])) {
3 3
     $title = '';
4 4
     if (!empty($_POST['partnerInvite']['name'])) {
5
-        $title .='Ув. ' . htmlspecialchars($_POST['partnerInvite']['name']) . '. ';
5
+        $title .= 'Ув. '.htmlspecialchars($_POST['partnerInvite']['name']).'. ';
6 6
     }
7 7
     if (!filter_var($_POST['partnerInvite']['email'], FILTER_VALIDATE_EMAIL)) {
8 8
         Tools::redirect(null, 'Вы ввели не корректный E-mail', 'danger');
9 9
     }
10
-    $title = \Users\User::$cur->name() . ' приглашает вас зарегистрироваться на сайте: ' . idn_to_utf8(INJI_DOMAIN_NAME);
10
+    $title = \Users\User::$cur->name().' приглашает вас зарегистрироваться на сайте: '.idn_to_utf8(INJI_DOMAIN_NAME);
11 11
     $inviteCode = Tools::randomString(60);
12 12
     $invite = new Users\User\Invite();
13 13
     $invite->code = $inviteCode;
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
     $invite->limit = 1;
17 17
     $invite->save();
18 18
     $text = "<h3>{$title}</h3>";
19
-    $text .= '<p>Чтобы принять приглашение, перейдите по <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/users/registration?invite_code=' . $inviteCode . '">этой ссылке</a> и завершите процедуру регистрации</p>';
20
-    Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, $_POST['partnerInvite']['email'], $title, $text);
19
+    $text .= '<p>Чтобы принять приглашение, перейдите по <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/users/registration?invite_code='.$inviteCode.'">этой ссылке</a> и завершите процедуру регистрации</p>';
20
+    Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, $_POST['partnerInvite']['email'], $title, $text);
21 21
     Tools::redirect(null, 'Приглашение было отправлено', 'success');
22 22
 }
23 23
 $partners = App::$cur->users->getUserPartners(Users\User::$cur, 8);
Please login to merge, or discard this patch.
system/modules/Users/objects/SocialHelper/Google.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@  discard block
 block discarded – undo
22 22
                 'client_id' => $config['client_id'],
23 23
                 'scope' => 'https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
24 24
                 'response_type' => 'code',
25
-                'redirect_uri' => 'http://' . INJI_DOMAIN_NAME . '/users/social/auth/google'
25
+                'redirect_uri' => 'http://'.INJI_DOMAIN_NAME.'/users/social/auth/google'
26 26
             ];
27
-            \Tools::redirect("https://accounts.google.com/o/oauth2/auth?" . http_build_query($query));
27
+            \Tools::redirect("https://accounts.google.com/o/oauth2/auth?".http_build_query($query));
28 28
         }
29 29
         if (empty($_GET['code']) && !empty($_GET['error'])) {
30
-            \Tools::redirect('/', 'Произошла ошибка во время авторизации через соц. сеть: ' . $_GET['error_description']);
30
+            \Tools::redirect('/', 'Произошла ошибка во время авторизации через соц. сеть: '.$_GET['error_description']);
31 31
         }
32 32
         $query = [
33 33
             'client_id' => $config['client_id'],
34 34
             'client_secret' => $config['secret'],
35 35
             'code' => $_GET['code'],
36 36
             'grant_type' => 'authorization_code',
37
-            'redirect_uri' => 'http://' . INJI_DOMAIN_NAME . '/users/social/auth/google'
37
+            'redirect_uri' => 'http://'.INJI_DOMAIN_NAME.'/users/social/auth/google'
38 38
         ];
39 39
         $result = false;
40 40
         if ($curl = curl_init()) {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         $userQuery = [
56 56
             'access_token' => $result['access_token']
57 57
         ];
58
-        $userResult = @file_get_contents("https://www.googleapis.com/oauth2/v1/userinfo?" . http_build_query($userQuery));
58
+        $userResult = @file_get_contents("https://www.googleapis.com/oauth2/v1/userinfo?".http_build_query($userQuery));
59 59
         if (!$userResult) {
60 60
             \Tools::redirect('/', 'Во время авторизации произошли ошибки', 'danger');
61 61
         }
Please login to merge, or discard this patch.
system/modules/Users/objects/SocialHelper/Facebook.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,20 +21,20 @@  discard block
 block discarded – undo
21 21
                 'client_id' => $config['appId'],
22 22
                 'scope' => 'email',
23 23
                 'response_type' => 'code',
24
-                'redirect_uri' => 'http://' . INJI_DOMAIN_NAME . '/users/social/auth/facebook'
24
+                'redirect_uri' => 'http://'.INJI_DOMAIN_NAME.'/users/social/auth/facebook'
25 25
             ];
26
-            \Tools::redirect("https://www.facebook.com/dialog/oauth?" . http_build_query($query));
26
+            \Tools::redirect("https://www.facebook.com/dialog/oauth?".http_build_query($query));
27 27
         }
28 28
         if (empty($_GET['code']) && !empty($_GET['error'])) {
29
-            \Tools::redirect('/', 'Произошла ошибка во время авторизации через соц. сеть: ' . $_GET['error_description']);
29
+            \Tools::redirect('/', 'Произошла ошибка во время авторизации через соц. сеть: '.$_GET['error_description']);
30 30
         }
31 31
         $query = [
32 32
             'client_id' => $config['appId'],
33
-            'redirect_uri' => 'http://' . INJI_DOMAIN_NAME . '/users/social/auth/facebook',
33
+            'redirect_uri' => 'http://'.INJI_DOMAIN_NAME.'/users/social/auth/facebook',
34 34
             'client_secret' => $config['secret'],
35 35
             'code' => urldecode($_GET['code']),
36 36
         ];
37
-        $result = @file_get_contents("https://graph.facebook.com/oauth/access_token?" . http_build_query($query));
37
+        $result = @file_get_contents("https://graph.facebook.com/oauth/access_token?".http_build_query($query));
38 38
         if ($result === false) {
39 39
             \Tools::redirect('/', 'Во время авторизации произошли ошибки', 'danger');
40 40
         }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             'access_token' => $output['access_token'],
47 47
             'fields' => 'first_name,middle_name,last_name,email,gender,location,picture'
48 48
         ];
49
-        $userResult = @file_get_contents("https://graph.facebook.com/me?" . http_build_query($userQuery));
49
+        $userResult = @file_get_contents("https://graph.facebook.com/me?".http_build_query($userQuery));
50 50
         if (!$userResult) {
51 51
             \Tools::redirect('/', 'Во время авторизации произошли ошибки', 'danger');
52 52
         }
Please login to merge, or discard this patch.
system/modules/Callbacks/install_script.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
     //Категории
5 5
     App::$cur->db->createTable('callbacks_category', [
6 6
         'category_id' => 'pk',
@@ -19,8 +19,8 @@  discard block
 block discarded – undo
19 19
         'category_weight' => 'int(11) UNSIGNED NOT NULL',
20 20
         'category_date_create' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
21 21
             ], [
22
-        'INDEX ' . App::$cur->db->table_prefix . '_callbacks_category_category_parent_id (category_parent_id)',
23
-        'INDEX ' . App::$cur->db->table_prefix . '_callbacks_category_category_tree_path (category_tree_path(255))',
22
+        'INDEX '.App::$cur->db->table_prefix.'_callbacks_category_category_parent_id (category_parent_id)',
23
+        'INDEX '.App::$cur->db->table_prefix.'_callbacks_category_category_tree_path (category_tree_path(255))',
24 24
     ]);
25 25
     App::$cur->db->createTable('callbacks_callback', [
26 26
         'callback_id' => 'pk',
Please login to merge, or discard this patch.
system/modules/Callbacks/appControllers/CallbacksController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
             Tools::header(404);
40 40
             Tools::redirect('/', 'Отзыв не найден', 'danger');
41 41
         }
42
-        $this->view->setTitle('Отзыв: ' . $callback->name);
42
+        $this->view->setTitle('Отзыв: '.$callback->name);
43 43
         $this->view->page(['data' => compact('callback')]);
44 44
     }
45 45
 
Please login to merge, or discard this patch.
system/modules/Callbacks/Callbacks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
                 $callback->save();
48 48
                 if (!empty(App::$cur->config['site']['email'])) {
49 49
                     $subject = 'Новый отзыв';
50
-                    $text = 'Вы можете его посмотреть по этому адресу: <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/callbacks">http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/callbacks</a>';
51
-                    Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, App::$cur->config['site']['email'], $subject, $text);
50
+                    $text = 'Вы можете его посмотреть по этому адресу: <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/callbacks">http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/callbacks</a>';
51
+                    Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, App::$cur->config['site']['email'], $subject, $text);
52 52
                 }
53 53
                 Tools::redirect('/', 'Ваш отзыв был получен и появится после обработки администратором', 'success');
54 54
             }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         if (!empty($conf['files']['aditionTemplateFiels'])) {
86 86
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
87
-                $return[$file['file']] = '- ' . $file['name'];
87
+                $return[$file['file']] = '- '.$file['name'];
88 88
             }
89 89
         }
90 90
         return $return;
Please login to merge, or discard this patch.
system/modules/Files/appAdminControllers/content/managerForEditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
             if ($file->type->group == 'image') {
26 26
                 echo "<img class='img-responsive' src ='{$file->path}?resize=200x200' />";
27 27
             } else {
28
-                echo "<img class='img-responsive' src ='/static/moduleAsset/Files/images/formats/" . pathinfo($file->path, PATHINFO_EXTENSION) . ".png' />";
28
+                echo "<img class='img-responsive' src ='/static/moduleAsset/Files/images/formats/".pathinfo($file->path, PATHINFO_EXTENSION).".png' />";
29 29
             }
30 30
             ?>
31 31
 
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/editor.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -12,22 +12,22 @@  discard block
 block discarded – undo
12 12
     'Операции'
13 13
 ]);
14 14
 $modulePath = Module::getModulePath($module);
15
-$path = $modulePath . '/models';
16
-$config = Config::custom(App::$primary->path . '/modules/' . $module . '/generatorHash.php');
15
+$path = $modulePath.'/models';
16
+$config = Config::custom(App::$primary->path.'/modules/'.$module.'/generatorHash.php');
17 17
 if (file_exists($path)) {
18 18
     $files = array_slice(scandir($path), 2);
19 19
     foreach ($files as $file) {
20
-        if (is_dir($path . '/' . $file)) {
20
+        if (is_dir($path.'/'.$file)) {
21 21
             continue;
22 22
         }
23 23
         $modelName = pathinfo($file, PATHINFO_FILENAME);
24 24
         $table->addRow([
25 25
             $modelName,
26
-            (!empty($config['models/' . $file]) && $config['models/' . $file] == md5(file_get_contents($path . '/' . $file))) ? '<b class="text-success">Нету</b>' : '<b class="text-danger">Есть</b>',
26
+            (!empty($config['models/'.$file]) && $config['models/'.$file] == md5(file_get_contents($path.'/'.$file))) ? '<b class="text-success">Нету</b>' : '<b class="text-danger">Есть</b>',
27 27
             [
28 28
                 'class' => 'actionTd',
29
-                'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/editModel/' . $module . '/' . $modelName . '"><i class="glyphicon glyphicon-edit"></i></a>'
30
-                . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delModel/' . $module . '/' . $modelName . '"><i class="glyphicon glyphicon-remove"></i></a>'
29
+                'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/editModel/'.$module.'/'.$modelName.'"><i class="glyphicon glyphicon-edit"></i></a>'
30
+                . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delModel/'.$module.'/'.$modelName.'"><i class="glyphicon glyphicon-remove"></i></a>'
31 31
             ]
32 32
         ]);
33 33
     }
@@ -50,16 +50,16 @@  discard block
 block discarded – undo
50 50
     'Controllers'
51 51
 ];
52 52
 foreach ($types as $type) {
53
-    if (file_exists($modulePath . '/' . $type)) {
54
-        $files = array_slice(scandir($modulePath . '/' . $type), 2);
53
+    if (file_exists($modulePath.'/'.$type)) {
54
+        $files = array_slice(scandir($modulePath.'/'.$type), 2);
55 55
         foreach ($files as $file) {
56 56
             $table->addRow([
57 57
                 pathinfo($file, PATHINFO_FILENAME),
58 58
                 $type,
59 59
                 [
60 60
                     'class' => 'actionTd',
61
-                    'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/controllerEditor/' . $module . '/' . $type . '/' . pathinfo($file, PATHINFO_FILENAME) . '"><i class="glyphicon glyphicon-edit"></i></a>'
62
-                    . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delController/' . $module . '/' . $type . '/' . pathinfo($file, PATHINFO_FILENAME) . '"><i class="glyphicon glyphicon-remove"></i></a>'
61
+                    'html' => '<a class="btn btn-xs btn-success" href="/admin/modules/controllerEditor/'.$module.'/'.$type.'/'.pathinfo($file, PATHINFO_FILENAME).'"><i class="glyphicon glyphicon-edit"></i></a>'
62
+                    . ' <a class="btn btn-xs btn-danger" href="/admin/modules/delController/'.$module.'/'.$type.'/'.pathinfo($file, PATHINFO_FILENAME).'"><i class="glyphicon glyphicon-remove"></i></a>'
63 63
                 ]
64 64
             ]);
65 65
         }
Please login to merge, or discard this patch.
system/modules/Modules/appAdminControllers/content/modelEditor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 $form = new Ui\Form();
3
-$form->begin((!empty($modelFullName) ? 'Изменение' : 'Создание') . ' модели');
3
+$form->begin((!empty($modelFullName) ? 'Изменение' : 'Создание').' модели');
4 4
 $cols = [
5 5
     'label' => ['type' => 'text', 'label' => 'Название'],
6 6
     'code' => ['type' => 'text', 'label' => 'Код'],
Please login to merge, or discard this patch.