Completed
Push — master ( 22f988...f05393 )
by Michael
01:55
created
class/Instruction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
         $form->addElement(new \XoopsFormText(_AM_INSTRUCTION_METADESCRIPTIONC, 'metadescription', 50, 255, $this->getVar('metadescription')), false);
119 119
 
120 120
         // Если мы редактируем категорию
121
-        if (!$this->isNew()) {
121
+        if ( ! $this->isNew()) {
122 122
             $form->addElement(new \XoopsFormHidden('instrid', $this->getVar('instrid')));
123 123
         }
124 124
         //
Please login to merge, or discard this patch.
class/InstructionHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,9 +32,9 @@
 block discarded – undo
32 32
     public function updateDateupdated($instrid = 0, $time = null)
33 33
     {
34 34
         // Если не передали время
35
-        $time = null === $time ? time() : (int)$time;
35
+        $time = null === $time ? time() : (int) $time;
36 36
         //
37
-        $sql = sprintf('UPDATE `%s` SET `dateupdated` = %u WHERE `instrid` = %u', $this->table, $time, (int)$instrid);
37
+        $sql = sprintf('UPDATE `%s` SET `dateupdated` = %u WHERE `instrid` = %u', $this->table, $time, (int) $instrid);
38 38
         //
39 39
         return $this->db->query($sql);
40 40
     }
Please login to merge, or discard this patch.
class/Tree.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $prefix_curr .= $prefix_orig;
79 79
         }
80 80
 
81
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
81
+        if (isset($this->tree[$key]['child']) && ! empty($this->tree[$key]['child'])) {
82 82
             foreach ($this->tree[$key]['child'] as $childkey) {
83 83
                 $this->_makePagesAdminOptions($childkey, $ret, $prefix_orig, $objInsinstr, $class, $prefix_curr);
84 84
             }
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             $prefix_curr .= $prefix_orig;
173 173
         }
174 174
 
175
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
175
+        if (isset($this->tree[$key]['child']) && ! empty($this->tree[$key]['child'])) {
176 176
             foreach ($this->tree[$key]['child'] as $childkey) {
177 177
                 $this->_makeCatsAdminOptions($childkey, $ret, $prefix_orig, $cidinstrids, $class, $prefix_curr);
178 178
             }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
         }
290 290
 
291 291
         // Рекурсия
292
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
292
+        if (isset($this->tree[$key]['child']) && ! empty($this->tree[$key]['child'])) {
293 293
             foreach ($this->tree[$key]['child'] as $childkey) {
294 294
                 $this->_makePagesUserTree($childkey, $ret, $currpageid, $lastpageids, $level);
295 295
             }
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         }
351 351
 
352 352
         // Рекурсия
353
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
353
+        if (isset($this->tree[$key]['child']) && ! empty($this->tree[$key]['child'])) {
354 354
             foreach ($this->tree[$key]['child'] as $childkey) {
355 355
                 $this->_makePagesUserCalc($childkey, $currpageid, $prevpages, $nextpages, $lastpageids, $level);
356 356
             }
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
@@ -7,14 +7,14 @@  discard block
 block discarded – undo
7 7
  */
8 8
 function instruction_tag_iteminfo(&$items)
9 9
 {
10
-    if (empty($items) || !is_array($items)) {
10
+    if (empty($items) || ! is_array($items)) {
11 11
         return false;
12 12
     }
13 13
 
14 14
     $items_id = [];
15 15
     foreach (array_keys($items) as $cat_id) {
16 16
         foreach (array_keys($items[$cat_id]) as $item_id) {
17
-            $items_id[] = (int)$item_id;
17
+            $items_id[] = (int) $item_id;
18 18
         }
19 19
     }
20 20
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                . '            OR aa.status < 1'
71 71
                . '        )';
72 72
     endif;
73
-    if (!$result = $linkHandler->db->queryF($sql)) {
73
+    if ( ! $result = $linkHandler->db->queryF($sql)) {
74 74
         //xoops_error($linkHandler->db->error());
75 75
     }
76 76
 }
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
 $debug = false;
71 71
 
72
-if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof \XoopsTpl)) {
72
+if ( ! isset($GLOBALS['xoopsTpl']) || ! ($GLOBALS['xoopsTpl'] instanceof \XoopsTpl)) {
73 73
     require_once $GLOBALS['xoops']->path('class/template.php');
74 74
     $xoopsTpl = new \XoopsTpl();
75 75
 }
Please login to merge, or discard this patch.
page.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
 // Права на просмотр инструкции
61 61
 $categories = Xoopsmodules\instruction\Utility::getItemIds();
62
-if (!in_array($objInsinstr->getVar('cid'), $categories)) {
62
+if ( ! in_array($objInsinstr->getVar('cid'), $categories)) {
63 63
     redirect_header(XOOPS_URL . '/modules/' . $moduleDirName . '/', 3, _NOPERM);
64 64
     exit();
65 65
 }
Please login to merge, or discard this patch.
index.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
 if ($cid) {
65 65
     // Если нельзя просматривать эту категорию
66
-    if (!in_array($cid, $categories)) {
66
+    if ( ! in_array($cid, $categories)) {
67 67
         redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_CAT);
68 68
     }
69 69
     $criteria->add(new \Criteria('cid', $cid, '='));
Please login to merge, or discard this patch.
submit.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             // Объект инструкции
54 54
             $objInsinstr = $instructionHandler->get($instrid);
55 55
             // Можно ли редактировать инструкцию в данной категории
56
-            if (!in_array($objInsinstr->getVar('cid'), $cat_edit)) {
56
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_edit)) {
57 57
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_EDITPAGE);
58 58
             }
59 59
             // Создание новой страницы
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             // Объект инструкции
67 67
             $objInsinstr = $instructionHandler->get($instrid);
68 68
             // Можно ли добавлять инструкции в данной категории
69
-            if (!in_array($objInsinstr->getVar('cid'), $cat_submit)) {
69
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_submit)) {
70 70
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_SUBMITPAGE);
71 71
             }
72 72
         } else {
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
     case 'savepage':
102 102
 
103 103
         // Проверка
104
-        if (!$GLOBALS['xoopsSecurity']->check()) {
104
+        if ( ! $GLOBALS['xoopsSecurity']->check()) {
105 105
             redirect_header('index.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
106 106
         }
107 107
 
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             // Объект инструкции
115 115
             $objInsinstr = $instructionHandler->get($objInspage->getVar('instrid'));
116 116
             // Можно ли редактировать инструкцию в данной категории
117
-            if (!in_array($objInsinstr->getVar('cid'), $cat_edit)) {
117
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_edit)) {
118 118
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_EDITPAGE);
119 119
             }
120 120
         } elseif ($instrid) {
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
             // Объект инструкции
123 123
             $objInsinstr = $instructionHandler->get($instrid);
124 124
             // Можно ли добавлять инструкции в данной категории
125
-            if (!in_array($objInsinstr->getVar('cid'), $cat_submit)) {
125
+            if ( ! in_array($objInsinstr->getVar('cid'), $cat_submit)) {
126 126
                 redirect_header('index.php', 3, _MD_INSTRUCTION_NOPERM_SUBMITPAGE);
127 127
             }
128 128
 
@@ -151,18 +151,18 @@  discard block
 block discarded – undo
151 151
         $objInspage->setVar('description', Request::getText('description', '', 'POST'));
152 152
 
153 153
         // Проверка категорий
154
-        if (!$pageid && !$instrid) {
155
-            $err         = true;
154
+        if ( ! $pageid && ! $instrid) {
155
+            $err = true;
156 156
             $message_err .= _MD_INSTRUCTION_ERR_INSTR . '<br>';
157 157
         }
158 158
         // Проверка веса
159 159
         if (0 == $weight) {
160
-            $err         = true;
160
+            $err = true;
161 161
             $message_err .= _MD_INSTRUCTION_ERR_WEIGHT . '<br>';
162 162
         }
163 163
         // Проверка родительской страницы
164 164
         if ($pageid && ($pageid == $pid)) {
165
-            $err         = true;
165
+            $err = true;
166 166
             $message_err .= _MD_INSTRUCTION_ERR_PPAGE . '<br>';
167 167
         }
168 168
         // Если были ошибки
Please login to merge, or discard this patch.
class/common/ServerStats.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $html .= "<ul>\n";
44 44
         //
45 45
         $gdlib = function_exists('gd_info') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_GDON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_GDOFF') . '</span>';
46
-        $html  .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
46
+        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS') . $gdlib;
47 47
         if (function_exists('gd_info')) {
48 48
             if (true === ($gdlib = gd_info())) {
49 49
                 $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_GDLIBVERSION') . '<b>' . $gdlib['GD Version'] . '</b>';
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         //    $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_REGISTERGLOBALS . $registerglobals;
58 58
         //
59 59
         $downloads = ini_get('file_uploads') ? '<span style="color: green;">' . constant('CO_' . $moduleDirNameUpper . '_ON') . '</span>' : '<span style="color: red;">' . constant('CO_' . $moduleDirNameUpper . '_OFF') . '</span>';
60
-        $html      .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
60
+        $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS') . $downloads;
61 61
         //
62 62
         $html .= '<li>' . constant('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE') . ' <b><span style="color: blue;">' . ini_get('upload_max_filesize') . "</span></b>\n";
63 63
         $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.