Completed
Push — master ( 8239ac...55b92e )
by Michael
01:49
created
include/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $moduleDirName = basename(dirname(__DIR__));
23 23
 $capsDirName   = strtoupper($moduleDirName);
24 24
 
25
-if (!defined($capsDirName . '_DIRNAME')) {
25
+if ( ! defined($capsDirName . '_DIRNAME')) {
26 26
     //if (!defined(constant($capsDirName . '_DIRNAME'))) {
27 27
     define($capsDirName . '_DIRNAME', $GLOBALS['xoopsModule']->dirname());
28 28
     define($capsDirName . '_PATH', XOOPS_ROOT_PATH . '/modules/' . constant($capsDirName . '_DIRNAME'));
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 }
36 36
 
37 37
 //Configurator
38
-return (object)[
38
+return (object) [
39 39
     'name'          => strtoupper($moduleDirName) . ' Module Configurator',
40 40
     'paths'         => [
41 41
         'dirname'    => $moduleDirName,
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-if (!defined('INSTRUCTION_MODULE_PATH')) {
20
+if ( ! defined('INSTRUCTION_MODULE_PATH')) {
21 21
     define('INSTRUCTION_DIRNAME', basename(dirname(__DIR__)));
22 22
     define('INSTRUCTION_URL', XOOPS_URL . '/modules/' . INSTRUCTION_DIRNAME);
23 23
     define('INSTRUCTION_IMAGE_URL', INSTRUCTION_URL . '/assets/images/');
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 $instruction = Instruction::getInstance();
46 46
 $instruction->loadLanguage('common');
47 47
 
48
-if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) {
48
+if ( ! isset($GLOBALS['xoopsTpl']) || ! ($GLOBALS['xoopsTpl'] instanceof XoopsTpl)) {
49 49
     require_once $GLOBALS['xoops']->path('class/template.php');
50 50
     $xoopsTpl = new XoopsTpl();
51 51
 }
Please login to merge, or discard this patch.
include/plugin.tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,14 +3,14 @@  discard block
 block discarded – undo
3 3
 // Информация об теге
4 4
 function instruction_tag_iteminfo(&$items)
5 5
 {
6
-    if (empty($items) || !is_array($items)) {
6
+    if (empty($items) || ! is_array($items)) {
7 7
         return false;
8 8
     }
9 9
 
10 10
     $items_id = [];
11 11
     foreach (array_keys($items) as $cat_id) {
12 12
         foreach (array_keys($items[$cat_id]) as $item_id) {
13
-            $items_id[] = (int)$item_id;
13
+            $items_id[] = (int) $item_id;
14 14
         }
15 15
     }
16 16
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                . '            OR aa.status < 1'
63 63
                . '        )';
64 64
     endif;
65
-    if (!$result = $linkHandler->db->queryF($sql)) {
65
+    if ( ! $result = $linkHandler->db->queryF($sql)) {
66 66
         //xoops_error($linkHandler->db->error());
67 67
     }
68 68
 }
Please login to merge, or discard this patch.
include/search.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 
10 10
     $sql = 'SELECT p.pageid, p.title, p.uid, p.datecreated, i.title FROM ' . $GLOBALS['xoopsDB']->prefix('instruction_page') . ' p, ' . $GLOBALS['xoopsDB']->prefix('instruction_instr') . ' i WHERE i.instrid = p.instrid AND i.status > 0 AND p.status > 0 AND p.type > 0';
11 11
     if (0 != $userid) {
12
-        $sql .= ' AND p.uid = ' . (int)$userid . ' ';
12
+        $sql .= ' AND p.uid = ' . (int) $userid . ' ';
13 13
         //return NULL;
14 14
     }
15 15
 
Please login to merge, or discard this patch.
submit.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -14,17 +14,17 @@  discard block
 block discarded – undo
14 14
 $time = time();
15 15
 
16 16
 // ID инструкции
17
-$instrid = isset($_GET['instrid']) ? (int)$_GET['instrid'] : 0;
18
-$instrid = isset($_POST['instrid']) ? (int)$_POST['instrid'] : $instrid;
17
+$instrid = isset($_GET['instrid']) ? (int) $_GET['instrid'] : 0;
18
+$instrid = isset($_POST['instrid']) ? (int) $_POST['instrid'] : $instrid;
19 19
 // ID страницы
20
-$pageid = isset($_GET['pageid']) ? (int)$_GET['pageid'] : 0;
21
-$pageid = isset($_POST['pageid']) ? (int)$_POST['pageid'] : $pageid;
20
+$pageid = isset($_GET['pageid']) ? (int) $_GET['pageid'] : 0;
21
+$pageid = isset($_POST['pageid']) ? (int) $_POST['pageid'] : $pageid;
22 22
 // ID категории
23
-$cid = isset($_POST['cid']) ? (int)$_POST['cid'] : 0;
23
+$cid = isset($_POST['cid']) ? (int) $_POST['cid'] : 0;
24 24
 // Вес
25
-$weight = isset($_POST['weight']) ? (int)$_POST['weight'] : 0;
25
+$weight = isset($_POST['weight']) ? (int) $_POST['weight'] : 0;
26 26
 //
27
-$pid = isset($_POST['pid']) ? (int)$_POST['pid'] : 0;
27
+$pid = isset($_POST['pid']) ? (int) $_POST['pid'] : 0;
28 28
 
29 29
 // Права на добавление
30 30
 $cat_submit = InstructionUtility::getItemIds($moduleDirName . '_submit');
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             // Объект инструкции
55 55
             $objInsinstr = $insinstrHandler->get($instrid);
56 56
             // Можно ли редактировать инструкцию в данной категории
57
-            if (!in_array($objInsinstr->getVar('cid'), $cat_edit)) {
57
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_edit)) {
58 58
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_EDITPAGE);
59 59
             }
60 60
             // Создание новой страницы
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
             // Объект инструкции
68 68
             $objInsinstr = $insinstrHandler->get($instrid);
69 69
             // Можно ли добавлять инструкции в данной категории
70
-            if (!in_array($objInsinstr->getVar('cid'), $cat_submit)) {
70
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_submit)) {
71 71
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_SUBMITPAGE);
72 72
             }
73 73
         } else {
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     case 'savepage':
103 103
 
104 104
         // Проверка
105
-        if (!$GLOBALS['xoopsSecurity']->check()) {
105
+        if ( ! $GLOBALS['xoopsSecurity']->check()) {
106 106
             redirect_header('index.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
107 107
         }
108 108
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             // Объект инструкции
116 116
             $objInsinstr = $insinstrHandler->get($objInspage->getVar('instrid'));
117 117
             // Можно ли редактировать инструкцию в данной категории
118
-            if (!in_array($objInsinstr->getVar('cid'), $cat_edit)) {
118
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_edit)) {
119 119
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_EDITPAGE);
120 120
             }
121 121
         } elseif ($instrid) {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
             // Объект инструкции
124 124
             $objInsinstr = $insinstrHandler->get($instrid);
125 125
             // Можно ли добавлять инструкции в данной категории
126
-            if (!in_array($objInsinstr->getVar('cid'), $cat_submit)) {
126
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_submit)) {
127 127
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_SUBMITPAGE);
128 128
             }
129 129
 
@@ -152,18 +152,18 @@  discard block
 block discarded – undo
152 152
         $objInspage->setVar('description', $_POST['description']);
153 153
 
154 154
         // Проверка категорий
155
-        if (!$pageid && !$instrid) {
156
-            $err         = true;
155
+        if ( ! $pageid && ! $instrid) {
156
+            $err = true;
157 157
             $message_err .= _MD_INSTRUCTION_ERR_INSTR . '<br>';
158 158
         }
159 159
         // Проверка веса
160 160
         if (0 == $weight) {
161
-            $err         = true;
161
+            $err = true;
162 162
             $message_err .= _MD_INSTRUCTION_ERR_WEIGHT . '<br>';
163 163
         }
164 164
         // Проверка родительской страницы
165 165
         if ($pageid && ($pageid == $pid)) {
166
-            $err         = true;
166
+            $err = true;
167 167
             $message_err .= _MD_INSTRUCTION_ERR_PPAGE . '<br>';
168 168
         }
169 169
         // Если были ошибки
Please login to merge, or discard this patch.
page.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 // Получаем данные
21 21
 // ID страницы
22
-$pageid = isset($_GET['id']) ? (int)$_GET['id'] : 0;
22
+$pageid = isset($_GET['id']) ? (int) $_GET['id'] : 0;
23 23
 // Без кэша
24 24
 $nocache = InstructionUtility::cleanVars($_GET, 'nocache', 0, 'int');
25 25
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 // Права на просмотр инструкции
60 60
 $categories = InstructionUtility::getItemIds();
61
-if (!in_array($objInsinstr->getVar('cid'), $categories)) {
61
+if ( ! in_array($objInsinstr->getVar('cid'), $categories)) {
62 62
     redirect_header(XOOPS_URL . '/modules/' . $moduleDirName . '/', 3, _NOPERM);
63 63
     exit();
64 64
 }
Please login to merge, or discard this patch.
class/common/traitserverstats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         $html .= "<ul>\n";
43 43
         //
44 44
         $gdlib = function_exists('gd_info') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
45
-        $html  .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
45
+        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
46 46
         if (function_exists('gd_info')) {
47 47
             if ($gdlib = true === gd_info()) {
48 48
                 $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
57 57
         //
58 58
         $downloads = ini_get('file_uploads') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
59
-        $html      .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
59
+        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
60 60
         //
61 61
         $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . "</span></b>\n";
62 62
         $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE') . ' <b><span style="color: blue;">' . ini_get('post_max_size') . "</span></b>\n";
Please login to merge, or discard this patch.
class/common/traitversionchecks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
                     break;
52 52
                 }
53 53
             } else {
54
-                if ((int)$v > 0) { // handles versions like x.x.x.0_RC2
54
+                if ((int) $v > 0) { // handles versions like x.x.x.0_RC2
55 55
                     $success = false;
56 56
                     break;
57 57
                 }
Please login to merge, or discard this patch.
class/common/breadcrumb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
      */
64 64
     public function render()
65 65
     {
66
-        if (!isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme'])) {
66
+        if ( ! isset($GLOBALS['xoTheme']) || ! is_object($GLOBALS['xoTheme'])) {
67 67
             require_once $GLOBALS['xoops']->path('class/theme.php');
68 68
             $GLOBALS['xoTheme'] = new xos_opal_Theme();
69 69
         }
Please login to merge, or discard this patch.