@@ -39,6 +39,11 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | // Редактор |
42 | + |
|
43 | + /** |
|
44 | + * @param string $caption |
|
45 | + * @param string $name |
|
46 | + */ |
|
42 | 47 | public static function getWysiwygForm($caption, $name, $value = '') |
43 | 48 | { |
44 | 49 | $editor = false; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | break; |
65 | 65 | case 'int': |
66 | 66 | default: |
67 | - $ret = isset($global[$key]) ? (int)$global[$key] : (int)$default; |
|
67 | + $ret = isset($global[$key]) ? (int) $global[$key] : (int) $default; |
|
68 | 68 | break; |
69 | 69 | } |
70 | 70 | if (false === $ret) { |
@@ -22,7 +22,7 @@ discard block |
||
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 |
||
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, |
@@ -17,7 +17,7 @@ discard block |
||
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 |
||
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 | } |
@@ -3,14 +3,14 @@ discard block |
||
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 |
||
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 | } |
@@ -9,7 +9,7 @@ |
||
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 |
@@ -19,7 +19,7 @@ discard block |
||
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 |
||
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 | } |
@@ -42,7 +42,7 @@ discard block |
||
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 |
||
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"; |
@@ -51,7 +51,7 @@ |
||
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 | } |
@@ -63,7 +63,7 @@ |
||
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 | } |