Completed
Push — master ( e23147...f5725e )
by Michael
01:48
created
include/pagetypes.inc.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 // Типы страницы
3 3
 return [
4
-    0 => _AM_INSTR_PT_0,
5
-    1 => _AM_INSTR_PT_1
4
+	0 => _AM_INSTR_PT_0,
5
+	1 => _AM_INSTR_PT_1
6 6
 ];
Please login to merge, or discard this patch.
comment_new.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -7,12 +7,12 @@
 block discarded – undo
7 7
 
8 8
 $com_itemid = Request::getInt('com_itemid', 0, 'GET');
9 9
 if ($com_itemid > 0) {
10
-    $itemObj       = $publisher->getHandler('item')->get($com_itemid);
11
-    $com_replytext = _POSTEDBY . '&nbsp;<strong>' . $itemObj->getLinkedPosterName() . '</strong>&nbsp;' . _DATE . '&nbsp;<strong>' . $itemObj->dateSub() . '</strong><br><br>' . $itemObj->summary();
12
-    $bodytext      = $itemObj->body();
13
-    if ('' != $bodytext) {
14
-        $com_replytext .= '<br><br>' . $bodytext . '';
15
-    }
16
-    $com_replytitle = $itemObj->getTitle();
17
-    include_once $GLOBALS['xoops']->path('include/comment_new.php');
10
+	$itemObj       = $publisher->getHandler('item')->get($com_itemid);
11
+	$com_replytext = _POSTEDBY . '&nbsp;<strong>' . $itemObj->getLinkedPosterName() . '</strong>&nbsp;' . _DATE . '&nbsp;<strong>' . $itemObj->dateSub() . '</strong><br><br>' . $itemObj->summary();
12
+	$bodytext      = $itemObj->body();
13
+	if ('' != $bodytext) {
14
+		$com_replytext .= '<br><br>' . $bodytext . '';
15
+	}
16
+	$com_replytitle = $itemObj->getTitle();
17
+	include_once $GLOBALS['xoops']->path('include/comment_new.php');
18 18
 }
Please login to merge, or discard this patch.
admin/perm.php 1 patch
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -36,24 +36,24 @@  discard block
 block discarded – undo
36 36
 $moduleId = $GLOBALS['xoopsModule']->getVar('mid');
37 37
 
38 38
 switch ($permission) {
39
-    // Права на просмотр
40
-    case 1:
41
-        $formTitle             = _AM_INSTRUCTION_PERM_VIEW;
42
-        $permissionName        = 'instruction_view';
43
-        $permissionDescription = _AM_INSTRUCTION_PERM_VIEW_DSC;
44
-        break;
45
-    // Права на добавление
46
-    case 2:
47
-        $formTitle             = _AM_INSTRUCTION_PERM_SUBMIT;
48
-        $permissionName        = 'instruction_submit';
49
-        $permissionDescription = _AM_INSTRUCTION_PERM_SUBMIT_DSC;
50
-        break;
51
-    // Права на редактирование
52
-    case 3:
53
-        $formTitle             = _AM_INSTRUCTION_PERM_EDIT;
54
-        $permissionName        = 'instruction_edit';
55
-        $permissionDescription = _AM_INSTRUCTION_PERM_EDIT_DSC;
56
-        break;
39
+	// Права на просмотр
40
+	case 1:
41
+		$formTitle             = _AM_INSTRUCTION_PERM_VIEW;
42
+		$permissionName        = 'instruction_view';
43
+		$permissionDescription = _AM_INSTRUCTION_PERM_VIEW_DSC;
44
+		break;
45
+	// Права на добавление
46
+	case 2:
47
+		$formTitle             = _AM_INSTRUCTION_PERM_SUBMIT;
48
+		$permissionName        = 'instruction_submit';
49
+		$permissionDescription = _AM_INSTRUCTION_PERM_SUBMIT_DSC;
50
+		break;
51
+	// Права на редактирование
52
+	case 3:
53
+		$formTitle             = _AM_INSTRUCTION_PERM_EDIT;
54
+		$permissionName        = 'instruction_edit';
55
+		$permissionDescription = _AM_INSTRUCTION_PERM_EDIT_DSC;
56
+		break;
57 57
 }
58 58
 
59 59
 // Права
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 $sql    = 'SELECT cid, pid, title FROM ' . $xoopsDB->prefix('instruction_cat') . ' ORDER BY title';
63 63
 $result = $xoopsDB->query($sql);
64 64
 if ($result) {
65
-    while ($row = $xoopsDB->fetchArray($result)) {
66
-        $permissionsForm->addItem($row['cid'], $row['title'], $row['pid']);
67
-    }
65
+	while ($row = $xoopsDB->fetchArray($result)) {
66
+		$permissionsForm->addItem($row['cid'], $row['title'], $row['pid']);
67
+	}
68 68
 }
69 69
 
70 70
 echo $permissionsForm->render();
Please login to merge, or discard this patch.
class/Tree.php 2 patches
Doc Comments   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
     //    }
24 24
 
25 25
     /**
26
-     * @param        $key
27
-     * @param        $ret
28
-     * @param        $prefix_orig
26
+     * @param        integer $key
27
+     * @param        string $ret
28
+     * @param        string $prefix_orig
29 29
      * @param        $objInsinstr
30 30
      * @param string $class
31 31
      * @param string $prefix_curr
@@ -140,9 +140,9 @@  discard block
 block discarded – undo
140 140
     // ==================================
141 141
 
142 142
     /**
143
-     * @param        $key
144
-     * @param        $ret
145
-     * @param        $prefix_orig
143
+     * @param        integer $key
144
+     * @param        string $ret
145
+     * @param        string $prefix_orig
146 146
      * @param array  $cidinstrids
147 147
      * @param string $class
148 148
      * @param string $prefix_curr
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
     // ======================================
240 240
 
241 241
     /**
242
-     * @param       $key
243
-     * @param       $ret
242
+     * @param       integer $key
243
+     * @param       string $ret
244 244
      * @param int   $currpageid
245 245
      * @param array $lastpageids
246 246
      * @param int   $level
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
     // Находим предыдущую и следующую страницы.
351 351
     // Находим последнии страницы на каждом уровне.
352 352
     /**
353
-     * @param       $key
353
+     * @param       integer $key
354 354
      * @param int   $currpageid
355 355
      * @param array $prevpages
356 356
      * @param array $nextpages
Please login to merge, or discard this patch.
Indentation   +365 added lines, -365 removed lines patch added patch discarded remove patch
@@ -18,97 +18,97 @@  discard block
 block discarded – undo
18 18
  */
19 19
 class Tree extends \XoopsObjectTree
20 20
 {
21
-    //    public function __construct()
22
-    //    {
23
-    //    }
24
-
25
-    /**
26
-     * @param        $key
27
-     * @param        $ret
28
-     * @param        $prefix_orig
29
-     * @param        $objInsinstr
30
-     * @param string $class
31
-     * @param string $prefix_curr
32
-     */
33
-    public function _makePagesAdminOptions($key, &$ret, $prefix_orig, $objInsinstr, $class = 'odd', $prefix_curr = '')
34
-    {
35
-        $pathIcon16    = \Xmf\Module\Admin::iconUrl('', 16);
36
-        if ($key > 0) {
37
-
38
-            //
39
-            $class = ('even' === $class) ? 'odd' : 'even';
40
-            // ID инструкции ( Можно сделать статической )
41
-            $instrid = $objInsinstr->getVar('instrid');
42
-
43
-            // ID страницы
44
-            $pageid = $this->tree[$key]['obj']->getVar('pageid');
45
-            // Название страницы
46
-            $pagetitle = $this->tree[$key]['obj']->getVar('title');
47
-            // Вес
48
-            $pageweight = $this->tree[$key]['obj']->getVar('weight');
49
-            // Статус
50
-            $pagestatus = $this->tree[$key]['obj']->getVar('status');
51
-            // Тип страницы
52
-            $pagetype = $this->tree[$key]['obj']->getVar('type');
53
-
54
-            // Дочернии страницы
55
-            $page_childs = $this->getAllChild($pageid);
56
-            // Число дочерних страниц
57
-            $num_childs = count($page_childs);
58
-
59
-            // Действие - удаление
60
-            $act_del = ($num_childs > 0) ? '<img src="../assets/images/icons/16/application_key.png" alt="' . _AM_INSTR_NODELPAGE . '" title="' . _AM_INSTR_NODELPAGE . '" />' : '<a href="instr.php?op=delpage&pageid='
61
-                                                                                                                                                                      . $pageid
62
-                                                                                                                                                                      . '"><img src="'. $pathIcon16 . '/delete.png" alt="'
63
-                                                                                                                                                                      . _AM_INSTRUCTION_DEL
64
-                                                                                                                                                                      . '" title="'
65
-                                                                                                                                                                      . _AM_INSTRUCTION_DEL
66
-                                                                                                                                                                      . '"></a>';
67
-            //
68
-            $page_link = '<a name="pageid_' . $pageid . '" ' . ($pagetype ? 'href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/page.php?id=' . $pageid . '#pagetext"' : '') . '>' . $pagetitle . '</a>';
69
-
70
-            $ret .= '<tr class="' . $class . '">
21
+	//    public function __construct()
22
+	//    {
23
+	//    }
24
+
25
+	/**
26
+	 * @param        $key
27
+	 * @param        $ret
28
+	 * @param        $prefix_orig
29
+	 * @param        $objInsinstr
30
+	 * @param string $class
31
+	 * @param string $prefix_curr
32
+	 */
33
+	public function _makePagesAdminOptions($key, &$ret, $prefix_orig, $objInsinstr, $class = 'odd', $prefix_curr = '')
34
+	{
35
+		$pathIcon16    = \Xmf\Module\Admin::iconUrl('', 16);
36
+		if ($key > 0) {
37
+
38
+			//
39
+			$class = ('even' === $class) ? 'odd' : 'even';
40
+			// ID инструкции ( Можно сделать статической )
41
+			$instrid = $objInsinstr->getVar('instrid');
42
+
43
+			// ID страницы
44
+			$pageid = $this->tree[$key]['obj']->getVar('pageid');
45
+			// Название страницы
46
+			$pagetitle = $this->tree[$key]['obj']->getVar('title');
47
+			// Вес
48
+			$pageweight = $this->tree[$key]['obj']->getVar('weight');
49
+			// Статус
50
+			$pagestatus = $this->tree[$key]['obj']->getVar('status');
51
+			// Тип страницы
52
+			$pagetype = $this->tree[$key]['obj']->getVar('type');
53
+
54
+			// Дочернии страницы
55
+			$page_childs = $this->getAllChild($pageid);
56
+			// Число дочерних страниц
57
+			$num_childs = count($page_childs);
58
+
59
+			// Действие - удаление
60
+			$act_del = ($num_childs > 0) ? '<img src="../assets/images/icons/16/application_key.png" alt="' . _AM_INSTR_NODELPAGE . '" title="' . _AM_INSTR_NODELPAGE . '" />' : '<a href="instr.php?op=delpage&pageid='
61
+																																									  . $pageid
62
+																																									  . '"><img src="'. $pathIcon16 . '/delete.png" alt="'
63
+																																									  . _AM_INSTRUCTION_DEL
64
+																																									  . '" title="'
65
+																																									  . _AM_INSTRUCTION_DEL
66
+																																									  . '"></a>';
67
+			//
68
+			$page_link = '<a name="pageid_' . $pageid . '" ' . ($pagetype ? 'href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/page.php?id=' . $pageid . '#pagetext"' : '') . '>' . $pagetitle . '</a>';
69
+
70
+			$ret .= '<tr class="' . $class . '">
71 71
       <td>' . $prefix_curr . ' ' . $page_link . '</td>
72 72
       <td align="center" width="50">
73 73
         <input type="text" name="weights[]" size="2" value="' . $pageweight . '" />
74 74
         <input type="hidden" name="pageids[]" value="' . $pageid . '" />
75 75
       </td>
76 76
       <td align="center" width="180">';
77
-            // Просмотре без кэша
78
-            $ret .= ' <a href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/page.php?id=' . $pageid . '&amp;nocache=1"><img src="../assets/images/icons/16/database_black.png" alt="' . _AM_INSTR_DISPLAY_NOCACHE . '" title="' . _AM_INSTR_DISPLAY_NOCACHE . '" /></a> ';
79
-            // Добавить подстраницу
80
-            $ret .= ' <a href="instr.php?op=editpage&instrid=' . $instrid . '&pid=' . $pageid . '"><img src="'. $pathIcon16 . '/add.png" alt="' . _AM_INSTRUCTION_ADDSUBPAGE . '" title="' . _AM_INSTRUCTION_ADDSUBPAGE . '" /></a> ';
81
-
82
-            if ($pagestatus) {
83
-                $ret .= ' <img src="../assets/images/icons/16/lock.png" alt="' . _AM_INSTRUCTION_LOCK . '" title="' . _AM_INSTRUCTION_LOCK . '"> ';
84
-            } else {
85
-                $ret .= ' <img src="../assets/images/icons/16/lock_open.png" alt="' . _AM_INSTRUCTION_UNLOCK . '" title="' . _AM_INSTRUCTION_UNLOCK . '"> ';
86
-            }
87
-
88
-            $ret .= ' <a href="instr.php?op=editpage&pageid=' . $pageid . '"><img src="'. $pathIcon16 . '/edit.png" alt="' . _AM_INSTRUCTION_EDIT . '" title="' . _AM_INSTRUCTION_EDIT . '"></a> ' . $act_del . '
77
+			// Просмотре без кэша
78
+			$ret .= ' <a href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/page.php?id=' . $pageid . '&amp;nocache=1"><img src="../assets/images/icons/16/database_black.png" alt="' . _AM_INSTR_DISPLAY_NOCACHE . '" title="' . _AM_INSTR_DISPLAY_NOCACHE . '" /></a> ';
79
+			// Добавить подстраницу
80
+			$ret .= ' <a href="instr.php?op=editpage&instrid=' . $instrid . '&pid=' . $pageid . '"><img src="'. $pathIcon16 . '/add.png" alt="' . _AM_INSTRUCTION_ADDSUBPAGE . '" title="' . _AM_INSTRUCTION_ADDSUBPAGE . '" /></a> ';
81
+
82
+			if ($pagestatus) {
83
+				$ret .= ' <img src="../assets/images/icons/16/lock.png" alt="' . _AM_INSTRUCTION_LOCK . '" title="' . _AM_INSTRUCTION_LOCK . '"> ';
84
+			} else {
85
+				$ret .= ' <img src="../assets/images/icons/16/lock_open.png" alt="' . _AM_INSTRUCTION_UNLOCK . '" title="' . _AM_INSTRUCTION_UNLOCK . '"> ';
86
+			}
87
+
88
+			$ret .= ' <a href="instr.php?op=editpage&pageid=' . $pageid . '"><img src="'. $pathIcon16 . '/edit.png" alt="' . _AM_INSTRUCTION_EDIT . '" title="' . _AM_INSTRUCTION_EDIT . '"></a> ' . $act_del . '
89 89
       </td>
90 90
     </tr>';
91 91
 
92
-            // Устанавливаем префикс
93
-            $prefix_curr .= $prefix_orig;
94
-        }
95
-
96
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
97
-            foreach ($this->tree[$key]['child'] as $childkey) {
98
-                $this->_makePagesAdminOptions($childkey, $ret, $prefix_orig, $objInsinstr, $class, $prefix_curr);
99
-            }
100
-        }
101
-    }
102
-
103
-    /**
104
-     * @param        $objInsinstr
105
-     * @param string $prefix
106
-     * @param int    $key
107
-     * @return string
108
-     */
109
-    public function makePagesAdmin(&$objInsinstr, $prefix = '-', $key = 0)
110
-    {
111
-        $ret = '<form name="inspages" action="instr.php" method="post">
92
+			// Устанавливаем префикс
93
+			$prefix_curr .= $prefix_orig;
94
+		}
95
+
96
+		if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
97
+			foreach ($this->tree[$key]['child'] as $childkey) {
98
+				$this->_makePagesAdminOptions($childkey, $ret, $prefix_orig, $objInsinstr, $class, $prefix_curr);
99
+			}
100
+		}
101
+	}
102
+
103
+	/**
104
+	 * @param        $objInsinstr
105
+	 * @param string $prefix
106
+	 * @param int    $key
107
+	 * @return string
108
+	 */
109
+	public function makePagesAdmin(&$objInsinstr, $prefix = '-', $key = 0)
110
+	{
111
+		$ret = '<form name="inspages" action="instr.php" method="post">
112 112
   <table width="100%" cellspacing="1" class="outer">
113 113
     <tr>
114 114
       <th align="center" colspan="3">' . sprintf(_AM_INSTRUCTION_LISTPAGESININSTR, $objInsinstr->getVar('title')) . '</th>
@@ -119,10 +119,10 @@  discard block
 block discarded – undo
119 119
       <td class="head" align="center" width="180">' . _AM_INSTRUCTION_ACTION . '</td>
120 120
     </tr>';
121 121
 
122
-        // Выводим все страницы
123
-        $this->_makePagesAdminOptions($key, $ret, $prefix, $objInsinstr);
122
+		// Выводим все страницы
123
+		$this->_makePagesAdminOptions($key, $ret, $prefix, $objInsinstr);
124 124
 
125
-        $ret .= '<tr class="foot">
125
+		$ret .= '<tr class="foot">
126 126
       <td><a href="instr.php?op=editpage&instrid=' . $objInsinstr->getVar('instrid') . '"><img src="'. $pathIcon16 . '/add.png" alt="' . _AM_INSTRUCTION_ADDPAGE . '" title="' . _AM_INSTRUCTION_ADDPAGE . '"></a></td>
127 127
       <td colspan="2">
128 128
         <input type="hidden" name="instrid" value="' . $objInsinstr->getVar('instrid') . '" />
@@ -133,61 +133,61 @@  discard block
 block discarded – undo
133 133
   </table>
134 134
 </form>';
135 135
 
136
-        return $ret;
137
-    }
138
-
139
-    // ==================================
140
-    // === Дерево категорий в админке ===
141
-    // ==================================
142
-
143
-    /**
144
-     * @param        $key
145
-     * @param        $ret
146
-     * @param        $prefix_orig
147
-     * @param array  $cidinstrids
148
-     * @param string $class
149
-     * @param string $prefix_curr
150
-     */
151
-    public function _makeCatsAdminOptions($key, &$ret, $prefix_orig, $cidinstrids = [], &$class = 'odd', $prefix_curr = '')
152
-    {
153
-        $pathIcon16    = \Xmf\Module\Admin::iconUrl('', 16);
154
-        if ($key > 0) {
155
-
156
-            //
157
-            $class = ('even' === $class) ? 'odd' : 'even';
158
-
159
-            // ID категории
160
-            $catid = $this->tree[$key]['obj']->getVar('cid');
161
-            // Название категории
162
-            $cattitle = $this->tree[$key]['obj']->getVar('title');
163
-            // Вес
164
-            $catweight = $this->tree[$key]['obj']->getVar('weight');
165
-            // Статус
166
-            $pagestatus = $this->tree[$key]['obj']->getVar('status');
167
-
168
-            // Дочернии категории
169
-            $cat_childs = $this->getAllChild($catid);
170
-            // Число дочерних категорий
171
-            $num_childs = count($cat_childs);
172
-            // Число инструкций
173
-            $num_instrs = isset($cidinstrids[$catid]) ? $cidinstrids[$catid] : 0;
174
-
175
-            // Действие - удаление
176
-            $act_del = (($num_instrs > 0) || ($num_childs > 0)) ? '<img src="'. $pathIcon16 . '/delete.png" alt="' . _AM_INSTR_NODELCAT . '" title="' . _AM_INSTR_NODELCAT . '" />' : '<a href="cat.php?op=delcat&cid='
177
-                                                                                                                                                                                           . $catid
178
-                                                                                                                                                                                           . '"><img src="'. $pathIcon16 . '/delete.png" alt="'
179
-                                                                                                                                                                                           . _AM_INSTRUCTION_DEL
180
-                                                                                                                                                                                           . '" title="'
181
-                                                                                                                                                                                           . _AM_INSTRUCTION_DEL
182
-                                                                                                                                                                                           . '" /></a>';
183
-            // Действие - просмотр
184
-            $act_view = ($num_instrs > 0) ? '<a href="instr.php?cid=' . $catid . '"><img src="'. $pathIcon16 . '/view.png" alt="' . _AM_INSTR_VIEWINSTR . '" title="' . _AM_INSTR_VIEWINSTR . '" /></a>' : '<img src="../assets/images/icons/16/document_protect.png" alt="'
185
-                                                                                                                                                                                                             . _AM_INSTR_NOVIEWINSTR
186
-                                                                                                                                                                                                             . '" title="'
187
-                                                                                                                                                                                                             . _AM_INSTR_NOVIEWINSTR
188
-                                                                                                                                                                                                             . '" />';
189
-
190
-            $ret .= '<tr class="' . $class . '">
136
+		return $ret;
137
+	}
138
+
139
+	// ==================================
140
+	// === Дерево категорий в админке ===
141
+	// ==================================
142
+
143
+	/**
144
+	 * @param        $key
145
+	 * @param        $ret
146
+	 * @param        $prefix_orig
147
+	 * @param array  $cidinstrids
148
+	 * @param string $class
149
+	 * @param string $prefix_curr
150
+	 */
151
+	public function _makeCatsAdminOptions($key, &$ret, $prefix_orig, $cidinstrids = [], &$class = 'odd', $prefix_curr = '')
152
+	{
153
+		$pathIcon16    = \Xmf\Module\Admin::iconUrl('', 16);
154
+		if ($key > 0) {
155
+
156
+			//
157
+			$class = ('even' === $class) ? 'odd' : 'even';
158
+
159
+			// ID категории
160
+			$catid = $this->tree[$key]['obj']->getVar('cid');
161
+			// Название категории
162
+			$cattitle = $this->tree[$key]['obj']->getVar('title');
163
+			// Вес
164
+			$catweight = $this->tree[$key]['obj']->getVar('weight');
165
+			// Статус
166
+			$pagestatus = $this->tree[$key]['obj']->getVar('status');
167
+
168
+			// Дочернии категории
169
+			$cat_childs = $this->getAllChild($catid);
170
+			// Число дочерних категорий
171
+			$num_childs = count($cat_childs);
172
+			// Число инструкций
173
+			$num_instrs = isset($cidinstrids[$catid]) ? $cidinstrids[$catid] : 0;
174
+
175
+			// Действие - удаление
176
+			$act_del = (($num_instrs > 0) || ($num_childs > 0)) ? '<img src="'. $pathIcon16 . '/delete.png" alt="' . _AM_INSTR_NODELCAT . '" title="' . _AM_INSTR_NODELCAT . '" />' : '<a href="cat.php?op=delcat&cid='
177
+																																														   . $catid
178
+																																														   . '"><img src="'. $pathIcon16 . '/delete.png" alt="'
179
+																																														   . _AM_INSTRUCTION_DEL
180
+																																														   . '" title="'
181
+																																														   . _AM_INSTRUCTION_DEL
182
+																																														   . '" /></a>';
183
+			// Действие - просмотр
184
+			$act_view = ($num_instrs > 0) ? '<a href="instr.php?cid=' . $catid . '"><img src="'. $pathIcon16 . '/view.png" alt="' . _AM_INSTR_VIEWINSTR . '" title="' . _AM_INSTR_VIEWINSTR . '" /></a>' : '<img src="../assets/images/icons/16/document_protect.png" alt="'
185
+																																																			 . _AM_INSTR_NOVIEWINSTR
186
+																																																			 . '" title="'
187
+																																																			 . _AM_INSTR_NOVIEWINSTR
188
+																																																			 . '" />';
189
+
190
+			$ret .= '<tr class="' . $class . '">
191 191
       <td>' . $prefix_curr . ' <a href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/index.php?cid=' . $catid . '">' . $cattitle . '</a></td>
192 192
       <td align="center" width="50">' . $catweight . '</td>
193 193
       <td align="center" width="100">' . $num_instrs . '</td>
@@ -198,26 +198,26 @@  discard block
 block discarded – undo
198 198
       </td>
199 199
     </tr>';
200 200
 
201
-            // Устанавливаем префикс
202
-            $prefix_curr .= $prefix_orig;
203
-        }
204
-
205
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
206
-            foreach ($this->tree[$key]['child'] as $childkey) {
207
-                $this->_makeCatsAdminOptions($childkey, $ret, $prefix_orig, $cidinstrids, $class, $prefix_curr);
208
-            }
209
-        }
210
-    }
211
-
212
-    /**
213
-     * @param string $prefix
214
-     * @param array  $cidinstrids
215
-     * @param int    $key
216
-     * @return string
217
-     */
218
-    public function makeCatsAdmin($prefix = '-', $cidinstrids = [], $key = 0)
219
-    {
220
-        $ret = '<table width="100%" cellspacing="1" class="outer">
201
+			// Устанавливаем префикс
202
+			$prefix_curr .= $prefix_orig;
203
+		}
204
+
205
+		if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
206
+			foreach ($this->tree[$key]['child'] as $childkey) {
207
+				$this->_makeCatsAdminOptions($childkey, $ret, $prefix_orig, $cidinstrids, $class, $prefix_curr);
208
+			}
209
+		}
210
+	}
211
+
212
+	/**
213
+	 * @param string $prefix
214
+	 * @param array  $cidinstrids
215
+	 * @param int    $key
216
+	 * @return string
217
+	 */
218
+	public function makeCatsAdmin($prefix = '-', $cidinstrids = [], $key = 0)
219
+	{
220
+		$ret = '<table width="100%" cellspacing="1" class="outer">
221 221
     <tr>
222 222
       <th align="center" colspan="4">' . _AM_INSTR_LISTALLCATS . '</th>
223 223
     </tr>
@@ -228,216 +228,216 @@  discard block
 block discarded – undo
228 228
       <td class="head" align="center" width="150">' . _AM_INSTRUCTION_ACTION . '</td>
229 229
     </tr>';
230 230
 
231
-        // Выводим все страницы
232
-        $this->_makeCatsAdminOptions($key, $ret, $prefix, $cidinstrids);
233
-
234
-        $ret .= '</table>';
235
-
236
-        return $ret;
237
-    }
238
-
239
-    // ======================================
240
-    // Список страниц на стороне пользователя
241
-    // ======================================
242
-
243
-    /**
244
-     * @param       $key
245
-     * @param       $ret
246
-     * @param int   $currpageid
247
-     * @param array $lastpageids
248
-     * @param int   $level
249
-     */
250
-    public function _makePagesUserTree($key, &$ret, $currpageid = 0, &$lastpageids = [], $level = 0)
251
-    {
252
-
253
-        // Сохраняем значение предыдущей страницы
254
-        //static $stat_prevpages;
255
-
256
-        if ($key > 0) {
257
-
258
-            // ID страницы
259
-            $pageid = $this->tree[$key]['obj']->getVar('pageid');
260
-            // Название страницы
261
-            $pagetitle = $this->tree[$key]['obj']->getVar('title');
262
-            // Тип страницы
263
-            $pagetype = $this->tree[$key]['obj']->getVar('type');
264
-
265
-            // Дочернии категории
266
-            $page_childs = $this->getAllChild($pageid);
267
-            // Число дочерних страниц
268
-            $num_childs = count($page_childs);
269
-
270
-            // Генерируем класс
271
-            // InstrTreeNode InstrTreeIsRoot InstrTreeExpandClosed InstrTreeIsLast
272
-            $class = [];
273
-            // Данный класс должен быть у любого узла
274
-            $class[] = 'InstrTreeNode';
275
-            // Если узел нулевого уровня, добавляем InstrTreeIsRoot
276
-            if (0 === $level) {
277
-                $class[] = 'InstrTreeIsRoot';
278
-            }
279
-            // Тип узла InstrTreeExpandClosed|InstrTreeExpandLeaf
280
-            // Если у узла нет потомков - InstrTreeExpandLeaf
281
-            if (0 == $num_childs) {
282
-                $class[] = 'InstrTreeExpandLeaf';
283
-                // Если у искомого элемента есть потомки - открываем список
284
-            } elseif ($currpageid == $pageid) {
285
-                $class[] = 'InstrTreeExpandOpen';
286
-                // Если искомый элемент есть в потомках текущего, то ставим класс InstrTreeExpandOpen
287
-            } elseif (array_key_exists($currpageid, $page_childs)) {
288
-                $class[] = 'InstrTreeExpandOpen';
289
-                //
290
-            } else {
291
-                $class[] = 'InstrTreeExpandClosed';
292
-            }
293
-
294
-            // Данный класс нужно добавлять последнему узлу в каждом уровне
295
-
296
-            if (isset($lastpageids[$level]) && ($pageid == $lastpageids[$level])) {
297
-                $class[] = 'InstrTreeIsLast';
298
-            }
299
-
300
-            //$class[] = 'InstrTreeIsLast';
301
-
302
-            // Test
303
-            //$ret .= '<div id="' . $pageid . '">';
304
-
305
-            // Создаём запись
306
-            $ret .= '<li class="' . implode(' ', $class) . '">';
307
-            //
308
-            $ret .= '<div class="InstrTreeExpand"></div>';
309
-            //
310
-            $ret .= '<div class="InstrTreeContent">';
311
-
312
-            // Если это лист дерева
313
-            if (0 == $pagetype) {
314
-                $ret .= '<span class="InstrTreeEmptyPage">' . $pagetitle . '</span>';
315
-                //
316
-            } elseif ($currpageid == $pageid) {
317
-                $ret .= $pagetitle;
318
-                //
319
-            } else {
320
-                $ret .= '<a href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/page.php?id=' . $pageid . '#pagetext">' . $pagetitle . '</a>';
321
-            }
322
-
323
-            $ret .= '</div>';
324
-
325
-            // Если есть потомки
326
-            if ($num_childs > 0) {
327
-                $ret .= '<ul class="InstrTreeContainer">';
328
-            }
329
-
330
-            // Инкримент уровня
331
-            $level++;
332
-        }
333
-
334
-        // Рекурсия
335
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
336
-            foreach ($this->tree[$key]['child'] as $childkey) {
337
-                $this->_makePagesUserTree($childkey, $ret, $currpageid, $lastpageids, $level);
338
-            }
339
-        }
340
-
341
-        // Test
342
-        if ($key > 0) {
343
-            // Если есть потомки
344
-            if ($num_childs > 0) {
345
-                $ret .= '</ul>';
346
-            }
347
-            // Конец текущей записи
348
-            $ret .= '</li>';
349
-        }
350
-    }
351
-
352
-    // Находим предыдущую и следующую страницы.
353
-    // Находим последнии страницы на каждом уровне.
354
-    /**
355
-     * @param       $key
356
-     * @param int   $currpageid
357
-     * @param array $prevpages
358
-     * @param array $nextpages
359
-     * @param array $lastpageids
360
-     * @param int   $level
361
-     */
362
-    public function _makePagesUserCalc($key, $currpageid = 0, &$prevpages = [], &$nextpages = [], &$lastpageids = [], $level = 0)
363
-    {
364
-
365
-        // Сохраняем значение предыдущей страницы
366
-        static $stat_prevpages;
367
-
368
-        if ($key > 0) {
369
-            // ID страницы
370
-            $pageid = $this->tree[$key]['obj']->getVar('pageid');
371
-            // Название страницы
372
-            $pagetitle = $this->tree[$key]['obj']->getVar('title');
373
-            // Тип страницы
374
-            $pagetype = $this->tree[$key]['obj']->getVar('type');
375
-
376
-            // Если мы передали ID текущей страницы, то находить предыдудую и следующую страницы
377
-            // Не находить предыдущие и следующие для "Пустой страницы"
378
-            if ($currpageid && $pagetype) {
379
-                // Если элемент равен текущей странице
380
-                if (null !== $stat_prevpages && ($currpageid == $pageid)) {
381
-                    // Забиваем массив предыдущей страницы
382
-                    $prevpages['pageid'] = $stat_prevpages['pageid'];
383
-                    $prevpages['title']  = $stat_prevpages['title'];
384
-
385
-                    // Если предыдущий равен текущей странице
386
-                } elseif (null !== $stat_prevpages && ($currpageid == $stat_prevpages['pageid'])) {
387
-                    // Забиваем массив следующей страницы
388
-                    $nextpages['pageid'] = $pageid;
389
-                    $nextpages['title']  = $pagetitle;
390
-                }
391
-                // Заносим текущие данные в массив предыдущей страницы
392
-                $stat_prevpages['pageid'] = $pageid;
393
-                $stat_prevpages['title']  = $pagetitle;
394
-            }
395
-
396
-            // Заносим текущую страницу в массив "последних страний"
397
-            $lastpageids[$level] = $pageid;
398
-
399
-            // Инкримент уровня
400
-            $level++;
401
-        }
402
-
403
-        // Рекурсия
404
-        if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
405
-            foreach ($this->tree[$key]['child'] as $childkey) {
406
-                $this->_makePagesUserCalc($childkey, $currpageid, $prevpages, $nextpages, $lastpageids, $level);
407
-            }
408
-        }
409
-    }
410
-
411
-    //
412
-
413
-    /**
414
-     * @param int   $currpageid
415
-     * @param array $prevpages
416
-     * @param array $nextpages
417
-     * @param int   $key
418
-     * @return string
419
-     */
420
-    public function makePagesUser($currpageid = 0, &$prevpages = [], &$nextpages = [], $key = 0)
421
-    {
422
-
423
-        // Массив последней страницы на каждом уровне
424
-        // level => pageid
425
-        $lastpageids = [];
426
-
427
-        // Расчёт
428
-        $this->_makePagesUserCalc($key, $currpageid, $prevpages, $nextpages, $lastpageids);
429
-
430
-        $ret = '<div onclick="instr_tree_toggle(arguments[0])">
231
+		// Выводим все страницы
232
+		$this->_makeCatsAdminOptions($key, $ret, $prefix, $cidinstrids);
233
+
234
+		$ret .= '</table>';
235
+
236
+		return $ret;
237
+	}
238
+
239
+	// ======================================
240
+	// Список страниц на стороне пользователя
241
+	// ======================================
242
+
243
+	/**
244
+	 * @param       $key
245
+	 * @param       $ret
246
+	 * @param int   $currpageid
247
+	 * @param array $lastpageids
248
+	 * @param int   $level
249
+	 */
250
+	public function _makePagesUserTree($key, &$ret, $currpageid = 0, &$lastpageids = [], $level = 0)
251
+	{
252
+
253
+		// Сохраняем значение предыдущей страницы
254
+		//static $stat_prevpages;
255
+
256
+		if ($key > 0) {
257
+
258
+			// ID страницы
259
+			$pageid = $this->tree[$key]['obj']->getVar('pageid');
260
+			// Название страницы
261
+			$pagetitle = $this->tree[$key]['obj']->getVar('title');
262
+			// Тип страницы
263
+			$pagetype = $this->tree[$key]['obj']->getVar('type');
264
+
265
+			// Дочернии категории
266
+			$page_childs = $this->getAllChild($pageid);
267
+			// Число дочерних страниц
268
+			$num_childs = count($page_childs);
269
+
270
+			// Генерируем класс
271
+			// InstrTreeNode InstrTreeIsRoot InstrTreeExpandClosed InstrTreeIsLast
272
+			$class = [];
273
+			// Данный класс должен быть у любого узла
274
+			$class[] = 'InstrTreeNode';
275
+			// Если узел нулевого уровня, добавляем InstrTreeIsRoot
276
+			if (0 === $level) {
277
+				$class[] = 'InstrTreeIsRoot';
278
+			}
279
+			// Тип узла InstrTreeExpandClosed|InstrTreeExpandLeaf
280
+			// Если у узла нет потомков - InstrTreeExpandLeaf
281
+			if (0 == $num_childs) {
282
+				$class[] = 'InstrTreeExpandLeaf';
283
+				// Если у искомого элемента есть потомки - открываем список
284
+			} elseif ($currpageid == $pageid) {
285
+				$class[] = 'InstrTreeExpandOpen';
286
+				// Если искомый элемент есть в потомках текущего, то ставим класс InstrTreeExpandOpen
287
+			} elseif (array_key_exists($currpageid, $page_childs)) {
288
+				$class[] = 'InstrTreeExpandOpen';
289
+				//
290
+			} else {
291
+				$class[] = 'InstrTreeExpandClosed';
292
+			}
293
+
294
+			// Данный класс нужно добавлять последнему узлу в каждом уровне
295
+
296
+			if (isset($lastpageids[$level]) && ($pageid == $lastpageids[$level])) {
297
+				$class[] = 'InstrTreeIsLast';
298
+			}
299
+
300
+			//$class[] = 'InstrTreeIsLast';
301
+
302
+			// Test
303
+			//$ret .= '<div id="' . $pageid . '">';
304
+
305
+			// Создаём запись
306
+			$ret .= '<li class="' . implode(' ', $class) . '">';
307
+			//
308
+			$ret .= '<div class="InstrTreeExpand"></div>';
309
+			//
310
+			$ret .= '<div class="InstrTreeContent">';
311
+
312
+			// Если это лист дерева
313
+			if (0 == $pagetype) {
314
+				$ret .= '<span class="InstrTreeEmptyPage">' . $pagetitle . '</span>';
315
+				//
316
+			} elseif ($currpageid == $pageid) {
317
+				$ret .= $pagetitle;
318
+				//
319
+			} else {
320
+				$ret .= '<a href="' . XOOPS_URL . '/modules/' . INST_DIRNAME . '/page.php?id=' . $pageid . '#pagetext">' . $pagetitle . '</a>';
321
+			}
322
+
323
+			$ret .= '</div>';
324
+
325
+			// Если есть потомки
326
+			if ($num_childs > 0) {
327
+				$ret .= '<ul class="InstrTreeContainer">';
328
+			}
329
+
330
+			// Инкримент уровня
331
+			$level++;
332
+		}
333
+
334
+		// Рекурсия
335
+		if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
336
+			foreach ($this->tree[$key]['child'] as $childkey) {
337
+				$this->_makePagesUserTree($childkey, $ret, $currpageid, $lastpageids, $level);
338
+			}
339
+		}
340
+
341
+		// Test
342
+		if ($key > 0) {
343
+			// Если есть потомки
344
+			if ($num_childs > 0) {
345
+				$ret .= '</ul>';
346
+			}
347
+			// Конец текущей записи
348
+			$ret .= '</li>';
349
+		}
350
+	}
351
+
352
+	// Находим предыдущую и следующую страницы.
353
+	// Находим последнии страницы на каждом уровне.
354
+	/**
355
+	 * @param       $key
356
+	 * @param int   $currpageid
357
+	 * @param array $prevpages
358
+	 * @param array $nextpages
359
+	 * @param array $lastpageids
360
+	 * @param int   $level
361
+	 */
362
+	public function _makePagesUserCalc($key, $currpageid = 0, &$prevpages = [], &$nextpages = [], &$lastpageids = [], $level = 0)
363
+	{
364
+
365
+		// Сохраняем значение предыдущей страницы
366
+		static $stat_prevpages;
367
+
368
+		if ($key > 0) {
369
+			// ID страницы
370
+			$pageid = $this->tree[$key]['obj']->getVar('pageid');
371
+			// Название страницы
372
+			$pagetitle = $this->tree[$key]['obj']->getVar('title');
373
+			// Тип страницы
374
+			$pagetype = $this->tree[$key]['obj']->getVar('type');
375
+
376
+			// Если мы передали ID текущей страницы, то находить предыдудую и следующую страницы
377
+			// Не находить предыдущие и следующие для "Пустой страницы"
378
+			if ($currpageid && $pagetype) {
379
+				// Если элемент равен текущей странице
380
+				if (null !== $stat_prevpages && ($currpageid == $pageid)) {
381
+					// Забиваем массив предыдущей страницы
382
+					$prevpages['pageid'] = $stat_prevpages['pageid'];
383
+					$prevpages['title']  = $stat_prevpages['title'];
384
+
385
+					// Если предыдущий равен текущей странице
386
+				} elseif (null !== $stat_prevpages && ($currpageid == $stat_prevpages['pageid'])) {
387
+					// Забиваем массив следующей страницы
388
+					$nextpages['pageid'] = $pageid;
389
+					$nextpages['title']  = $pagetitle;
390
+				}
391
+				// Заносим текущие данные в массив предыдущей страницы
392
+				$stat_prevpages['pageid'] = $pageid;
393
+				$stat_prevpages['title']  = $pagetitle;
394
+			}
395
+
396
+			// Заносим текущую страницу в массив "последних страний"
397
+			$lastpageids[$level] = $pageid;
398
+
399
+			// Инкримент уровня
400
+			$level++;
401
+		}
402
+
403
+		// Рекурсия
404
+		if (isset($this->tree[$key]['child']) && !empty($this->tree[$key]['child'])) {
405
+			foreach ($this->tree[$key]['child'] as $childkey) {
406
+				$this->_makePagesUserCalc($childkey, $currpageid, $prevpages, $nextpages, $lastpageids, $level);
407
+			}
408
+		}
409
+	}
410
+
411
+	//
412
+
413
+	/**
414
+	 * @param int   $currpageid
415
+	 * @param array $prevpages
416
+	 * @param array $nextpages
417
+	 * @param int   $key
418
+	 * @return string
419
+	 */
420
+	public function makePagesUser($currpageid = 0, &$prevpages = [], &$nextpages = [], $key = 0)
421
+	{
422
+
423
+		// Массив последней страницы на каждом уровне
424
+		// level => pageid
425
+		$lastpageids = [];
426
+
427
+		// Расчёт
428
+		$this->_makePagesUserCalc($key, $currpageid, $prevpages, $nextpages, $lastpageids);
429
+
430
+		$ret = '<div onclick="instr_tree_toggle(arguments[0])">
431 431
 <div>' . _MD_INSTRUCTION_LISTPAGES . '</div>
432 432
 <div><ul class="InstrTreeContainer">';
433 433
 
434
-        // Генерируем дерево
435
-        $this->_makePagesUserTree($key, $ret, $currpageid, $lastpageids);
434
+		// Генерируем дерево
435
+		$this->_makePagesUserTree($key, $ret, $currpageid, $lastpageids);
436 436
 
437
-        $ret .= '</ul>
437
+		$ret .= '</ul>
438 438
 </div>
439 439
 </div>';
440 440
 
441
-        return $ret;
442
-    }
441
+		return $ret;
442
+	}
443 443
 }
Please login to merge, or discard this patch.
class/Utility.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@
 block discarded – undo
46 46
     // Редактор
47 47
 
48 48
     /**
49
-     * @param        $caption
50
-     * @param        $name
49
+     * @param        string $caption
50
+     * @param        string $name
51 51
      * @param string $value
52 52
      * @return bool|\XoopsFormEditor
53 53
      */
Please login to merge, or discard this patch.
Indentation   +46 added lines, -46 removed lines patch added patch discarded remove patch
@@ -14,56 +14,56 @@
 block discarded – undo
14 14
  */
15 15
 class Utility
16 16
 {
17
-    use common\VersionChecks; //checkVerXoops, checkVerPhp Traits
17
+	use common\VersionChecks; //checkVerXoops, checkVerPhp Traits
18 18
 
19
-    use common\ServerStats; // getServerStats Trait
19
+	use common\ServerStats; // getServerStats Trait
20 20
 
21
-    use common\FilesManagement; // Files Management Trait
21
+	use common\FilesManagement; // Files Management Trait
22 22
 
23
-    // Права
24
-    /**
25
-     * @param string $permtype
26
-     * @return mixed
27
-     */
28
-    public static function getItemIds($permtype = 'instruction_view')
29
-    {
30
-        //global $xoopsUser;
31
-        static $permissions = [];
32
-        // Если есть в статике
33
-        if (is_array($permissions) && array_key_exists($permtype, $permissions)) {
34
-            return $permissions[$permtype];
35
-        }
36
-        // Находим из базы
37
-        $moduleHandler          = xoops_getHandler('module');
38
-        $instrModule            = $moduleHandler->getByDirname('instruction');
39
-        $groups                 = ($GLOBALS['xoopsUser'] instanceof \XoopsUser) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
40
-        $gpermHandler           = xoops_getHandler('groupperm');
41
-        $categories             = $gpermHandler->getItemIds($permtype, $groups, $instrModule->getVar('mid'));
42
-        $permissions[$permtype] = $categories;
43
-        return $categories;
44
-    }
23
+	// Права
24
+	/**
25
+	 * @param string $permtype
26
+	 * @return mixed
27
+	 */
28
+	public static function getItemIds($permtype = 'instruction_view')
29
+	{
30
+		//global $xoopsUser;
31
+		static $permissions = [];
32
+		// Если есть в статике
33
+		if (is_array($permissions) && array_key_exists($permtype, $permissions)) {
34
+			return $permissions[$permtype];
35
+		}
36
+		// Находим из базы
37
+		$moduleHandler          = xoops_getHandler('module');
38
+		$instrModule            = $moduleHandler->getByDirname('instruction');
39
+		$groups                 = ($GLOBALS['xoopsUser'] instanceof \XoopsUser) ? $GLOBALS['xoopsUser']->getGroups() : XOOPS_GROUP_ANONYMOUS;
40
+		$gpermHandler           = xoops_getHandler('groupperm');
41
+		$categories             = $gpermHandler->getItemIds($permtype, $groups, $instrModule->getVar('mid'));
42
+		$permissions[$permtype] = $categories;
43
+		return $categories;
44
+	}
45 45
 
46
-    // Редактор
46
+	// Редактор
47 47
 
48
-    /**
49
-     * @param        $caption
50
-     * @param        $name
51
-     * @param string $value
52
-     * @return bool|\XoopsFormEditor
53
-     */
54
-    public static function getWysiwygForm($caption, $name, $value = '')
55
-    {
56
-        $editor                   = false;
57
-        $editor_configs           = [];
58
-        $editor_configs['name']   = $name;
59
-        $editor_configs['value']  = $value;
60
-        $editor_configs['rows']   = 35;
61
-        $editor_configs['cols']   = 60;
62
-        $editor_configs['width']  = '100%';
63
-        $editor_configs['height'] = '350px';
64
-        $editor_configs['editor'] = strtolower(xoops_getModuleOption('form_options', 'instruction'));
48
+	/**
49
+	 * @param        $caption
50
+	 * @param        $name
51
+	 * @param string $value
52
+	 * @return bool|\XoopsFormEditor
53
+	 */
54
+	public static function getWysiwygForm($caption, $name, $value = '')
55
+	{
56
+		$editor                   = false;
57
+		$editor_configs           = [];
58
+		$editor_configs['name']   = $name;
59
+		$editor_configs['value']  = $value;
60
+		$editor_configs['rows']   = 35;
61
+		$editor_configs['cols']   = 60;
62
+		$editor_configs['width']  = '100%';
63
+		$editor_configs['height'] = '350px';
64
+		$editor_configs['editor'] = strtolower(xoops_getModuleOption('form_options', 'instruction'));
65 65
 
66
-        $editor = new \XoopsFormEditor($caption, $name, $editor_configs);
67
-        return $editor;
68
-    }
66
+		$editor = new \XoopsFormEditor($caption, $name, $editor_configs);
67
+		return $editor;
68
+	}
69 69
 }
Please login to merge, or discard this patch.
blocks/instr_lastinstr.php 1 patch
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -13,59 +13,59 @@  discard block
 block discarded – undo
13 13
 function b_instr_lastinstr_show($options = [])
14 14
 {
15 15
 
16
-    // Подключаем функции
17
-    //    $moduleDirName = dirname(__DIR__);
18
-    $moduleDirName = basename(dirname(__DIR__));
19
-    //    include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/class/utility.php');
20
-    include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/common.php');
21
-    //
22
-    $myts = MyTextSanitizer::getInstance();
23
-    //
24
-    //mb    $instructionHandler = xoops_getModuleHandler('instruction', 'instruction');
25
-    $db                 = \XoopsDatabaseFactory::getDatabase();
26
-    $instructionHandler = new \Xoopsmodules\instruction\InstructionHandler($db);
16
+	// Подключаем функции
17
+	//    $moduleDirName = dirname(__DIR__);
18
+	$moduleDirName = basename(dirname(__DIR__));
19
+	//    include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/class/utility.php');
20
+	include_once $GLOBALS['xoops']->path('modules/' . $moduleDirName . '/include/common.php');
21
+	//
22
+	$myts = MyTextSanitizer::getInstance();
23
+	//
24
+	//mb    $instructionHandler = xoops_getModuleHandler('instruction', 'instruction');
25
+	$db                 = \XoopsDatabaseFactory::getDatabase();
26
+	$instructionHandler = new \Xoopsmodules\instruction\InstructionHandler($db);
27 27
 
28
-    // Добавляем стили
29
-    //global $xoTheme;
30
-    //$xoTheme->addStylesheet( XOOPS_URL . '/modules/instruction/css/blocks.css' );
28
+	// Добавляем стили
29
+	//global $xoTheme;
30
+	//$xoTheme->addStylesheet( XOOPS_URL . '/modules/instruction/css/blocks.css' );
31 31
 
32
-    // Опции
33
-    // Количество страниц
34
-    $limit = $options[0];
35
-    // Количество символов
36
-    $numchars = $options[1];
32
+	// Опции
33
+	// Количество страниц
34
+	$limit = $options[0];
35
+	// Количество символов
36
+	$numchars = $options[1];
37 37
 
38
-    // Права на просмотр
39
-    $cat_view = Xoopsmodules\instruction\Utility::getItemIds();
40
-    // Массив выходных данных
41
-    $block = [];
38
+	// Права на просмотр
39
+	$cat_view = Xoopsmodules\instruction\Utility::getItemIds();
40
+	// Массив выходных данных
41
+	$block = [];
42 42
 
43
-    // Если есть категории для прасмотра
44
-    if (is_array($cat_view) && count($cat_view) > 0) {
43
+	// Если есть категории для прасмотра
44
+	if (is_array($cat_view) && count($cat_view) > 0) {
45 45
 
46
-        // Находим последние инструкции
47
-        $sql = "SELECT `instrid`, `cid`, `title`, `pages`, `dateupdated` FROM {$instructionHandler->table} WHERE `cid` IN (" . implode(', ', $cat_view) . ') AND `status` > 0 ORDER BY `dateupdated` DESC';
48
-        // Лимит запроса
49
-        $result = $GLOBALS['xoopsDB']->query($sql, $limit);
50
-        // Перебираем все значения
51
-        $i = 0;
52
-        while (list($instrid, $cid, $ititle, $pages, $dateupdated) = $GLOBALS['xoopsDB']->fetchRow($result)) {
53
-            // ID инструкции
54
-            $block[$i]['instrid'] = $instrid;
55
-            // ID категории
56
-            $block[$i]['cid'] = $cid;
57
-            // Название инструкции
58
-            $block[$i]['ititle'] = $myts->htmlSpecialChars($ititle);
59
-            // Число страниц
60
-            $block[$i]['pages'] = $pages;
61
-            // Дата обновления инструкции
62
-            $block[$i]['dateupdated'] = formatTimeStamp($dateupdated, 's');
63
-            // Инкримент
64
-            $i++;
65
-        }
66
-    }
67
-    // Возвращаем массив
68
-    return $block;
46
+		// Находим последние инструкции
47
+		$sql = "SELECT `instrid`, `cid`, `title`, `pages`, `dateupdated` FROM {$instructionHandler->table} WHERE `cid` IN (" . implode(', ', $cat_view) . ') AND `status` > 0 ORDER BY `dateupdated` DESC';
48
+		// Лимит запроса
49
+		$result = $GLOBALS['xoopsDB']->query($sql, $limit);
50
+		// Перебираем все значения
51
+		$i = 0;
52
+		while (list($instrid, $cid, $ititle, $pages, $dateupdated) = $GLOBALS['xoopsDB']->fetchRow($result)) {
53
+			// ID инструкции
54
+			$block[$i]['instrid'] = $instrid;
55
+			// ID категории
56
+			$block[$i]['cid'] = $cid;
57
+			// Название инструкции
58
+			$block[$i]['ititle'] = $myts->htmlSpecialChars($ititle);
59
+			// Число страниц
60
+			$block[$i]['pages'] = $pages;
61
+			// Дата обновления инструкции
62
+			$block[$i]['dateupdated'] = formatTimeStamp($dateupdated, 's');
63
+			// Инкримент
64
+			$i++;
65
+		}
66
+	}
67
+	// Возвращаем массив
68
+	return $block;
69 69
 }
70 70
 
71 71
 // Редактирование последних инструкций
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
  */
76 76
 function b_instr_lastinstr_edit($options = [])
77 77
 {
78
-    $form = '';
79
-    $form .= _MB_INSTR_DISPLAYINSTRC . ' <input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text" /><br>' . "\n";
80
-    $form .= _MB_INSTR_NUMCHARSC . ' <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text" /><br>' . "\n";
78
+	$form = '';
79
+	$form .= _MB_INSTR_DISPLAYINSTRC . ' <input name="options[0]" size="5" maxlength="255" value="' . $options[0] . '" type="text" /><br>' . "\n";
80
+	$form .= _MB_INSTR_NUMCHARSC . ' <input name="options[1]" size="5" maxlength="255" value="' . $options[1] . '" type="text" /><br>' . "\n";
81 81
 
82
-    // Возвращаем форму
83
-    return $form;
82
+	// Возвращаем форму
83
+	return $form;
84 84
 }
Please login to merge, or discard this patch.
xoops_version.php 1 patch
Indentation   +167 added lines, -167 removed lines patch added patch discarded remove patch
@@ -10,60 +10,60 @@  discard block
 block discarded – undo
10 10
 $xoops_url     = parse_url(XOOPS_URL);
11 11
 
12 12
 $modversion = [
13
-    'version'             => 1.07,
14
-    'module_status'       => 'RC1',
15
-    'release_date'        => '2017/10/04',
16
-    'name'                => _MI_INSTRUCTION_NAME,
17
-    'description'         => _MI_INSTRUCTION_DESC,
18
-    'credits'             => 'radio-hobby.org, www.shmel.org',
19
-    'author'              => 'andrey3761, Mamba, Aerograf',
20
-    'nickname'            => '',
21
-    'help'                => 'page=help',
22
-    'license'             => 'GNU GPL 2.0',
23
-    'license_url'         => 'www.gnu.org/licenses/gpl-2.0.html/',
24
-    'official'            => 0,
25
-    'image'               => 'assets/images/logoModule.png',
26
-    'dirname'             => $moduleDirName,
27
-    'modicons16'          => 'assets/images/icons/16',
28
-    'modicons32'          => 'assets/images/icons/32',
29
-    // О модуле
30
-    'module_website_url'  => 'radio-hobby.org',
31
-    'module_website_name' => 'radio-hobby.org',
13
+	'version'             => 1.07,
14
+	'module_status'       => 'RC1',
15
+	'release_date'        => '2017/10/04',
16
+	'name'                => _MI_INSTRUCTION_NAME,
17
+	'description'         => _MI_INSTRUCTION_DESC,
18
+	'credits'             => 'radio-hobby.org, www.shmel.org',
19
+	'author'              => 'andrey3761, Mamba, Aerograf',
20
+	'nickname'            => '',
21
+	'help'                => 'page=help',
22
+	'license'             => 'GNU GPL 2.0',
23
+	'license_url'         => 'www.gnu.org/licenses/gpl-2.0.html/',
24
+	'official'            => 0,
25
+	'image'               => 'assets/images/logoModule.png',
26
+	'dirname'             => $moduleDirName,
27
+	'modicons16'          => 'assets/images/icons/16',
28
+	'modicons32'          => 'assets/images/icons/32',
29
+	// О модуле
30
+	'module_website_url'  => 'radio-hobby.org',
31
+	'module_website_name' => 'radio-hobby.org',
32 32
 
33
-    'author_website_url'  => 'radio-hobby.org',
34
-    'author_website_name' => 'andrey3761',
35
-    'min_php'             => '5.5',
36
-    'min_xoops'           => '2.5.8',
37
-    'min_admin'           => '1.1',
38
-    'min_db'              => ['mysql' => '5.5'],
39
-    // Файл базы данных
40
-    'sqlfile'             => ['mysql' => 'sql/mysql.sql'],
41
-    // Таблицы
42
-    'tables'              => [
43
-        $moduleDirName . '_cat',
44
-        $moduleDirName . '_instr',
45
-        $moduleDirName . '_page'
46
-    ],
47
-    // Имеет админку
48
-    'hasAdmin'            => 1,
49
-    'adminindex'          => 'admin/index.php',
50
-    'adminmenu'           => 'admin/menu.php',
51
-    'system_menu'         => 1,
52
-    // Меню
53
-    'hasMain'             => 1,
54
-    // Search
55
-    'hasSearch'           => 1,
56
-    'search'              => [
57
-        'file' => 'include/search.inc.php',
58
-        'func' => $moduleDirName . '_search',
59
-    ],
33
+	'author_website_url'  => 'radio-hobby.org',
34
+	'author_website_name' => 'andrey3761',
35
+	'min_php'             => '5.5',
36
+	'min_xoops'           => '2.5.8',
37
+	'min_admin'           => '1.1',
38
+	'min_db'              => ['mysql' => '5.5'],
39
+	// Файл базы данных
40
+	'sqlfile'             => ['mysql' => 'sql/mysql.sql'],
41
+	// Таблицы
42
+	'tables'              => [
43
+		$moduleDirName . '_cat',
44
+		$moduleDirName . '_instr',
45
+		$moduleDirName . '_page'
46
+	],
47
+	// Имеет админку
48
+	'hasAdmin'            => 1,
49
+	'adminindex'          => 'admin/index.php',
50
+	'adminmenu'           => 'admin/menu.php',
51
+	'system_menu'         => 1,
52
+	// Меню
53
+	'hasMain'             => 1,
54
+	// Search
55
+	'hasSearch'           => 1,
56
+	'search'              => [
57
+		'file' => 'include/search.inc.php',
58
+		'func' => $moduleDirName . '_search',
59
+	],
60 60
 ];
61 61
 //  Help files
62 62
 $modversion['helpsection'] = [
63
-    ['name' => _MI_INSTRUCTION_HELP_OVERVIEW, 'link' => 'page=help'],
64
-    ['name' => _MI_INSTRUCTION_DISCLAIMER, 'link' => 'page=disclaimer'],
65
-    ['name' => _MI_INSTRUCTION_LICENSE, 'link' => 'page=license'],
66
-    ['name' => _MI_INSTRUCTION_SUPPORT, 'link' => 'page=support'],
63
+	['name' => _MI_INSTRUCTION_HELP_OVERVIEW, 'link' => 'page=help'],
64
+	['name' => _MI_INSTRUCTION_DISCLAIMER, 'link' => 'page=disclaimer'],
65
+	['name' => _MI_INSTRUCTION_LICENSE, 'link' => 'page=license'],
66
+	['name' => _MI_INSTRUCTION_SUPPORT, 'link' => 'page=support'],
67 67
 ];
68 68
 
69 69
 // Comments
@@ -76,144 +76,144 @@  discard block
 block discarded – undo
76 76
 
77 77
 // Templates
78 78
 $modversion['templates'] = [
79
-    [
80
-        'file'        => 'admin/' . $moduleDirName . '_admin_index.tpl',
81
-        'description' => ''
82
-    ],
83
-    [
84
-        'file'        => 'admin/' . $moduleDirName . '_admin_cat.tpl',
85
-        'description' => ''
86
-    ],
87
-    [
88
-        'file'        => 'admin/' . $moduleDirName . '_admin_editcat.tpl',
89
-        'description' => ''
90
-    ],
91
-    [
92
-        'file'        => 'admin/' . $moduleDirName . '_admin_savecat.tpl',
93
-        'description' => ''
94
-    ],
95
-    [
96
-        'file'        => 'admin/' . $moduleDirName . '_admin_viewcat.tpl',
97
-        'description' => ''
98
-    ],
99
-    [
100
-        'file'        => 'admin/' . $moduleDirName . '_admin_instr.tpl',
101
-        'description' => ''
102
-    ],
103
-    [
104
-        'file'        => 'admin/' . $moduleDirName . '_admin_editinstr.tpl',
105
-        'description' => ''
106
-    ],
107
-    [
108
-        'file'        => 'admin/' . $moduleDirName . '_admin_saveinstr.tpl',
109
-        'description' => ''
110
-    ],
111
-    [
112
-        'file'        => 'admin/' . $moduleDirName . '_admin_viewinstr.tpl',
113
-        'description' => ''
114
-    ],
115
-    [
116
-        'file'        => 'admin/' . $moduleDirName . '_admin_editpage.tpl',
117
-        'description' => ''
118
-    ],
119
-    [
120
-        'file'        => 'admin/' . $moduleDirName . '_admin_savepage.tpl',
121
-        'description' => ''
122
-    ],
123
-    [
124
-        'file'        => 'admin/' . $moduleDirName . '_admin_perm.tpl',
125
-        'description' => ''
126
-    ],
127
-    [
128
-        'file'        => 'admin/' . $moduleDirName . '_admin_about.tpl',
129
-        'description' => ''
130
-    ],
131
-    [
132
-        'file'        => $moduleDirName . '_page.tpl',
133
-        'description' => ''
134
-    ],
135
-    [
136
-        'file'        => $moduleDirName . '_instr.tpl',
137
-        'description' => ''
138
-    ],
139
-    [
140
-        'file'        => $moduleDirName . '_index.tpl',
141
-        'description' => ''
142
-    ],
143
-    [
144
-        'file'        => $moduleDirName . '_editpage.tpl',
145
-        'description' => ''
146
-    ],
147
-    [
148
-        'file'        => $moduleDirName . '_savepage.tpl',
149
-        'description' => ''
150
-    ],
79
+	[
80
+		'file'        => 'admin/' . $moduleDirName . '_admin_index.tpl',
81
+		'description' => ''
82
+	],
83
+	[
84
+		'file'        => 'admin/' . $moduleDirName . '_admin_cat.tpl',
85
+		'description' => ''
86
+	],
87
+	[
88
+		'file'        => 'admin/' . $moduleDirName . '_admin_editcat.tpl',
89
+		'description' => ''
90
+	],
91
+	[
92
+		'file'        => 'admin/' . $moduleDirName . '_admin_savecat.tpl',
93
+		'description' => ''
94
+	],
95
+	[
96
+		'file'        => 'admin/' . $moduleDirName . '_admin_viewcat.tpl',
97
+		'description' => ''
98
+	],
99
+	[
100
+		'file'        => 'admin/' . $moduleDirName . '_admin_instr.tpl',
101
+		'description' => ''
102
+	],
103
+	[
104
+		'file'        => 'admin/' . $moduleDirName . '_admin_editinstr.tpl',
105
+		'description' => ''
106
+	],
107
+	[
108
+		'file'        => 'admin/' . $moduleDirName . '_admin_saveinstr.tpl',
109
+		'description' => ''
110
+	],
111
+	[
112
+		'file'        => 'admin/' . $moduleDirName . '_admin_viewinstr.tpl',
113
+		'description' => ''
114
+	],
115
+	[
116
+		'file'        => 'admin/' . $moduleDirName . '_admin_editpage.tpl',
117
+		'description' => ''
118
+	],
119
+	[
120
+		'file'        => 'admin/' . $moduleDirName . '_admin_savepage.tpl',
121
+		'description' => ''
122
+	],
123
+	[
124
+		'file'        => 'admin/' . $moduleDirName . '_admin_perm.tpl',
125
+		'description' => ''
126
+	],
127
+	[
128
+		'file'        => 'admin/' . $moduleDirName . '_admin_about.tpl',
129
+		'description' => ''
130
+	],
131
+	[
132
+		'file'        => $moduleDirName . '_page.tpl',
133
+		'description' => ''
134
+	],
135
+	[
136
+		'file'        => $moduleDirName . '_instr.tpl',
137
+		'description' => ''
138
+	],
139
+	[
140
+		'file'        => $moduleDirName . '_index.tpl',
141
+		'description' => ''
142
+	],
143
+	[
144
+		'file'        => $moduleDirName . '_editpage.tpl',
145
+		'description' => ''
146
+	],
147
+	[
148
+		'file'        => $moduleDirName . '_savepage.tpl',
149
+		'description' => ''
150
+	],
151 151
 ];
152 152
 // Конфигурация
153 153
 $modversion['config'][] = [
154
-    'name'        => 'form_options',
155
-    'title'       => '_MI_INSTRUCTION_FORM_OPTIONS',
156
-    'description' => '_MI_INSTRUCTION_FORM_OPTIONS_DESC',
157
-    'formtype'    => 'select',
158
-    'valuetype'   => 'text',
159
-    'default'     => 'dhtml',
160
-    'options'     => array_flip($editorHandler->getList())
154
+	'name'        => 'form_options',
155
+	'title'       => '_MI_INSTRUCTION_FORM_OPTIONS',
156
+	'description' => '_MI_INSTRUCTION_FORM_OPTIONS_DESC',
157
+	'formtype'    => 'select',
158
+	'valuetype'   => 'text',
159
+	'default'     => 'dhtml',
160
+	'options'     => array_flip($editorHandler->getList())
161 161
 ];
162 162
 $modversion['config'][] = [
163
-    'name'        => 'perpageadmin',
164
-    'title'       => '_MI_INSTRUCTION_PERPAGEADMIN',
165
-    'description' => '_MI_INSTRUCTION_PERPAGEADMINDSC',
166
-    'formtype'    => 'textbox',
167
-    'valuetype'   => 'int',
168
-    'default'     => 20
163
+	'name'        => 'perpageadmin',
164
+	'title'       => '_MI_INSTRUCTION_PERPAGEADMIN',
165
+	'description' => '_MI_INSTRUCTION_PERPAGEADMINDSC',
166
+	'formtype'    => 'textbox',
167
+	'valuetype'   => 'int',
168
+	'default'     => 20
169 169
 ];
170 170
 $modversion['config'][] = [
171
-    'name'        => 'perpagemain',
172
-    'title'       => '_MI_INSTRUCTION_PERPAGEMAIN',
173
-    'description' => '_MI_INSTRUCTION_PERPAGEMAINDSC',
174
-    'formtype'    => 'textbox',
175
-    'valuetype'   => 'int',
176
-    'default'     => 20
171
+	'name'        => 'perpagemain',
172
+	'title'       => '_MI_INSTRUCTION_PERPAGEMAIN',
173
+	'description' => '_MI_INSTRUCTION_PERPAGEMAINDSC',
174
+	'formtype'    => 'textbox',
175
+	'valuetype'   => 'int',
176
+	'default'     => 20
177 177
 ];
178 178
 // Теги
179 179
 $modversion['config'][] = [
180
-    'name'        => 'usetag',
181
-    'title'       => '_MI_INSTRUCTION_USETAG',
182
-    'description' => '_MI_INSTRUCTION_USETAGDSC',
183
-    'formtype'    => 'yesno',
184
-    'valuetype'   => 'int',
185
-    'default'     => 0
180
+	'name'        => 'usetag',
181
+	'title'       => '_MI_INSTRUCTION_USETAG',
182
+	'description' => '_MI_INSTRUCTION_USETAGDSC',
183
+	'formtype'    => 'yesno',
184
+	'valuetype'   => 'int',
185
+	'default'     => 0
186 186
 ];
187 187
 // Оценки
188 188
 $modversion['config'][] = [
189
-    'name'        => 'userat',
190
-    'title'       => '_MI_INSTRUCTION_USERAT',
191
-    'description' => '_MI_INSTRUCTION_USERATDSC',
192
-    'formtype'    => 'yesno',
193
-    'valuetype'   => 'int',
194
-    'default'     => 0
189
+	'name'        => 'userat',
190
+	'title'       => '_MI_INSTRUCTION_USERAT',
191
+	'description' => '_MI_INSTRUCTION_USERATDSC',
192
+	'formtype'    => 'yesno',
193
+	'valuetype'   => 'int',
194
+	'default'     => 0
195 195
 ];
196 196
 
197 197
 // Блоки
198 198
 // Блок последних страниц
199 199
 $modversion['blocks'][] = [
200
-    'file'        => 'instr_lastpage.php',
201
-    'name'        => _MI_INSTR_BLOCK_LASTPAGE,
202
-    'description' => _MI_INSTR_BLOCK_LASTPAGE_DESC,
203
-    'show_func'   => 'b_instr_lastpage_show',
204
-    'edit_func'   => 'b_instr_lastpage_edit',
205
-    'options'     => '10|20',
206
-    'template'    => $moduleDirName . '_block_lastpage.tpl'
200
+	'file'        => 'instr_lastpage.php',
201
+	'name'        => _MI_INSTR_BLOCK_LASTPAGE,
202
+	'description' => _MI_INSTR_BLOCK_LASTPAGE_DESC,
203
+	'show_func'   => 'b_instr_lastpage_show',
204
+	'edit_func'   => 'b_instr_lastpage_edit',
205
+	'options'     => '10|20',
206
+	'template'    => $moduleDirName . '_block_lastpage.tpl'
207 207
 ];
208 208
 // Блок последних инструкций
209 209
 $modversion['blocks'][] = [
210
-    'file'        => 'instr_lastinstr.php',
211
-    'name'        => _MI_INSTR_BLOCK_LASTINSTR,
212
-    'description' => _MI_INSTR_BLOCK_LASTINSTR_DESC,
213
-    'show_func'   => 'b_instr_lastinstr_show',
214
-    'edit_func'   => 'b_instr_lastinstr_edit',
215
-    'options'     => '10|20',
216
-    'template'    => $moduleDirName . '_block_lastinstr.tpl'
210
+	'file'        => 'instr_lastinstr.php',
211
+	'name'        => _MI_INSTR_BLOCK_LASTINSTR,
212
+	'description' => _MI_INSTR_BLOCK_LASTINSTR_DESC,
213
+	'show_func'   => 'b_instr_lastinstr_show',
214
+	'edit_func'   => 'b_instr_lastinstr_edit',
215
+	'options'     => '10|20',
216
+	'template'    => $moduleDirName . '_block_lastinstr.tpl'
217 217
 ];
218 218
 
219 219
 // Notification
Please login to merge, or discard this patch.
admin/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@
 block discarded – undo
11 11
 
12 12
 $configurator = include __DIR__ . '/../include/config.php';
13 13
 foreach (array_keys($configurator->uploadFolders) as $i) {
14
-    $utility::createFolder($configurator->uploadFolders[$i]);
15
-    $adminObject->addConfigBoxLine($configurator->uploadFolders[$i], 'folder');
14
+	$utility::createFolder($configurator->uploadFolders[$i]);
15
+	$adminObject->addConfigBoxLine($configurator->uploadFolders[$i], 'folder');
16 16
 }
17 17
 
18 18
 //$instructionHandler = xoops_getModuleHandler('instruction', 'instruction');
Please login to merge, or discard this patch.
admin/menu.php 1 patch
Indentation   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 use Xoopsmodules\instruction;
4 4
 
5 5
 if (!isset($moduleDirName)) {
6
-    $moduleDirName = basename(dirname(__DIR__));
6
+	$moduleDirName = basename(dirname(__DIR__));
7 7
 }
8 8
 
9 9
 /** @var Xmf\Module\Helper $moduleHelper */
@@ -17,34 +17,34 @@  discard block
 block discarded – undo
17 17
 
18 18
 // Административное меню
19 19
 $adminmenu = [
20
-    [
21
-        'title' => _MI_INSTRUCTION_ADMIN_HOME,
22
-        'link'  => 'admin/index.php',
23
-        'desc'  => _MI_INSTRUCTION_ADMIN_HOME_DESC,
24
-        'icon'  => $pathIcon32 . '/home.png'
25
-    ],
26
-    [
27
-        'title' => _MI_INSTRUCTION_ADMIN_CAT,
28
-        'link'  => 'admin/cat.php',
29
-        'desc'  => _MI_INSTRUCTION_ADMIN_CAT_DESC,
30
-        'icon'  => $pathIcon32 . '/category.png'
31
-    ],
32
-    [
33
-        'title' => _MI_INSTRUCTION_ADMIN_INSTR,
34
-        'link'  => 'admin/instr.php',
35
-        'desc'  => _MI_INSTRUCTION_ADMIN_INSTR_DESC,
36
-        'icon'  => $pathModIcon32 . '/nav_book.png'
37
-    ],
38
-    [
39
-        'title' => _MI_INSTRUCTION_ADMIN_PERM,
40
-        'link'  => 'admin/perm.php',
41
-        'desc'  => _MI_INSTRUCTION_ADMIN_PERM_DESC,
42
-        'icon'  => $pathIcon32 . '/permissions.png'
43
-    ],
44
-    [
45
-        'title' => _MI_INSTRUCTION_ADMIN_ABOUT,
46
-        'link'  => 'admin/about.php',
47
-        'desc'  => _MI_INSTRUCTION_ADMIN_ABOUT_DESC,
48
-        'icon'  => $pathIcon32 . '/about.png'
49
-    ]
20
+	[
21
+		'title' => _MI_INSTRUCTION_ADMIN_HOME,
22
+		'link'  => 'admin/index.php',
23
+		'desc'  => _MI_INSTRUCTION_ADMIN_HOME_DESC,
24
+		'icon'  => $pathIcon32 . '/home.png'
25
+	],
26
+	[
27
+		'title' => _MI_INSTRUCTION_ADMIN_CAT,
28
+		'link'  => 'admin/cat.php',
29
+		'desc'  => _MI_INSTRUCTION_ADMIN_CAT_DESC,
30
+		'icon'  => $pathIcon32 . '/category.png'
31
+	],
32
+	[
33
+		'title' => _MI_INSTRUCTION_ADMIN_INSTR,
34
+		'link'  => 'admin/instr.php',
35
+		'desc'  => _MI_INSTRUCTION_ADMIN_INSTR_DESC,
36
+		'icon'  => $pathModIcon32 . '/nav_book.png'
37
+	],
38
+	[
39
+		'title' => _MI_INSTRUCTION_ADMIN_PERM,
40
+		'link'  => 'admin/perm.php',
41
+		'desc'  => _MI_INSTRUCTION_ADMIN_PERM_DESC,
42
+		'icon'  => $pathIcon32 . '/permissions.png'
43
+	],
44
+	[
45
+		'title' => _MI_INSTRUCTION_ADMIN_ABOUT,
46
+		'link'  => 'admin/about.php',
47
+		'desc'  => _MI_INSTRUCTION_ADMIN_ABOUT_DESC,
48
+		'icon'  => $pathIcon32 . '/about.png'
49
+	]
50 50
 ];
Please login to merge, or discard this patch.