@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | $inscatHandler = xoops_getModuleHandler('category', 'instruction'); |
| 12 | 12 | $inspageHandler = xoops_getModuleHandler('page', 'instruction'); |
| 13 | 13 | |
| 14 | -$instrid = isset($_GET['id']) ? (int)$_GET['id'] : 0; |
|
| 14 | +$instrid = isset($_GET['id']) ? (int) $_GET['id'] : 0; |
|
| 15 | 15 | |
| 16 | 16 | // Существует ли такая инструкция |
| 17 | 17 | $criteria = new CriteriaCompo(); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | // Права на просмотр инструкции |
| 42 | 42 | $categories = InstructionUtility::getItemIds(); |
| 43 | -if (!in_array($objInsinstr->getVar('cid'), $categories)) { |
|
| 43 | +if ( ! in_array($objInsinstr->getVar('cid'), $categories)) { |
|
| 44 | 44 | redirect_header(XOOPS_URL . '/modules/' . $moduleDirName . '/', 3, _NOPERM); |
| 45 | 45 | exit(); |
| 46 | 46 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | |
| 10 | 10 | /** @var InstructionUtility $utilityClass */ |
| 11 | 11 | $utilityClass = ucfirst($moduleDirName) . 'Utility'; |
| 12 | -if (!class_exists($utilityClass)) { |
|
| 12 | +if ( ! class_exists($utilityClass)) { |
|
| 13 | 13 | xoops_load('utility', $moduleDirName); |
| 14 | 14 | } |
| 15 | 15 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // Подключаем трей |
| 33 | 33 | |
| 34 | - include_once __DIR__ . '/../class/tree.php'; |
|
| 34 | + include_once __DIR__ . '/../class/tree.php'; |
|
| 35 | 35 | //include_once $GLOBALS['xoops']->path('modules/instruction/class/tree.php'); |
| 36 | 36 | |
| 37 | 37 | // Заголовок админки |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | case 'savecat': |
| 103 | 103 | |
| 104 | 104 | // Проверка |
| 105 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 105 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 106 | 106 | redirect_header('cat.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 107 | 107 | } |
| 108 | 108 | // Если мы редактируем |
@@ -128,12 +128,12 @@ discard block |
||
| 128 | 128 | |
| 129 | 129 | // Проверка веса |
| 130 | 130 | if (0 == $weight) { |
| 131 | - $err = true; |
|
| 131 | + $err = true; |
|
| 132 | 132 | $message_err .= _AM_INSTRUCTION_ERR_WEIGHT . '<br>'; |
| 133 | 133 | } |
| 134 | 134 | // Проверка категорий |
| 135 | 135 | if ($cid && ($cid == $pid)) { |
| 136 | - $err = true; |
|
| 136 | + $err = true; |
|
| 137 | 137 | $message_err .= _AM_INSTRUCTION_ERR_PCAT . '<br>'; |
| 138 | 138 | } |
| 139 | 139 | // Если были ошибки |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | |
| 242 | 242 | $objInscat = $instructioncatHandler->get($cid); |
| 243 | 243 | // Если нет такой категории |
| 244 | - if (!is_object($objInscat)) { |
|
| 244 | + if ( ! is_object($objInscat)) { |
|
| 245 | 245 | redirect_header('cat.php', 3, _AM_INSTRUCTION_ERR_CATNOTSELECT); |
| 246 | 246 | } |
| 247 | 247 | |
@@ -257,12 +257,12 @@ discard block |
||
| 257 | 257 | } |
| 258 | 258 | |
| 259 | 259 | // Нажали ли мы на кнопку OK |
| 260 | - $ok = isset($_POST['ok']) ? (int)$_POST['ok'] : 0; |
|
| 260 | + $ok = isset($_POST['ok']) ? (int) $_POST['ok'] : 0; |
|
| 261 | 261 | // Если мы нажали на кнопку |
| 262 | 262 | if ($ok) { |
| 263 | 263 | |
| 264 | 264 | // Проверка |
| 265 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 265 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 266 | 266 | redirect_header('cat.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 267 | 267 | } |
| 268 | 268 | // Пытаемся удалить категорию |