@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | $instrid = Request::getInt('instrid', 0, 'POST'); |
| 55 | 55 | |
| 56 | 56 | // Проверка |
| 57 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 57 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 58 | 58 | $err = true; |
| 59 | 59 | $err_txt = implode(', ', $GLOBALS['xoopsSecurity']->getErrors()); |
| 60 | 60 | $message_err .= $err_txt . '<br>' . _AM_INSTR_TRY_AGAIN . '<br>'; |
@@ -114,28 +114,28 @@ discard block |
||
| 114 | 114 | $objInspage->setVar('dobr', $dobr); |
| 115 | 115 | |
| 116 | 116 | // Проверка категорий |
| 117 | - if (!$pageid && !$instrid) { |
|
| 118 | - $err = true; |
|
| 117 | + if ( ! $pageid && ! $instrid) { |
|
| 118 | + $err = true; |
|
| 119 | 119 | $message_err .= _AM_INSTRUCTION_ERR_INSTR . '<br>'; |
| 120 | 120 | } |
| 121 | 121 | // Проверка веса |
| 122 | 122 | if (0 == $weight) { |
| 123 | - $err = true; |
|
| 123 | + $err = true; |
|
| 124 | 124 | $message_err .= _AM_INSTRUCTION_ERR_WEIGHT . '<br>'; |
| 125 | 125 | } |
| 126 | 126 | // Проверка родительской страницы |
| 127 | 127 | if ($pageid && ($pageid == $pid)) { |
| 128 | - $err = true; |
|
| 128 | + $err = true; |
|
| 129 | 129 | $message_err .= _AM_INSTRUCTION_ERR_PPAGE . '<br>'; |
| 130 | 130 | } |
| 131 | 131 | // Проверка названия |
| 132 | - if (!$title) { |
|
| 133 | - $err = true; |
|
| 132 | + if ( ! $title) { |
|
| 133 | + $err = true; |
|
| 134 | 134 | $message_err .= _AM_INSTR_ERR_TITLE . '<br>'; |
| 135 | 135 | } |
| 136 | 136 | // Проверка основного текста |
| 137 | - if (!$hometext) { |
|
| 138 | - $err = true; |
|
| 137 | + if ( ! $hometext) { |
|
| 138 | + $err = true; |
|
| 139 | 139 | $message_err .= _AM_INSTR_ERR_HOMETEXT . '<br>'; |
| 140 | 140 | } |
| 141 | 141 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | case 'savecat': |
| 101 | 101 | |
| 102 | 102 | // Проверка |
| 103 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 103 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 104 | 104 | redirect_header('cat.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 105 | 105 | } |
| 106 | 106 | // Если мы редактируем |
@@ -126,12 +126,12 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | // Проверка веса |
| 128 | 128 | if (0 == $weight) { |
| 129 | - $err = true; |
|
| 129 | + $err = true; |
|
| 130 | 130 | $message_err .= _AM_INSTRUCTION_ERR_WEIGHT . '<br>'; |
| 131 | 131 | } |
| 132 | 132 | // Проверка категорий |
| 133 | 133 | if ($cid && ($cid == $pid)) { |
| 134 | - $err = true; |
|
| 134 | + $err = true; |
|
| 135 | 135 | $message_err .= _AM_INSTRUCTION_ERR_PCAT . '<br>'; |
| 136 | 136 | } |
| 137 | 137 | // Если были ошибки |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | $objInscat = $categoryHandler->get($cid); |
| 239 | 239 | // Если нет такой категории |
| 240 | - if (!is_object($objInscat)) { |
|
| 240 | + if ( ! is_object($objInscat)) { |
|
| 241 | 241 | redirect_header('cat.php', 3, _AM_INSTRUCTION_ERR_CATNOTSELECT); |
| 242 | 242 | } |
| 243 | 243 | |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | if ($ok) { |
| 259 | 259 | |
| 260 | 260 | // Проверка |
| 261 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 261 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 262 | 262 | redirect_header('cat.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 263 | 263 | } |
| 264 | 264 | // Пытаемся удалить категорию |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | // Получаем объект категории |
| 61 | 61 | $objInscat = $categoryHandler->get($cid); |
| 62 | 62 | // Если нет такой категории |
| 63 | - if (!is_object($objInscat)) { |
|
| 63 | + if ( ! is_object($objInscat)) { |
|
| 64 | 64 | redirect_header('cat.php', 3, _AM_INSTRUCTION_ERR_CATNOTSELECT); |
| 65 | 65 | } |
| 66 | 66 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | case 'saveinstr': |
| 167 | 167 | |
| 168 | 168 | // Проверка |
| 169 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 169 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 170 | 170 | redirect_header('instr.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 171 | 171 | } |
| 172 | 172 | // Если мы редактируем |
@@ -197,18 +197,18 @@ discard block |
||
| 197 | 197 | $objInsinstr->setVar('metadescription', Request::getString('metadescription', '')); |
| 198 | 198 | |
| 199 | 199 | // Проверка категорий |
| 200 | - if (!$cid) { |
|
| 201 | - $err = true; |
|
| 200 | + if ( ! $cid) { |
|
| 201 | + $err = true; |
|
| 202 | 202 | $message_err .= _AM_INSTRUCTION_ERR_CAT . '<br>'; |
| 203 | 203 | } |
| 204 | 204 | // Проверка названия |
| 205 | - if (!$instr_title) { |
|
| 206 | - $err = true; |
|
| 205 | + if ( ! $instr_title) { |
|
| 206 | + $err = true; |
|
| 207 | 207 | $message_err .= _AM_INSTR_ERR_TITLE . '<br>'; |
| 208 | 208 | } |
| 209 | 209 | // Проверка основного текста |
| 210 | - if (!$instr_description) { |
|
| 211 | - $err = true; |
|
| 210 | + if ( ! $instr_description) { |
|
| 211 | + $err = true; |
|
| 212 | 212 | $message_err .= _AM_INSTR_ERR_DESCRIPTION . '<br>'; |
| 213 | 213 | } |
| 214 | 214 | |
@@ -313,7 +313,7 @@ discard block |
||
| 313 | 313 | if ($ok) { |
| 314 | 314 | |
| 315 | 315 | // Проверка |
| 316 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 316 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 317 | 317 | redirect_header('instr.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 318 | 318 | } |
| 319 | 319 | // Находим все страницы, пренадлежащие этой инструкции |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $message_err = ''; |
| 401 | 401 | |
| 402 | 402 | // Проверка сессии |
| 403 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 403 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 404 | 404 | $err = true; |
| 405 | 405 | $err_txt = implode(', ', $GLOBALS['xoopsSecurity']->getErrors()); |
| 406 | 406 | $message_err .= $err_txt . '<br>'; |
@@ -458,28 +458,28 @@ discard block |
||
| 458 | 458 | $objInspage->setVar('dobr', $dobr); |
| 459 | 459 | |
| 460 | 460 | // |
| 461 | - if (!$pageid && !$instrid) { |
|
| 462 | - $err = true; |
|
| 461 | + if ( ! $pageid && ! $instrid) { |
|
| 462 | + $err = true; |
|
| 463 | 463 | $message_err .= _AM_INSTRUCTION_ERR_INSTR . '<br>'; |
| 464 | 464 | } |
| 465 | 465 | // Проверка веса |
| 466 | 466 | if (0 == $weight) { |
| 467 | - $err = true; |
|
| 467 | + $err = true; |
|
| 468 | 468 | $message_err .= _AM_INSTRUCTION_ERR_WEIGHT . '<br>'; |
| 469 | 469 | } |
| 470 | 470 | // Проверка родительской страницы |
| 471 | 471 | if ($pageid && ($pageid == $pid)) { |
| 472 | - $err = true; |
|
| 472 | + $err = true; |
|
| 473 | 473 | $message_err .= _AM_INSTRUCTION_ERR_PPAGE . '<br>'; |
| 474 | 474 | } |
| 475 | 475 | // Проверка названия |
| 476 | - if (!$page_title) { |
|
| 477 | - $err = true; |
|
| 476 | + if ( ! $page_title) { |
|
| 477 | + $err = true; |
|
| 478 | 478 | $message_err .= _AM_INSTR_ERR_TITLE . '<br>'; |
| 479 | 479 | } |
| 480 | 480 | // Проверка основного текста |
| 481 | - if (!$page_hometext) { |
|
| 482 | - $err = true; |
|
| 481 | + if ( ! $page_hometext) { |
|
| 482 | + $err = true; |
|
| 483 | 483 | $message_err .= _AM_INSTR_ERR_HOMETEXT . '<br>'; |
| 484 | 484 | } |
| 485 | 485 | |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | if ($ok) { |
| 548 | 548 | |
| 549 | 549 | // Проверка |
| 550 | - if (!$GLOBALS['xoopsSecurity']->check()) { |
|
| 550 | + if ( ! $GLOBALS['xoopsSecurity']->check()) { |
|
| 551 | 551 | redirect_header('instr.php', 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors())); |
| 552 | 552 | } |
| 553 | 553 | // ID инструкции |