Completed
Push — master ( 96da4e...7c5656 )
by Michael
04:52
created
admin/menu.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
 
30 30
 if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) {
31 31
 } else {
32
-    $moduleHelper = Xmf\Module\Helper::getHelper('system');
32
+	$moduleHelper = Xmf\Module\Helper::getHelper('system');
33 33
 }
34 34
 $adminObject = \Xmf\Module\Admin::getInstance();
35 35
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 $moduleDirName = basename(dirname(__DIR__));
29 29
 
30 30
 if (false !== ($moduleHelper = Xmf\Module\Helper::getHelper($moduleDirName))) {
31
-} else {
31
+}else {
32 32
     $moduleHelper = Xmf\Module\Helper::getHelper('system');
33 33
 }
34 34
 $adminObject = \Xmf\Module\Admin::getInstance();
@@ -42,24 +42,24 @@  discard block
 block discarded – undo
42 42
 $i                      = 0;
43 43
 $adminmenu[$i]['title'] = _AM_MODULEADMIN_HOME;
44 44
 $adminmenu[$i]['link']  = 'admin/index.php';
45
-$adminmenu[$i]['icon']  = $pathIcon32 . '/home.png';
45
+$adminmenu[$i]['icon']  = $pathIcon32.'/home.png';
46 46
 ++$i;
47 47
 $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_INDEX');
48 48
 $adminmenu[$i]['link']  = 'admin/main.php';
49
-$adminmenu[$i]['icon']  = $pathIcon32 . '/manage.png';
49
+$adminmenu[$i]['icon']  = $pathIcon32.'/manage.png';
50 50
 
51 51
 ++$i;
52 52
 $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_CATEGORY');
53 53
 $adminmenu[$i]['link']  = 'admin/admin.category.php';
54
-$adminmenu[$i]['icon']  = $pathIcon32 . '/category.png';
54
+$adminmenu[$i]['icon']  = $pathIcon32.'/category.png';
55 55
 ++$i;
56 56
 $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_BLOG');
57 57
 $adminmenu[$i]['link']  = 'admin/admin.blog.php';
58
-$adminmenu[$i]['icon']  = $pathIcon32 . '/translations.png';
58
+$adminmenu[$i]['icon']  = $pathIcon32.'/translations.png';
59 59
 ++$i;
60 60
 $adminmenu[$i]['title'] = planet_constant('MI_ADMENU_ARTICLE');
61 61
 $adminmenu[$i]['link']  = 'admin/admin.article.php';
62
-$adminmenu[$i]['icon']  = $pathIcon32 . '/content.png';
62
+$adminmenu[$i]['icon']  = $pathIcon32.'/content.png';
63 63
 //++$i;
64 64
 //$adminmenu[$i]['title'] = planet_constant("MI_ADMENU_BLOCK");
65 65
 //$adminmenu[$i]['link'] = "admin/admin.block.php";
@@ -67,4 +67,4 @@  discard block
 block discarded – undo
67 67
 ++$i;
68 68
 $adminmenu[$i]['title'] = _AM_MODULEADMIN_ABOUT;
69 69
 $adminmenu[$i]['link']  = 'admin/about.php';
70
-$adminmenu[$i]['icon']  = $pathIcon32 . '/about.png';
70
+$adminmenu[$i]['icon']  = $pathIcon32.'/about.png';
Please login to merge, or discard this patch.
admin/admin.category.php 2 patches
Indentation   +126 added lines, -126 removed lines patch added patch discarded remove patch
@@ -41,133 +41,133 @@
 block discarded – undo
41 41
 $blogHandler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
42 42
 
43 43
 switch ($op) {
44
-    case 'save':
45
-        if ($cat_id) {
46
-            $category_obj = $categoryHandler->get($cat_id);
47
-        } else {
48
-            $category_obj = $categoryHandler->create();
49
-        }
50
-
51
-        $category_obj->setVar('cat_title', $_POST['cat_title']);
52
-        $category_obj->setVar('cat_order', $_POST['cat_order']);
53
-
54
-        if (!$categoryHandler->insert($category_obj)) {
55
-            $message = planet_constant('AM_ERROR');
56
-        } else {
57
-            $message = planet_constant('AM_DBUPDATED');
58
-        }
59
-        redirect_header('admin.category.php', 2, $message);
60
-
61
-    case 'del':
62
-        if (!is_array($cat_id)) {
63
-            $cat_id = array($cat_id);
64
-        }
65
-        foreach ($cat_id as $cid) {
66
-            $category_obj = $categoryHandler->get($cid);
67
-            if (!$categoryHandler->delete($category_obj)) {
68
-            }
69
-        }
70
-        $message = planet_constant('AM_DBUPDATED');
71
-        redirect_header('admin.category.php', 2, $message);
72
-
73
-    case 'order':
74
-        $count = count($_POST['cat_order']);
75
-        for ($i = 0; $i < $count; ++$i) {
76
-            $category_obj = $categoryHandler->get($_POST['cat'][$i]);
77
-            $category_obj->setVar('cat_order', $_POST['cat_order'][$i]);
78
-            $categoryHandler->insert($category_obj, true);
79
-            unset($category_obj);
80
-        }
81
-        $message = planet_constant('AM_DBUPDATED');
82
-        redirect_header('admin.category.php', 2, $message);
83
-
84
-    case 'edit':
85
-        $category_obj = $categoryHandler->get($cat_id);
86
-        $form         = new XoopsThemeForm(_EDIT, 'edit', xoops_getenv('PHP_SELF'), 'post', true);
87
-        $form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80, $category_obj->getVar('cat_title', 'E')), true);
88
-        $form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10, $category_obj->getVar('cat_order')), false);
89
-        $form->addElement(new XoopsFormHidden('category', $cat_id));
90
-        $form->addElement(new XoopsFormHidden('op', 'save'));
91
-
92
-        $button_tray = new XoopsFormElementTray('', '');
93
-        $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
94
-        $button_tray->addElement($butt_save);
95
-        $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
96
-        $button_tray->addElement($butt_cancel);
97
-        $form->addElement($button_tray);
98
-
99
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
100
-        echo '<br>';
101
-        $form->display();
102
-        echo '</fieldset>';
103
-        break;
104
-
105
-    default:
106
-        $crit = new Criteria('1', 1);
107
-        $crit->setSort('cat_order');
108
-        $crit->setOrder('ASC');
109
-        $categories  = $categoryHandler->getList($crit);
110
-        $blog_counts = $blogHandler->getCountsByCategory();
111
-        foreach (array_keys($categories) as $cid) {
112
-            if (!empty($blog_counts[$cid])) {
113
-                $categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')';
114
-            }
115
-        }
116
-
117
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
118
-        echo "<br style=\"clear:both;\">";
119
-
120
-        echo "<form name='list' method='post'>";
121
-        echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
122
-        echo "<tr align='center'>";
123
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>';
124
-        echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>';
125
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>';
126
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>';
127
-        //        echo "<td class='bg3' width='5%'>" . _DELETE . "</td>";
128
-
129
-        echo '</tr>';
130
-
131
-        $ii = 0;
132
-        foreach (array_keys($categories) as $cid) {
133
-            echo "<tr class='odd' align='left'>";
134
-            echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>";
135
-            echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>";
136
-            echo '<td>' . $categories[$cid] . '</td>';
137
-            echo "<td align='center'>" . @$blog_counts[$cid] . '</td>';
138
-
139
-            echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a>&nbsp;
44
+	case 'save':
45
+		if ($cat_id) {
46
+			$category_obj = $categoryHandler->get($cat_id);
47
+		} else {
48
+			$category_obj = $categoryHandler->create();
49
+		}
50
+
51
+		$category_obj->setVar('cat_title', $_POST['cat_title']);
52
+		$category_obj->setVar('cat_order', $_POST['cat_order']);
53
+
54
+		if (!$categoryHandler->insert($category_obj)) {
55
+			$message = planet_constant('AM_ERROR');
56
+		} else {
57
+			$message = planet_constant('AM_DBUPDATED');
58
+		}
59
+		redirect_header('admin.category.php', 2, $message);
60
+
61
+	case 'del':
62
+		if (!is_array($cat_id)) {
63
+			$cat_id = array($cat_id);
64
+		}
65
+		foreach ($cat_id as $cid) {
66
+			$category_obj = $categoryHandler->get($cid);
67
+			if (!$categoryHandler->delete($category_obj)) {
68
+			}
69
+		}
70
+		$message = planet_constant('AM_DBUPDATED');
71
+		redirect_header('admin.category.php', 2, $message);
72
+
73
+	case 'order':
74
+		$count = count($_POST['cat_order']);
75
+		for ($i = 0; $i < $count; ++$i) {
76
+			$category_obj = $categoryHandler->get($_POST['cat'][$i]);
77
+			$category_obj->setVar('cat_order', $_POST['cat_order'][$i]);
78
+			$categoryHandler->insert($category_obj, true);
79
+			unset($category_obj);
80
+		}
81
+		$message = planet_constant('AM_DBUPDATED');
82
+		redirect_header('admin.category.php', 2, $message);
83
+
84
+	case 'edit':
85
+		$category_obj = $categoryHandler->get($cat_id);
86
+		$form         = new XoopsThemeForm(_EDIT, 'edit', xoops_getenv('PHP_SELF'), 'post', true);
87
+		$form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80, $category_obj->getVar('cat_title', 'E')), true);
88
+		$form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10, $category_obj->getVar('cat_order')), false);
89
+		$form->addElement(new XoopsFormHidden('category', $cat_id));
90
+		$form->addElement(new XoopsFormHidden('op', 'save'));
91
+
92
+		$button_tray = new XoopsFormElementTray('', '');
93
+		$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
94
+		$button_tray->addElement($butt_save);
95
+		$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
96
+		$button_tray->addElement($butt_cancel);
97
+		$form->addElement($button_tray);
98
+
99
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
100
+		echo '<br>';
101
+		$form->display();
102
+		echo '</fieldset>';
103
+		break;
104
+
105
+	default:
106
+		$crit = new Criteria('1', 1);
107
+		$crit->setSort('cat_order');
108
+		$crit->setOrder('ASC');
109
+		$categories  = $categoryHandler->getList($crit);
110
+		$blog_counts = $blogHandler->getCountsByCategory();
111
+		foreach (array_keys($categories) as $cid) {
112
+			if (!empty($blog_counts[$cid])) {
113
+				$categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')';
114
+			}
115
+		}
116
+
117
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
118
+		echo "<br style=\"clear:both;\">";
119
+
120
+		echo "<form name='list' method='post'>";
121
+		echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
122
+		echo "<tr align='center'>";
123
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>';
124
+		echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>';
125
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>';
126
+		echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>';
127
+		//        echo "<td class='bg3' width='5%'>" . _DELETE . "</td>";
128
+
129
+		echo '</tr>';
130
+
131
+		$ii = 0;
132
+		foreach (array_keys($categories) as $cid) {
133
+			echo "<tr class='odd' align='left'>";
134
+			echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>";
135
+			echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>";
136
+			echo '<td>' . $categories[$cid] . '</td>';
137
+			echo "<td align='center'>" . @$blog_counts[$cid] . '</td>';
138
+
139
+			echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a>&nbsp;
140 140
                   <a href='admin.category.php?op=del &amp;category='" . $cid . "' title='" . _DELETE . "'><img src='" . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . "' title='" . _DELETE . "' </a></td>";
141
-            echo '</tr>';
142
-            ++$ii;
143
-        }
144
-        echo "<tr class='even' align='center'>";
145
-        echo "<td colspan='5'>";
146
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>";
147
-        echo "<input name='' value='" . _CANCEL . "' type='reset'>";
148
-        echo "<input name='op' value='order' type='hidden'>";
149
-        echo '</td>';
150
-        echo '</tr>';
151
-        echo '</table></form>';
152
-        echo "</fieldset><br style='clear:both;'>";
153
-
154
-        $form = new XoopsThemeForm(_ADD, 'mod', xoops_getenv('PHP_SELF'), 'post', true);
155
-        $form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80), true);
156
-        $form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10), false);
157
-        $form->addElement(new XoopsFormHidden('op', 'save'));
158
-
159
-        $button_tray = new XoopsFormElementTray('', '');
160
-        $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
161
-        $button_tray->addElement($butt_save);
162
-        $butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
163
-        $button_tray->addElement($butt_cancel);
164
-        $form->addElement($button_tray);
165
-
166
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
167
-        echo '<br>';
168
-        $form->display();
169
-        echo '</fieldset>';
170
-        break;
141
+			echo '</tr>';
142
+			++$ii;
143
+		}
144
+		echo "<tr class='even' align='center'>";
145
+		echo "<td colspan='5'>";
146
+		echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>";
147
+		echo "<input name='' value='" . _CANCEL . "' type='reset'>";
148
+		echo "<input name='op' value='order' type='hidden'>";
149
+		echo '</td>';
150
+		echo '</tr>';
151
+		echo '</table></form>';
152
+		echo "</fieldset><br style='clear:both;'>";
153
+
154
+		$form = new XoopsThemeForm(_ADD, 'mod', xoops_getenv('PHP_SELF'), 'post', true);
155
+		$form->addElement(new XoopsFormText(planet_constant('AM_TITLE'), 'cat_title', 50, 80), true);
156
+		$form->addElement(new XoopsFormText(planet_constant('AM_ORDER'), 'cat_order', 5, 10), false);
157
+		$form->addElement(new XoopsFormHidden('op', 'save'));
158
+
159
+		$button_tray = new XoopsFormElementTray('', '');
160
+		$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
161
+		$button_tray->addElement($butt_save);
162
+		$butt_cancel = new XoopsFormButton('', '', _CANCEL, 'reset');
163
+		$button_tray->addElement($butt_cancel);
164
+		$form->addElement($button_tray);
165
+
166
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
167
+		echo '<br>';
168
+		$form->display();
169
+		echo '</fieldset>';
170
+		break;
171 171
 }
172 172
 
173 173
 xoops_cp_footer();
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-require_once __DIR__ . '/admin_header.php';
28
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
27
+require_once __DIR__.'/admin_header.php';
28
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
29 29
 
30 30
 xoops_cp_header();
31 31
 $adminObject = \Xmf\Module\Admin::getInstance();
32 32
 $adminObject->displayNavigation(basename(__FILE__));
33
-require XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
33
+require XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
34 34
 //planet_adminmenu(1);
35 35
 
36 36
 $op     = !empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
37 37
 $cat_id = !empty($_POST['category']) ? $_POST['category'] : (!empty($_GET['category']) ? $_GET['category'] : 0);
38
-$cat_id = is_array($cat_id) ? array_map('intval', $cat_id) : (int)$cat_id;
38
+$cat_id = is_array($cat_id) ? array_map('intval', $cat_id) : (int) $cat_id;
39 39
 
40 40
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
41 41
 $blogHandler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     case 'save':
45 45
         if ($cat_id) {
46 46
             $category_obj = $categoryHandler->get($cat_id);
47
-        } else {
47
+        }else {
48 48
             $category_obj = $categoryHandler->create();
49 49
         }
50 50
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         if (!$categoryHandler->insert($category_obj)) {
55 55
             $message = planet_constant('AM_ERROR');
56
-        } else {
56
+        }else {
57 57
             $message = planet_constant('AM_DBUPDATED');
58 58
         }
59 59
         redirect_header('admin.category.php', 2, $message);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     case 'order':
74 74
         $count = count($_POST['cat_order']);
75
-        for ($i = 0; $i < $count; ++$i) {
75
+        for ($i = 0; $i<$count; ++$i) {
76 76
             $category_obj = $categoryHandler->get($_POST['cat'][$i]);
77 77
             $category_obj->setVar('cat_order', $_POST['cat_order'][$i]);
78 78
             $categoryHandler->insert($category_obj, true);
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $button_tray->addElement($butt_cancel);
97 97
         $form->addElement($button_tray);
98 98
 
99
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
99
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>';
100 100
         echo '<br>';
101 101
         $form->display();
102 102
         echo '</fieldset>';
@@ -110,20 +110,20 @@  discard block
 block discarded – undo
110 110
         $blog_counts = $blogHandler->getCountsByCategory();
111 111
         foreach (array_keys($categories) as $cid) {
112 112
             if (!empty($blog_counts[$cid])) {
113
-                $categories[$cid] .= ' (' . (int)$blog_counts[$cid] . ')';
113
+                $categories[$cid] .= ' ('.(int) $blog_counts[$cid].')';
114 114
             }
115 115
         }
116 116
 
117
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . planet_constant('AM_LIST') . '</legend>';
117
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>".planet_constant('AM_LIST').'</legend>';
118 118
         echo "<br style=\"clear:both;\">";
119 119
 
120 120
         echo "<form name='list' method='post'>";
121 121
         echo "<table border='0' cellpadding='4' cellspacing='1' width='100%' class='outer'>";
122 122
         echo "<tr align='center'>";
123
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ORDER') . '</td>';
124
-        echo "<th align='left' class='bg3' width='80%'>" . planet_constant('AM_TITLE') . '</td>';
125
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_BLOGCOUNT') . '</td>';
126
-        echo "<th class='bg3' width='5%'>" . planet_constant('AM_ACTIONS') . '</td>';
123
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_ORDER').'</td>';
124
+        echo "<th align='left' class='bg3' width='80%'>".planet_constant('AM_TITLE').'</td>';
125
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_BLOGCOUNT').'</td>';
126
+        echo "<th class='bg3' width='5%'>".planet_constant('AM_ACTIONS').'</td>';
127 127
         //        echo "<td class='bg3' width='5%'>" . _DELETE . "</td>";
128 128
 
129 129
         echo '</tr>';
@@ -131,20 +131,20 @@  discard block
 block discarded – undo
131 131
         $ii = 0;
132 132
         foreach (array_keys($categories) as $cid) {
133 133
             echo "<tr class='odd' align='left'>";
134
-            echo "<td><input type='hidden' name='cat[]' value='" . $cid . "'>";
135
-            echo "<input type='text' name='cat_order[]' value='" . ($ii * 10) . "'></td>";
136
-            echo '<td>' . $categories[$cid] . '</td>';
137
-            echo "<td align='center'>" . @$blog_counts[$cid] . '</td>';
134
+            echo "<td><input type='hidden' name='cat[]' value='".$cid."'>";
135
+            echo "<input type='text' name='cat_order[]' value='".($ii*10)."'></td>";
136
+            echo '<td>'.$categories[$cid].'</td>';
137
+            echo "<td align='center'>".@$blog_counts[$cid].'</td>';
138 138
 
139
-            echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='" . $cid . "' title='" . _EDIT . "'><img src='" . $pathIcon16 . "/edit.png '" . "alt='" . _EDIT . "' title='" . _EDIT . "' </a>&nbsp;
140
-                  <a href='admin.category.php?op=del &amp;category='" . $cid . "' title='" . _DELETE . "'><img src='" . $pathIcon16 . "/delete.png '" . " alt='" . _EDIT . "' title='" . _DELETE . "' </a></td>";
139
+            echo "<td align='center'><a href='admin.category.php?op=edit &amp;category='".$cid."' title='"._EDIT."'><img src='".$pathIcon16."/edit.png '"."alt='"._EDIT."' title='"._EDIT."' </a>&nbsp;
140
+                  <a href='admin.category.php?op=del &amp;category='" . $cid."' title='"._DELETE."'><img src='".$pathIcon16."/delete.png '"." alt='"._EDIT."' title='"._DELETE."' </a></td>";
141 141
             echo '</tr>';
142 142
             ++$ii;
143 143
         }
144 144
         echo "<tr class='even' align='center'>";
145 145
         echo "<td colspan='5'>";
146
-        echo "<input name='submit' value='" . _SUBMIT . "' type='submit'>";
147
-        echo "<input name='' value='" . _CANCEL . "' type='reset'>";
146
+        echo "<input name='submit' value='"._SUBMIT."' type='submit'>";
147
+        echo "<input name='' value='"._CANCEL."' type='reset'>";
148 148
         echo "<input name='op' value='order' type='hidden'>";
149 149
         echo '</td>';
150 150
         echo '</tr>';
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         $button_tray->addElement($butt_cancel);
164 164
         $form->addElement($button_tray);
165 165
 
166
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _ADD . '</legend>';
166
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._ADD.'</legend>';
167 167
         echo '<br>';
168 168
         $form->display();
169 169
         echo '</fieldset>';
Please login to merge, or discard this patch.
admin/index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
  * @author       XOOPS Development Team
18 18
  */
19 19
 
20
-require_once __DIR__ . '/../../../include/cp_header.php';
21
-require_once __DIR__ . '/admin_header.php';
20
+require_once __DIR__.'/../../../include/cp_header.php';
21
+require_once __DIR__.'/admin_header.php';
22 22
 
23 23
 xoops_cp_header();
24 24
 
@@ -27,4 +27,4 @@  discard block
 block discarded – undo
27 27
 $adminObject->displayNavigation(basename(__FILE__));
28 28
 $adminObject->displayIndex();
29 29
 
30
-require_once __DIR__ . '/admin_footer.php';
30
+require_once __DIR__.'/admin_footer.php';
Please login to merge, or discard this patch.
xoops_version.php 2 patches
Indentation   +127 added lines, -127 removed lines patch added patch discarded remove patch
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
 include __DIR__ . '/include/vars.php';
31 31
 
32 32
 $modversion                 = array(
33
-    'name'          => planet_constant('MI_NAME'),
34
-    'version'       => 2.10,
35
-    'module_status' => 'Final',
36
-    'release_date'  => '2016/08/01',
37
-    'description'   => planet_constant('MI_DESC'),
38
-    'author'        => 'D.J. (phppp)',
39
-    'credits'       => 'XOOPS Project',
40
-    'image'         => 'assets/images/logoModule.png',
41
-    'dirname'       => $GLOBALS['moddirname'],
42
-    'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
33
+	'name'          => planet_constant('MI_NAME'),
34
+	'version'       => 2.10,
35
+	'module_status' => 'Final',
36
+	'release_date'  => '2016/08/01',
37
+	'description'   => planet_constant('MI_DESC'),
38
+	'author'        => 'D.J. (phppp)',
39
+	'credits'       => 'XOOPS Project',
40
+	'image'         => 'assets/images/logoModule.png',
41
+	'dirname'       => $GLOBALS['moddirname'],
42
+	'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
43 43
 );
44 44
 $modversion['help']         = 'page=help';
45 45
 $modversion['license']      = 'GNU see LICENSE';
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 // database tables
63 63
 $modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
64 64
 $modversion['tables']           = array(
65
-    $GLOBALS['MOD_DB_PREFIX'] . '_category',
66
-    $GLOBALS['MOD_DB_PREFIX'] . '_article',
67
-    $GLOBALS['MOD_DB_PREFIX'] . '_blog',
68
-    $GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
69
-    $GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
70
-    $GLOBALS['MOD_DB_PREFIX'] . '_rate'
65
+	$GLOBALS['MOD_DB_PREFIX'] . '_category',
66
+	$GLOBALS['MOD_DB_PREFIX'] . '_article',
67
+	$GLOBALS['MOD_DB_PREFIX'] . '_blog',
68
+	$GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
69
+	$GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
70
+	$GLOBALS['MOD_DB_PREFIX'] . '_rate'
71 71
 );
72 72
 
73 73
 // Admin things
@@ -149,162 +149,162 @@  discard block
 block discarded – undo
149 149
 // Configs
150 150
 // Config items
151 151
 $modversion['config'][] = array(
152
-    'name'        => 'do_debug',
153
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
154
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
155
-    'formtype'    => 'yesno',
156
-    'valuetype'   => 'int',
157
-    'default'     => 1
152
+	'name'        => 'do_debug',
153
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
154
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
155
+	'formtype'    => 'yesno',
156
+	'valuetype'   => 'int',
157
+	'default'     => 1
158 158
 );
159 159
 
160 160
 $modversion['config'][] = array(
161
-    'name'        => 'do_urw',
162
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
163
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
164
-    'formtype'    => 'yesno',
165
-    'valuetype'   => 'int',
166
-    'default'     => in_array(php_sapi_name(), array('apache', 'apache2handler'))
161
+	'name'        => 'do_urw',
162
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
163
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
164
+	'formtype'    => 'yesno',
165
+	'valuetype'   => 'int',
166
+	'default'     => in_array(php_sapi_name(), array('apache', 'apache2handler'))
167 167
 );
168 168
 
169 169
 $modversion['config'][] = array(
170
-    'name'        => 'theme_set',
171
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
172
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
173
-    'formtype'    => 'select',
174
-    'valuetype'   => 'text',
175
-    'options'     => array(_NONE => '0'),
176
-    'default'     => ''
170
+	'name'        => 'theme_set',
171
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
172
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
173
+	'formtype'    => 'select',
174
+	'valuetype'   => 'text',
175
+	'options'     => array(_NONE => '0'),
176
+	'default'     => ''
177 177
 );
178 178
 
179 179
 $modversion['config'][] = array(
180
-    'name'        => 'timeformat',
181
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
182
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
183
-    'formtype'    => 'select',
184
-    'valuetype'   => 'text',
185
-    'options'     => array(
186
-        _DATESTRING                                       => 'l',
187
-        _MEDIUMDATESTRING                                 => 'm',
188
-        _SHORTDATESTRING                                  => 's',
189
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
190
-    ),
191
-    'default'     => 'c'
180
+	'name'        => 'timeformat',
181
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
182
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
183
+	'formtype'    => 'select',
184
+	'valuetype'   => 'text',
185
+	'options'     => array(
186
+		_DATESTRING                                       => 'l',
187
+		_MEDIUMDATESTRING                                 => 'm',
188
+		_SHORTDATESTRING                                  => 's',
189
+		$GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
190
+	),
191
+	'default'     => 'c'
192 192
 );
193 193
 
194 194
 $modversion['config'][] = array(
195
-    'name'        => 'articles_perpage',
196
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
197
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
198
-    'formtype'    => 'textbox',
199
-    'valuetype'   => 'int',
200
-    'default'     => 10
195
+	'name'        => 'articles_perpage',
196
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
197
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
198
+	'formtype'    => 'textbox',
199
+	'valuetype'   => 'int',
200
+	'default'     => 10
201 201
 );
202 202
 
203 203
 $modversion['config'][] = array(
204
-    'name'        => 'list_perpage',
205
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
206
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
207
-    'formtype'    => 'textbox',
208
-    'valuetype'   => 'int',
209
-    'default'     => 20
204
+	'name'        => 'list_perpage',
205
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
206
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
207
+	'formtype'    => 'textbox',
208
+	'valuetype'   => 'int',
209
+	'default'     => 20
210 210
 );
211 211
 
212 212
 $modversion['config'][] = array(
213
-    'name'        => 'blogs_perupdate',
214
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
215
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
216
-    'formtype'    => 'textbox',
217
-    'valuetype'   => 'int',
218
-    'default'     => 10
213
+	'name'        => 'blogs_perupdate',
214
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
215
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
216
+	'formtype'    => 'textbox',
217
+	'valuetype'   => 'int',
218
+	'default'     => 10
219 219
 );
220 220
 
221 221
 $modversion['config'][] = array(
222
-    'name'        => 'article_expire',
223
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
224
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
225
-    'formtype'    => 'textbox',
226
-    'valuetype'   => 'int',
227
-    'default'     => 30
222
+	'name'        => 'article_expire',
223
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
224
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
225
+	'formtype'    => 'textbox',
226
+	'valuetype'   => 'int',
227
+	'default'     => 30
228 228
 );
229 229
 
230 230
 $modversion['config'][] = array(
231
-    'name'        => 'display_summary',
232
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
233
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
234
-    'formtype'    => 'textbox',
235
-    'valuetype'   => 'int',
236
-    'default'     => 0
231
+	'name'        => 'display_summary',
232
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
233
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
234
+	'formtype'    => 'textbox',
235
+	'valuetype'   => 'int',
236
+	'default'     => 0
237 237
 );
238 238
 
239 239
 $modversion['config'][] = array(
240
-    'name'        => 'do_sibling',
241
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
242
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
243
-    'formtype'    => 'yesno',
244
-    'valuetype'   => 'int',
245
-    'default'     => 1
240
+	'name'        => 'do_sibling',
241
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
242
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
243
+	'formtype'    => 'yesno',
244
+	'valuetype'   => 'int',
245
+	'default'     => 1
246 246
 );
247 247
 
248 248
 $modversion['config'][] = array(
249
-    'name'        => 'pings',
250
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
251
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
252
-    'formtype'    => 'textarea',
253
-    'valuetype'   => 'text',
254
-    'default'     => ''
249
+	'name'        => 'pings',
250
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
251
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
252
+	'formtype'    => 'textarea',
253
+	'valuetype'   => 'text',
254
+	'default'     => ''
255 255
 );
256 256
 
257 257
 $modversion['config'][] = array(
258
-    'name'        => 'trackback_option',
259
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
260
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
261
-    'formtype'    => 'select',
262
-    'valuetype'   => 'int',
263
-    'default'     => 0,
264
-    'options'     => array(planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2)
258
+	'name'        => 'trackback_option',
259
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
260
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
261
+	'formtype'    => 'select',
262
+	'valuetype'   => 'int',
263
+	'default'     => 0,
264
+	'options'     => array(planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2)
265 265
 );
266 266
 
267 267
 $modversion['config'][] = array(
268
-    'name'        => 'copyright',
269
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
270
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
271
-    'formtype'    => 'textbox',
272
-    'valuetype'   => 'text',
273
-    'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
268
+	'name'        => 'copyright',
269
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
270
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
271
+	'formtype'    => 'textbox',
272
+	'valuetype'   => 'text',
273
+	'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
274 274
 );
275 275
 
276 276
 $modversion['config'][] = array(
277
-    'name'        => 'newblog_submit',
278
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
279
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
280
-    'formtype'    => 'select',
281
-    'valuetype'   => 'int',
282
-    'default'     => 2,
283
-    'options'     => array(
284
-        _NONE                            => 0,
285
-        planet_constant('MI_MODERATION') => 1,
286
-        planet_constant('MI_MEMBER')     => 2,
287
-        _ALL                             => 3
288
-    )
289
-    // 0 - Only admin; 1 - all but need approval; 2 - members auto approved; 3 - all
277
+	'name'        => 'newblog_submit',
278
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
279
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
280
+	'formtype'    => 'select',
281
+	'valuetype'   => 'int',
282
+	'default'     => 2,
283
+	'options'     => array(
284
+		_NONE                            => 0,
285
+		planet_constant('MI_MODERATION') => 1,
286
+		planet_constant('MI_MEMBER')     => 2,
287
+		_ALL                             => 3
288
+	)
289
+	// 0 - Only admin; 1 - all but need approval; 2 - members auto approved; 3 - all
290 290
 );
291 291
 
292 292
 $modversion['config'][] = array(
293
-    'name'        => 'anonymous_rate',
294
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
295
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
296
-    'formtype'    => 'yesno',
297
-    'valuetype'   => 'int',
298
-    'default'     => 0
293
+	'name'        => 'anonymous_rate',
294
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
295
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
296
+	'formtype'    => 'yesno',
297
+	'valuetype'   => 'int',
298
+	'default'     => 0
299 299
 );
300 300
 
301 301
 $modversion['config'][] = array(
302
-    'name'        => 'do_pseudocron',
303
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
304
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
305
-    'formtype'    => 'yesno',
306
-    'valuetype'   => 'int',
307
-    'default'     => 1
302
+	'name'        => 'do_pseudocron',
303
+	'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
304
+	'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
305
+	'formtype'    => 'yesno',
306
+	'valuetype'   => 'int',
307
+	'default'     => 1
308 308
 );
309 309
 
310 310
 // Notification
Please login to merge, or discard this patch.
Spacing   +61 added lines, -61 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');
29 29
 
30
-include __DIR__ . '/include/vars.php';
30
+include __DIR__.'/include/vars.php';
31 31
 
32
-$modversion                 = array(
32
+$modversion = array(
33 33
     'name'          => planet_constant('MI_NAME'),
34 34
     'version'       => 2.10,
35 35
     'module_status' => 'Final',
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
     'credits'       => 'XOOPS Project',
40 40
     'image'         => 'assets/images/logoModule.png',
41 41
     'dirname'       => $GLOBALS['moddirname'],
42
-    'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
42
+    'help'          => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/readme.html'
43 43
 );
44 44
 $modversion['help']         = 'page=help';
45 45
 $modversion['license']      = 'GNU see LICENSE';
46
-$modversion['license_file'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/gpl.txt';
46
+$modversion['license_file'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/gpl.txt';
47 47
 $modversion['author_word']  = '';
48 48
 $modversion['module_team']  = '';
49 49
 
@@ -62,12 +62,12 @@  discard block
 block discarded – undo
62 62
 // database tables
63 63
 $modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
64 64
 $modversion['tables']           = array(
65
-    $GLOBALS['MOD_DB_PREFIX'] . '_category',
66
-    $GLOBALS['MOD_DB_PREFIX'] . '_article',
67
-    $GLOBALS['MOD_DB_PREFIX'] . '_blog',
68
-    $GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
69
-    $GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
70
-    $GLOBALS['MOD_DB_PREFIX'] . '_rate'
65
+    $GLOBALS['MOD_DB_PREFIX'].'_category',
66
+    $GLOBALS['MOD_DB_PREFIX'].'_article',
67
+    $GLOBALS['MOD_DB_PREFIX'].'_blog',
68
+    $GLOBALS['MOD_DB_PREFIX'].'_blogcat',
69
+    $GLOBALS['MOD_DB_PREFIX'].'_bookmark',
70
+    $GLOBALS['MOD_DB_PREFIX'].'_rate'
71 71
 );
72 72
 
73 73
 // Admin things
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
 /**
94 94
  * Templates
95 95
  */
96
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_index.tpl', 'description' => '');
97
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_article.tpl', 'description' => '');
98
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_archive.tpl', 'description' => '');
99
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_blogs.tpl', 'description' => '');
100
-$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'] . '_search.tpl', 'description' => '');
96
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_index.tpl', 'description' => '');
97
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_article.tpl', 'description' => '');
98
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_archive.tpl', 'description' => '');
99
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_blogs.tpl', 'description' => '');
100
+$modversion['templates'][] = array('file' => $GLOBALS['VAR_PREFIX'].'_search.tpl', 'description' => '');
101 101
 
102 102
 //module css
103 103
 $modversion['css'] = 'templates/style.css';
@@ -109,31 +109,31 @@  discard block
 block discarded – undo
109 109
 $modversion['blocks'][$i]['file']        = 'block.php';
110 110
 $modversion['blocks'][$i]['name']        = planet_constant('MI_ARTICLE');
111 111
 $modversion['blocks'][$i]['description'] = planet_constant('MI_ARTICLE_DESC');
112
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_article_show';
112
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_article_show';
113 113
 $modversion['blocks'][$i]['options']     = 'time|10|0|0'; // type|MaxItems|TitleLength|SummaryLength
114
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_article_edit';
115
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_article.tpl';
114
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_article_edit';
115
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_article.tpl';
116 116
 
117 117
 ++$i;
118 118
 $modversion['blocks'][$i]['file']        = 'block.php';
119 119
 $modversion['blocks'][$i]['name']        = planet_constant('MI_CATEGORY');
120 120
 $modversion['blocks'][$i]['description'] = planet_constant('MI_CATEGORY_DESC');
121
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_category_show';
122
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_category.tpl';
121
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_category_show';
122
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_category.tpl';
123 123
 
124 124
 ++$i;
125 125
 $modversion['blocks'][$i]['file']        = 'block.php';
126 126
 $modversion['blocks'][$i]['name']        = planet_constant('MI_BLOG');
127 127
 $modversion['blocks'][$i]['description'] = planet_constant('MI_BLOG_DESC');
128
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_show';
128
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_blog_show';
129 129
 $modversion['blocks'][$i]['options']     = 'feature|10|0|1'; // type|MaxItems|TitleLength|ShowDesc
130
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_edit';
131
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_blog.tpl';
130
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_blog_edit';
131
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_blog.tpl';
132 132
 
133 133
 // Search
134 134
 $modversion['hasSearch']      = 1;
135 135
 $modversion['search']['file'] = 'include/search.inc.php';
136
-$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'] . '_search';
136
+$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'].'_search';
137 137
 
138 138
 // Comments
139 139
 $modversion['hasComments'] = 1;
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
 
144 144
 // Comment callback functions
145 145
 $modversion['comments']['callbackFile']        = 'include/comment.inc.php';
146
-$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'] . '_com_approve';
147
-$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'] . '_com_update';
146
+$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'].'_com_approve';
147
+$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'].'_com_update';
148 148
 
149 149
 // Configs
150 150
 // Config items
151 151
 $modversion['config'][] = array(
152 152
     'name'        => 'do_debug',
153
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
154
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
153
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG',
154
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC',
155 155
     'formtype'    => 'yesno',
156 156
     'valuetype'   => 'int',
157 157
     'default'     => 1
@@ -159,8 +159,8 @@  discard block
 block discarded – undo
159 159
 
160 160
 $modversion['config'][] = array(
161 161
     'name'        => 'do_urw',
162
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
163
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
162
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE',
163
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC',
164 164
     'formtype'    => 'yesno',
165 165
     'valuetype'   => 'int',
166 166
     'default'     => in_array(php_sapi_name(), array('apache', 'apache2handler'))
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 
169 169
 $modversion['config'][] = array(
170 170
     'name'        => 'theme_set',
171
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
172
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
171
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET',
172
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC',
173 173
     'formtype'    => 'select',
174 174
     'valuetype'   => 'text',
175 175
     'options'     => array(_NONE => '0'),
@@ -178,23 +178,23 @@  discard block
 block discarded – undo
178 178
 
179 179
 $modversion['config'][] = array(
180 180
     'name'        => 'timeformat',
181
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
182
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
181
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT',
182
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC',
183 183
     'formtype'    => 'select',
184 184
     'valuetype'   => 'text',
185 185
     'options'     => array(
186 186
         _DATESTRING                                       => 'l',
187 187
         _MEDIUMDATESTRING                                 => 'm',
188 188
         _SHORTDATESTRING                                  => 's',
189
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
189
+        $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM' => 'c'
190 190
     ),
191 191
     'default'     => 'c'
192 192
 );
193 193
 
194 194
 $modversion['config'][] = array(
195 195
     'name'        => 'articles_perpage',
196
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
197
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
196
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE',
197
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC',
198 198
     'formtype'    => 'textbox',
199 199
     'valuetype'   => 'int',
200 200
     'default'     => 10
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
 
203 203
 $modversion['config'][] = array(
204 204
     'name'        => 'list_perpage',
205
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
206
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
205
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE',
206
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC',
207 207
     'formtype'    => 'textbox',
208 208
     'valuetype'   => 'int',
209 209
     'default'     => 20
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
 
212 212
 $modversion['config'][] = array(
213 213
     'name'        => 'blogs_perupdate',
214
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
215
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
214
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE',
215
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC',
216 216
     'formtype'    => 'textbox',
217 217
     'valuetype'   => 'int',
218 218
     'default'     => 10
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 
221 221
 $modversion['config'][] = array(
222 222
     'name'        => 'article_expire',
223
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
224
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
223
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE',
224
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC',
225 225
     'formtype'    => 'textbox',
226 226
     'valuetype'   => 'int',
227 227
     'default'     => 30
@@ -229,8 +229,8 @@  discard block
 block discarded – undo
229 229
 
230 230
 $modversion['config'][] = array(
231 231
     'name'        => 'display_summary',
232
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
233
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
232
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY',
233
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC',
234 234
     'formtype'    => 'textbox',
235 235
     'valuetype'   => 'int',
236 236
     'default'     => 0
@@ -238,8 +238,8 @@  discard block
 block discarded – undo
238 238
 
239 239
 $modversion['config'][] = array(
240 240
     'name'        => 'do_sibling',
241
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
242
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
241
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING',
242
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC',
243 243
     'formtype'    => 'yesno',
244 244
     'valuetype'   => 'int',
245 245
     'default'     => 1
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
 
248 248
 $modversion['config'][] = array(
249 249
     'name'        => 'pings',
250
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
251
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
250
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PING',
251
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC',
252 252
     'formtype'    => 'textarea',
253 253
     'valuetype'   => 'text',
254 254
     'default'     => ''
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 
257 257
 $modversion['config'][] = array(
258 258
     'name'        => 'trackback_option',
259
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
260
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
259
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION',
260
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC',
261 261
     'formtype'    => 'select',
262 262
     'valuetype'   => 'int',
263 263
     'default'     => 0,
@@ -266,17 +266,17 @@  discard block
 block discarded – undo
266 266
 
267 267
 $modversion['config'][] = array(
268 268
     'name'        => 'copyright',
269
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
270
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
269
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT',
270
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC',
271 271
     'formtype'    => 'textbox',
272 272
     'valuetype'   => 'text',
273
-    'default'     => 'Copyright&copy; %s & ' . $xoopsConfig['sitename']
273
+    'default'     => 'Copyright&copy; %s & '.$xoopsConfig['sitename']
274 274
 );
275 275
 
276 276
 $modversion['config'][] = array(
277 277
     'name'        => 'newblog_submit',
278
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
279
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
278
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT',
279
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC',
280 280
     'formtype'    => 'select',
281 281
     'valuetype'   => 'int',
282 282
     'default'     => 2,
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
 
292 292
 $modversion['config'][] = array(
293 293
     'name'        => 'anonymous_rate',
294
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
295
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
294
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE',
295
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC',
296 296
     'formtype'    => 'yesno',
297 297
     'valuetype'   => 'int',
298 298
     'default'     => 0
@@ -300,8 +300,8 @@  discard block
 block discarded – undo
300 300
 
301 301
 $modversion['config'][] = array(
302 302
     'name'        => 'do_pseudocron',
303
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
304
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
303
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON',
304
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC',
305 305
     'formtype'    => 'yesno',
306 306
     'valuetype'   => 'int',
307 307
     'default'     => 1
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 
312 312
 $modversion['hasNotification']             = 1;
313 313
 $modversion['notification']['lookup_file'] = 'include/notification.inc.php';
314
-$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'] . '_notify_iteminfo';
314
+$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'].'_notify_iteminfo';
315 315
 
316 316
 $i = 0;
317 317
 ++$i;
Please login to merge, or discard this patch.
header.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,10 @@
 block discarded – undo
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28
-include __DIR__ . '/../../mainfile.php';
29
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
28
+include __DIR__.'/../../mainfile.php';
29
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
30 30
 //require_once XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/functions.php';
31
-require_once __DIR__ . '/class/utility.php';
31
+require_once __DIR__.'/class/utility.php';
32 32
 
33 33
 planet_define_url_delimiter();
34 34
 $myts = MyTextSanitizer::getInstance();
Please login to merge, or discard this patch.
counter.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@
 block discarded – undo
29 29
 include __DIR__ . '/header.php';
30 30
 $article_id = Request::getInt('article', 0, 'GET');//empty($_GET['article']) ? 0 : (int)$_GET['article'];
31 31
 if (empty($article_id)) {
32
-    return;
32
+	return;
33 33
 }
34 34
 if (planetGetCookie('art_' . $article_id) > 0) {
35
-    return;
35
+	return;
36 36
 }
37 37
 $articleHandler = xoops_getModuleHandler('article', $xoopsModule->getVar('dirname'));
38 38
 $article_obj    = $articleHandler->get($article_id);
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,18 +26,18 @@
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
30
-$article_id = Request::getInt('article', 0, 'GET');//empty($_GET['article']) ? 0 : (int)$_GET['article'];
29
+include __DIR__.'/header.php';
30
+$article_id = Request::getInt('article', 0, 'GET'); //empty($_GET['article']) ? 0 : (int)$_GET['article'];
31 31
 if (empty($article_id)) {
32 32
     return;
33 33
 }
34
-if (planetGetCookie('art_' . $article_id) > 0) {
34
+if (planetGetCookie('art_'.$article_id)>0) {
35 35
     return;
36 36
 }
37 37
 $articleHandler = xoops_getModuleHandler('article', $xoopsModule->getVar('dirname'));
38 38
 $article_obj    = $articleHandler->get($article_id);
39
-$article_obj->setVar('art_views', $article_obj->getVar('art_views') + 1, true);
39
+$article_obj->setVar('art_views', $article_obj->getVar('art_views')+1, true);
40 40
 $articleHandler->insert($article_obj, true);
41
-PlanetUtility::planetSetCookie('art_' . $article_id, time());
41
+PlanetUtility::planetSetCookie('art_'.$article_id, time());
42 42
 
43 43
 return;
Please login to merge, or discard this patch.
comment_reply.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
 // URL: https://xoops.org                         //
25 25
 // Project: Article Project                                                 //
26 26
 // ------------------------------------------------------------------------ //
27
-include __DIR__ . '/../../mainfile.php';
28
-include XOOPS_ROOT_PATH . '/include/comment_reply.php';
27
+include __DIR__.'/../../mainfile.php';
28
+include XOOPS_ROOT_PATH.'/include/comment_reply.php';
Please login to merge, or discard this patch.
action.article.php 2 patches
Indentation   +47 added lines, -47 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
 $art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET');//(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0));
32 32
 if (empty($art_id)) {
33
-    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID'));
33
+	redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID'));
34 34
 }
35 35
 if (!$xoopsUser->isAdmin()) {
36
-    redirect_header('javascript:history.go(-1);', 2, _NOPERM);
36
+	redirect_header('javascript:history.go(-1);', 2, _NOPERM);
37 37
 }
38 38
 include XOOPS_ROOT_PATH . '/header.php';
39 39
 include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
@@ -44,58 +44,58 @@  discard block
 block discarded – undo
44 44
 $op = Request::getCmd('op', 'check', 'POST');//isset($_POST['op']) ? $_POST['op'] : '';
45 45
 
46 46
 if ($op === 'del' || !empty(Request::getString('del', '', 'POST'))) {
47
-    $articleHandler->delete($article_obj);
48
-    $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
49
-    $message  = planet_constant('MD_SAVED');
50
-    redirect_header($redirect, 2, $message);
47
+	$articleHandler->delete($article_obj);
48
+	$redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
49
+	$message  = planet_constant('MD_SAVED');
50
+	redirect_header($redirect, 2, $message);
51 51
 } elseif ($op === 'save') {
52
-    if (empty($_POST['art_content'])) {
53
-        redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_TEXTEMPTY'));
54
-    }
52
+	if (empty($_POST['art_content'])) {
53
+		redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_TEXTEMPTY'));
54
+	}
55 55
 
56
-    foreach (array(
57
-                 'art_title',
58
-                 'art_link',
59
-                 'art_author',
60
-                 'art_content'
61
-             ) as $tag) {
62
-        if (@Request::getString('tag', '', 'POST') != $article_obj->getVar($tag)) {
63
-            $article_obj->setVar($tag, @Request::getString('tag', '', 'POST'));
64
-        }
65
-    }
56
+	foreach (array(
57
+				 'art_title',
58
+				 'art_link',
59
+				 'art_author',
60
+				 'art_content'
61
+			 ) as $tag) {
62
+		if (@Request::getString('tag', '', 'POST') != $article_obj->getVar($tag)) {
63
+			$article_obj->setVar($tag, @Request::getString('tag', '', 'POST'));
64
+		}
65
+	}
66 66
 
67
-    $art_id_new = $articleHandler->insert($article_obj);
68
-    if (!$article_obj->getVar('art_id')) {
69
-        $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
70
-        $message  = planet_constant('MD_INSERTERROR');
71
-    } else {
72
-        $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
73
-        $message  = planet_constant('MD_SAVED');
74
-    }
75
-    redirect_header($redirect, 2, $message);
67
+	$art_id_new = $articleHandler->insert($article_obj);
68
+	if (!$article_obj->getVar('art_id')) {
69
+		$redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
70
+		$message  = planet_constant('MD_INSERTERROR');
71
+	} else {
72
+		$redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
73
+		$message  = planet_constant('MD_SAVED');
74
+	}
75
+	redirect_header($redirect, 2, $message);
76 76
 } else {
77
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
77
+	require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
78 78
 
79
-    $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true);
79
+	$form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true);
80 80
 
81
-    $form->addElement(new XoopsFormText(planet_constant('MD_TITLE'), 'art_title', 50, 255, $article_obj->getVar('art_title', 'E')), true);
82
-    $form->addElement(new XoopsFormText(planet_constant('MD_LINK'), 'art_link', 50, 255, $article_obj->getVar('art_link', 'E')), true);
83
-    $form->addElement(new XoopsFormText(planet_constant('MD_AUTHOR'), 'art_author', 80, 255, $article_obj->getVar('art_author', 'E')));
84
-    $form->addElement(new XoopsFormTextArea(planet_constant('MD_CONTENT'), 'art_content', $article_obj->getVar('art_content', 'E')), true);
81
+	$form->addElement(new XoopsFormText(planet_constant('MD_TITLE'), 'art_title', 50, 255, $article_obj->getVar('art_title', 'E')), true);
82
+	$form->addElement(new XoopsFormText(planet_constant('MD_LINK'), 'art_link', 50, 255, $article_obj->getVar('art_link', 'E')), true);
83
+	$form->addElement(new XoopsFormText(planet_constant('MD_AUTHOR'), 'art_author', 80, 255, $article_obj->getVar('art_author', 'E')));
84
+	$form->addElement(new XoopsFormTextArea(planet_constant('MD_CONTENT'), 'art_content', $article_obj->getVar('art_content', 'E')), true);
85 85
 
86
-    $form->addElement(new XoopsFormHidden('article', $art_id));
87
-    $form->addElement(new XoopsFormHidden('op', 'save'));
86
+	$form->addElement(new XoopsFormHidden('article', $art_id));
87
+	$form->addElement(new XoopsFormHidden('op', 'save'));
88 88
 
89
-    $button_tray = new XoopsFormElementTray('', '');
90
-    $butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
91
-    $button_tray->addElement($butt_save);
92
-    $butt_del = new XoopsFormButton('', 'del', _DELETE, 'submit');
93
-    $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'");
94
-    $button_tray->addElement($butt_del);
95
-    $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
96
-    $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'");
97
-    $button_tray->addElement($butt_cancel);
98
-    $form->addElement($button_tray);
99
-    $form->display();
89
+	$button_tray = new XoopsFormElementTray('', '');
90
+	$butt_save   = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
91
+	$button_tray->addElement($butt_save);
92
+	$butt_del = new XoopsFormButton('', 'del', _DELETE, 'submit');
93
+	$butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'");
94
+	$button_tray->addElement($butt_del);
95
+	$butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
96
+	$butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'");
97
+	$button_tray->addElement($butt_cancel);
98
+	$form->addElement($button_tray);
99
+	$form->display();
100 100
 }
101 101
 include XOOPS_ROOT_PATH . '/footer.php';
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,26 +26,26 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31
-$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET');//(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0));
31
+$art_id = Request::getInt('article', Request::getInt('article', 0, 'POST'), 'GET'); //(int)(isset($_GET['article']) ? $_GET['article'] : (isset($_POST['article']) ? $_POST['article'] : 0));
32 32
 if (empty($art_id)) {
33 33
     redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID'));
34 34
 }
35 35
 if (!$xoopsUser->isAdmin()) {
36 36
     redirect_header('javascript:history.go(-1);', 2, _NOPERM);
37 37
 }
38
-include XOOPS_ROOT_PATH . '/header.php';
39
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
38
+include XOOPS_ROOT_PATH.'/header.php';
39
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
40 40
 
41 41
 $articleHandler = xoops_getModuleHandler('article', $GLOBALS['moddirname']);
42 42
 $article_obj    = $articleHandler->get($art_id);
43 43
 
44
-$op = Request::getCmd('op', 'check', 'POST');//isset($_POST['op']) ? $_POST['op'] : '';
44
+$op = Request::getCmd('op', 'check', 'POST'); //isset($_POST['op']) ? $_POST['op'] : '';
45 45
 
46 46
 if ($op === 'del' || !empty(Request::getString('del', '', 'POST'))) {
47 47
     $articleHandler->delete($article_obj);
48
-    $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
48
+    $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php';
49 49
     $message  = planet_constant('MD_SAVED');
50 50
     redirect_header($redirect, 2, $message);
51 51
 } elseif ($op === 'save') {
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
 
67 67
     $art_id_new = $articleHandler->insert($article_obj);
68 68
     if (!$article_obj->getVar('art_id')) {
69
-        $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php';
69
+        $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php';
70 70
         $message  = planet_constant('MD_INSERTERROR');
71
-    } else {
72
-        $redirect = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article_obj->getVar('art_id');
71
+    }else {
72
+        $redirect = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article_obj->getVar('art_id');
73 73
         $message  = planet_constant('MD_SAVED');
74 74
     }
75 75
     redirect_header($redirect, 2, $message);
76
-} else {
77
-    require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
76
+}else {
77
+    require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
78 78
 
79 79
     $form = new XoopsThemeForm(_EDIT, 'formarticle', xoops_getenv('PHP_SELF'), 'post', true);
80 80
 
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     $butt_del->setExtra("onClick='document.forms.formarticle.op.value=del'");
94 94
     $button_tray->addElement($butt_del);
95 95
     $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
96
-    $butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . (int)$art_id . "\"'");
96
+    $butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.(int) $art_id."\"'");
97 97
     $button_tray->addElement($butt_cancel);
98 98
     $form->addElement($button_tray);
99 99
     $form->display();
100 100
 }
101
-include XOOPS_ROOT_PATH . '/footer.php';
101
+include XOOPS_ROOT_PATH.'/footer.php';
Please login to merge, or discard this patch.
view.blogs.php 2 patches
Indentation   +110 added lines, -110 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@  discard block
 block discarded – undo
29 29
 include __DIR__ . '/header.php';
30 30
 
31 31
 if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
32
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
33
-    exit();
32
+	include XOOPS_ROOT_PATH . '/include/notification_update.php';
33
+	exit();
34 34
 }
35 35
 
36 36
 if ($REQUEST_URI_parsed = PlanetUtility::planetParseArguments($args_num, $args, $args_str)) {
37
-    $args['start'] = @$args_num[0];
38
-    $args['sort']  = @$args_str[0];
37
+	$args['start'] = @$args_num[0];
38
+	$args['sort']  = @$args_str[0];
39 39
 }
40 40
 
41 41
 /* Start */
@@ -82,28 +82,28 @@  discard block
 block discarded – undo
82 82
 $blog_prefix = '';
83 83
 /* Specific category */
84 84
 if ($category_id > 0) {
85
-    $category_obj = $categoryHandler->get($category_id);
86
-    $criteria->add(new Criteria('bc.cat_id', $category_id));
87
-    $uid           = 0;
88
-    $blog_id       = 0;
89
-    $category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title'));
90
-    $query_type    = 'category';
91
-    $blog_prefix   = 'b.';
85
+	$category_obj = $categoryHandler->get($category_id);
86
+	$criteria->add(new Criteria('bc.cat_id', $category_id));
87
+	$uid           = 0;
88
+	$blog_id       = 0;
89
+	$category_data = array('id' => $category_id, 'title' => $category_obj->getVar('cat_title'));
90
+	$query_type    = 'category';
91
+	$blog_prefix   = 'b.';
92 92
 }
93 93
 
94 94
 /* User bookmarks(favorites) */
95 95
 if ($uid > 0) {
96
-    $criteria->add(new Criteria('bm.bm_uid', $uid));
97
-    $category_id     = 0;
98
-    $blog_id         = 0;
99
-    $bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
100
-    $user_data       = array(
101
-        'uid'   => $uid,
102
-        'name'  => XoopsUser::getUnameFromId($uid),
103
-        'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid))
104
-    );
105
-    $query_type      = 'bookmark';
106
-    $blog_prefix     = 'b.';
96
+	$criteria->add(new Criteria('bm.bm_uid', $uid));
97
+	$category_id     = 0;
98
+	$blog_id         = 0;
99
+	$bookmarkHandler = xoops_getModuleHandler('bookmark', $GLOBALS['moddirname']);
100
+	$user_data       = array(
101
+		'uid'   => $uid,
102
+		'name'  => XoopsUser::getUnameFromId($uid),
103
+		'marks' => $bookmarkHandler->getCount(new Criteria('bm_uid', $uid))
104
+	);
105
+	$query_type      = 'bookmark';
106
+	$blog_prefix     = 'b.';
107 107
 }
108 108
 
109 109
 $criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>'));
@@ -112,20 +112,20 @@  discard block
 block discarded – undo
112 112
 $order = 'DESC';
113 113
 $sort  = empty($sort) ? 'default' : $sort;
114 114
 switch ($sort) {
115
-    case 'marks':
116
-        $sortby = $blog_prefix . 'blog_marks';
117
-        break;
118
-    case 'rating':
119
-        $sortby = $blog_prefix . 'blog_rating';
120
-        break;
121
-    case 'time':
122
-        $sortby = $blog_prefix . 'blog_time';
123
-        break;
124
-    case 'default':
125
-    default:
126
-        $sort   = 'default';
127
-        $sortby = $blog_prefix . 'blog_id';
128
-        break;
115
+	case 'marks':
116
+		$sortby = $blog_prefix . 'blog_marks';
117
+		break;
118
+	case 'rating':
119
+		$sortby = $blog_prefix . 'blog_rating';
120
+		break;
121
+	case 'time':
122
+		$sortby = $blog_prefix . 'blog_time';
123
+		break;
124
+	case 'default':
125
+	default:
126
+		$sort   = 'default';
127
+		$sortby = $blog_prefix . 'blog_id';
128
+		break;
129 129
 }
130 130
 $criteria->setSort($sortby);
131 131
 $criteria->setOrder($order);
@@ -134,93 +134,93 @@  discard block
 block discarded – undo
134 134
 
135 135
 $tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time');
136 136
 switch ($query_type) {
137
-    case 'category':
138
-        $blogs_obj  = $blogHandler->getByCategory($criteria, $tags);
139
-        $count_blog = $blogHandler->getCountByCategory($criteria);
140
-        break;
141
-    case 'bookmark':
142
-        $blogs_obj  = $blogHandler->getByBookmark($criteria, $tags);
143
-        $count_blog = $blogHandler->getCountByBookmark($criteria);
144
-        break;
145
-    default:
146
-        $blogs_obj  = $blogHandler->getAll($criteria, $tags);
147
-        $count_blog = $blogHandler->getCount($criteria);
148
-        break;
137
+	case 'category':
138
+		$blogs_obj  = $blogHandler->getByCategory($criteria, $tags);
139
+		$count_blog = $blogHandler->getCountByCategory($criteria);
140
+		break;
141
+	case 'bookmark':
142
+		$blogs_obj  = $blogHandler->getByBookmark($criteria, $tags);
143
+		$count_blog = $blogHandler->getCountByBookmark($criteria);
144
+		break;
145
+	default:
146
+		$blogs_obj  = $blogHandler->getAll($criteria, $tags);
147
+		$count_blog = $blogHandler->getCount($criteria);
148
+		break;
149 149
 }
150 150
 
151 151
 /* Objects to array */
152 152
 $blogs = array();
153 153
 foreach (array_keys($blogs_obj) as $id) {
154
-    $_blog = array(
155
-        'id'    => $id,
156
-        'title' => $blogs_obj[$id]->getVar('blog_title'),
157
-        'time'  => $blogs_obj[$id]->getTime()
158
-    );
159
-    if (empty($list)) {
160
-        $_blog = array_merge($_blog, array(
161
-            'image' => $blogs_obj[$id]->getImage(),
162
-            'feed'  => $blogs_obj[$id]->getVar('blog_feed'),
163
-            'link'  => $blogs_obj[$id]->getVar('blog_link'),
164
-            'desc'  => $blogs_obj[$id]->getVar('blog_desc'),
165
-            'star'  => $blogs_obj[$id]->getStar(),
166
-            'rates' => $blogs_obj[$id]->getVar('blog_rates'),
167
-            'marks' => $blogs_obj[$id]->getVar('blog_marks')
168
-        ));
169
-    }
170
-    $blogs[] = $_blog;
171
-    unset($_blog);
154
+	$_blog = array(
155
+		'id'    => $id,
156
+		'title' => $blogs_obj[$id]->getVar('blog_title'),
157
+		'time'  => $blogs_obj[$id]->getTime()
158
+	);
159
+	if (empty($list)) {
160
+		$_blog = array_merge($_blog, array(
161
+			'image' => $blogs_obj[$id]->getImage(),
162
+			'feed'  => $blogs_obj[$id]->getVar('blog_feed'),
163
+			'link'  => $blogs_obj[$id]->getVar('blog_link'),
164
+			'desc'  => $blogs_obj[$id]->getVar('blog_desc'),
165
+			'star'  => $blogs_obj[$id]->getStar(),
166
+			'rates' => $blogs_obj[$id]->getVar('blog_rates'),
167
+			'marks' => $blogs_obj[$id]->getVar('blog_marks')
168
+		));
169
+	}
170
+	$blogs[] = $_blog;
171
+	unset($_blog);
172 172
 }
173 173
 unset($blogs_obj);
174 174
 
175 175
 if ($count_blog > $limit) {
176
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
177
-    $start_link = array();
178
-    if ($sort) {
179
-        $start_link[] = 'sort=' . $sort;
180
-    }
181
-    if ($category_id) {
182
-        $start_link[] = 'category=' . $category_id;
183
-    }
184
-    if ($list) {
185
-        $start_link[] = 'list=' . $list;
186
-    }
187
-    $nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&amp;', $start_link));
188
-    $pagenav = $nav->renderNav(4);
176
+	include XOOPS_ROOT_PATH . '/class/pagenav.php';
177
+	$start_link = array();
178
+	if ($sort) {
179
+		$start_link[] = 'sort=' . $sort;
180
+	}
181
+	if ($category_id) {
182
+		$start_link[] = 'category=' . $category_id;
183
+	}
184
+	if ($list) {
185
+		$start_link[] = 'list=' . $list;
186
+	}
187
+	$nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&amp;', $start_link));
188
+	$pagenav = $nav->renderNav(4);
189 189
 } else {
190
-    $pagenav = '';
190
+	$pagenav = '';
191 191
 }
192 192
 
193 193
 $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']);
194 194
 $xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME') . '</a>');
195 195
 
196 196
 if ($category_id || $uid) {
197
-    $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
197
+	$xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
198 198
 
199
-    $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>';
200
-    $xoopsTpl->assign('link_articles', $link_articles);
199
+	$link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>';
200
+	$xoopsTpl->assign('link_articles', $link_articles);
201 201
 }
202 202
 
203 203
 $link_switch = "<a href=\""
204
-               . XOOPS_URL
205
-               . '/modules/'
206
-               . $GLOBALS['moddirname']
207
-               . '/view.blogs.php'
208
-               . (empty($category_id) ? '' : '/c' . $category_id)
209
-               . (empty($uid) ? '' : '/u' . $uid)
210
-               . (empty($list) ? '/l1' : '')
211
-               . "\" title=\""
212
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
213
-               . "\">"
214
-               . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
215
-               . '</a>';
204
+			   . XOOPS_URL
205
+			   . '/modules/'
206
+			   . $GLOBALS['moddirname']
207
+			   . '/view.blogs.php'
208
+			   . (empty($category_id) ? '' : '/c' . $category_id)
209
+			   . (empty($uid) ? '' : '/u' . $uid)
210
+			   . (empty($list) ? '/l1' : '')
211
+			   . "\" title=\""
212
+			   . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
213
+			   . "\">"
214
+			   . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
215
+			   . '</a>';
216 216
 $xoopsTpl->assign('link_switch', $link_switch);
217 217
 
218 218
 if (empty($uid) && is_object($xoopsUser)) {
219
-    $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
219
+	$xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
220 220
 }
221 221
 
222 222
 if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) {
223
-    $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
223
+	$xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
224 224
 }
225 225
 
226 226
 $xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS'));
@@ -234,35 +234,35 @@  discard block
 block discarded – undo
234 234
 $xoopsTpl->assign('user_level', !is_object($xoopsUser) ? 0 : ($xoopsUser->isAdmin() ? 2 : 1));
235 235
 if (empty($xoopsModuleConfig['anonymous_rate']) && !is_object($xoopsUser)) {
236 236
 } elseif (!$list) {
237
-    $xoopsTpl->assign('canrate', 1);
237
+	$xoopsTpl->assign('canrate', 1);
238 238
 }
239 239
 
240 240
 $sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER;
241 241
 $vars      = array();
242 242
 if (!empty($category_id)) {
243
-    $vars[] = 'c' . $category_id;
243
+	$vars[] = 'c' . $category_id;
244 244
 }
245 245
 if (!empty($uid)) {
246
-    $vars[] = 'u' . $uid;
246
+	$vars[] = 'u' . $uid;
247 247
 }
248 248
 if (!empty($list)) {
249
-    $vars[] = 'li';
249
+	$vars[] = 'li';
250 250
 }
251 251
 if (!empty($vars)) {
252
-    $sort_link .= implode('/', $vars) . '/';
252
+	$sort_link .= implode('/', $vars) . '/';
253 253
 }
254 254
 $sortlinks   = array();
255 255
 $valid_sorts = array(
256
-    'marks'   => planet_constant('MD_BOOKMARKS'),
257
-    'rating'  => planet_constant('MD_RATING'),
258
-    'time'    => planet_constant('MD_TIME'),
259
-    'default' => planet_constant('MD_DEFAULT')
256
+	'marks'   => planet_constant('MD_BOOKMARKS'),
257
+	'rating'  => planet_constant('MD_RATING'),
258
+	'time'    => planet_constant('MD_TIME'),
259
+	'default' => planet_constant('MD_DEFAULT')
260 260
 );
261 261
 foreach ($valid_sorts as $val => $name) {
262
-    if ($val == $sort) {
263
-        continue;
264
-    }
265
-    $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
262
+	if ($val == $sort) {
263
+		continue;
264
+	}
265
+	$sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
266 266
 }
267 267
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
268 268
 
Please login to merge, or discard this patch.
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 use Xmf\Request;
28 28
 
29
-include __DIR__ . '/header.php';
29
+include __DIR__.'/header.php';
30 30
 
31 31
 if (preg_match("/\/notification_update\.php/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
32
-    include XOOPS_ROOT_PATH . '/include/notification_update.php';
32
+    include XOOPS_ROOT_PATH.'/include/notification_update.php';
33 33
     exit();
34 34
 }
35 35
 
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
 }
67 67
 */
68 68
 
69
-$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name') . ' - ' . planet_constant('MD_BLOGS');
69
+$xoopsOption['xoops_pagetitle'] = $xoopsModule->getVar('name').' - '.planet_constant('MD_BLOGS');
70 70
 $xoopsOption['template_main']   = PlanetUtility::planetGetTemplate('blogs');
71
-require_once XOOPS_ROOT_PATH . '/header.php';
72
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
71
+require_once XOOPS_ROOT_PATH.'/header.php';
72
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
73 73
 
74 74
 // Following part will not be executed after cache
75 75
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 $criteria    = new CriteriaCompo();
82 82
 $blog_prefix = '';
83 83
 /* Specific category */
84
-if ($category_id > 0) {
84
+if ($category_id>0) {
85 85
     $category_obj = $categoryHandler->get($category_id);
86 86
     $criteria->add(new Criteria('bc.cat_id', $category_id));
87 87
     $uid           = 0;
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 }
93 93
 
94 94
 /* User bookmarks(favorites) */
95
-if ($uid > 0) {
95
+if ($uid>0) {
96 96
     $criteria->add(new Criteria('bm.bm_uid', $uid));
97 97
     $category_id     = 0;
98 98
     $blog_id         = 0;
@@ -106,25 +106,25 @@  discard block
 block discarded – undo
106 106
     $blog_prefix     = 'b.';
107 107
 }
108 108
 
109
-$criteria->add(new Criteria($blog_prefix . 'blog_status', 0, '>'));
109
+$criteria->add(new Criteria($blog_prefix.'blog_status', 0, '>'));
110 110
 
111 111
 /* Sort */
112 112
 $order = 'DESC';
113 113
 $sort  = empty($sort) ? 'default' : $sort;
114 114
 switch ($sort) {
115 115
     case 'marks':
116
-        $sortby = $blog_prefix . 'blog_marks';
116
+        $sortby = $blog_prefix.'blog_marks';
117 117
         break;
118 118
     case 'rating':
119
-        $sortby = $blog_prefix . 'blog_rating';
119
+        $sortby = $blog_prefix.'blog_rating';
120 120
         break;
121 121
     case 'time':
122
-        $sortby = $blog_prefix . 'blog_time';
122
+        $sortby = $blog_prefix.'blog_time';
123 123
         break;
124 124
     case 'default':
125 125
     default:
126 126
         $sort   = 'default';
127
-        $sortby = $blog_prefix . 'blog_id';
127
+        $sortby = $blog_prefix.'blog_id';
128 128
         break;
129 129
 }
130 130
 $criteria->setSort($sortby);
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 $criteria->setStart($start);
133 133
 $criteria->setLimit($limit);
134 134
 
135
-$tags = empty($list) ? '' : array($blog_prefix . 'blog_title', $blog_prefix . 'blog_time');
135
+$tags = empty($list) ? '' : array($blog_prefix.'blog_title', $blog_prefix.'blog_time');
136 136
 switch ($query_type) {
137 137
     case 'category':
138 138
         $blogs_obj  = $blogHandler->getByCategory($criteria, $tags);
@@ -172,31 +172,31 @@  discard block
 block discarded – undo
172 172
 }
173 173
 unset($blogs_obj);
174 174
 
175
-if ($count_blog > $limit) {
176
-    include XOOPS_ROOT_PATH . '/class/pagenav.php';
175
+if ($count_blog>$limit) {
176
+    include XOOPS_ROOT_PATH.'/class/pagenav.php';
177 177
     $start_link = array();
178 178
     if ($sort) {
179
-        $start_link[] = 'sort=' . $sort;
179
+        $start_link[] = 'sort='.$sort;
180 180
     }
181 181
     if ($category_id) {
182
-        $start_link[] = 'category=' . $category_id;
182
+        $start_link[] = 'category='.$category_id;
183 183
     }
184 184
     if ($list) {
185
-        $start_link[] = 'list=' . $list;
185
+        $start_link[] = 'list='.$list;
186 186
     }
187 187
     $nav     = new XoopsPageNav($count_blog, $limit, $start, 'start', implode('&amp;', $start_link));
188 188
     $pagenav = $nav->renderNav(4);
189
-} else {
189
+}else {
190 190
     $pagenav = '';
191 191
 }
192 192
 
193 193
 $xoopsTpl->assign('xoops_pagetitle', $xoopsOption['xoops_pagetitle']);
194
-$xoopsTpl->assign('link_home', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/index.php\" title=\"" . planet_constant('MD_HOME') . "\" target=\"_self\">" . planet_constant('MD_HOME') . '</a>');
194
+$xoopsTpl->assign('link_home', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/index.php\" title=\"".planet_constant('MD_HOME')."\" target=\"_self\">".planet_constant('MD_HOME').'</a>');
195 195
 
196 196
 if ($category_id || $uid) {
197
-    $xoopsTpl->assign('link_index', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/view.blogs.php\" title=\"" . planet_constant('MD_INDEX') . "\" target=\"_self\">" . planet_constant('MD_INDEX') . '</a>');
197
+    $xoopsTpl->assign('link_index', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/view.blogs.php\" title=\"".planet_constant('MD_INDEX')."\" target=\"_self\">".planet_constant('MD_INDEX').'</a>');
198 198
 
199
-    $link_articles = "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . (empty($category_id) ? '' : '/c' . $category_id) . (empty($uid) ? '' : '/u' . $uid) . "\" title=\"" . planet_constant('MD_ARTICLES') . "\">" . planet_constant('MD_ARTICLES') . '</a>';
199
+    $link_articles = "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.(empty($category_id) ? '' : '/c'.$category_id).(empty($uid) ? '' : '/u'.$uid)."\" title=\"".planet_constant('MD_ARTICLES')."\">".planet_constant('MD_ARTICLES').'</a>';
200 200
     $xoopsTpl->assign('link_articles', $link_articles);
201 201
 }
202 202
 
@@ -205,8 +205,8 @@  discard block
 block discarded – undo
205 205
                . '/modules/'
206 206
                . $GLOBALS['moddirname']
207 207
                . '/view.blogs.php'
208
-               . (empty($category_id) ? '' : '/c' . $category_id)
209
-               . (empty($uid) ? '' : '/u' . $uid)
208
+               . (empty($category_id) ? '' : '/c'.$category_id)
209
+               . (empty($uid) ? '' : '/u'.$uid)
210 210
                . (empty($list) ? '/l1' : '')
211 211
                . "\" title=\""
212 212
                . (empty($list) ? planet_constant('MD_LISTVIEW') : planet_constant('MD_FULLVIEW'))
@@ -216,14 +216,14 @@  discard block
 block discarded – undo
216 216
 $xoopsTpl->assign('link_switch', $link_switch);
217 217
 
218 218
 if (empty($uid) && is_object($xoopsUser)) {
219
-    $xoopsTpl->assign('link_bookmark', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER . 'u' . $xoopsUser->getVar('uid') . "\" title=\"" . planet_constant('MD_BOOKMARKS') . "\" target=\"_self\">" . planet_constant('MD_BOOKMARKS') . '</a>');
219
+    $xoopsTpl->assign('link_bookmark', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER.'u'.$xoopsUser->getVar('uid')."\" title=\"".planet_constant('MD_BOOKMARKS')."\" target=\"_self\">".planet_constant('MD_BOOKMARKS').'</a>');
220 220
 }
221 221
 
222 222
 if ($xoopsModuleConfig['newblog_submit'] == 1 || is_object($xoopsUser)) {
223
-    $xoopsTpl->assign('link_submit', "<a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . "/action.blog.php\" title=\"" . _SUBMIT . "\" target=\"_blank\">" . _SUBMIT . '</a>');
223
+    $xoopsTpl->assign('link_submit', "<a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname']."/action.blog.php\" title=\""._SUBMIT."\" target=\"_blank\">"._SUBMIT.'</a>');
224 224
 }
225 225
 
226
-$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name') . '::' . planet_constant('MD_BLOGS'));
226
+$xoopsTpl->assign('pagetitle', $xoopsModule->getVar('name').'::'.planet_constant('MD_BLOGS'));
227 227
 $xoopsTpl->assign('category', @$category_data);
228 228
 $xoopsTpl->assign('user', @$user_data);
229 229
 $xoopsTpl->assign('blogs', $blogs);
@@ -237,19 +237,19 @@  discard block
 block discarded – undo
237 237
     $xoopsTpl->assign('canrate', 1);
238 238
 }
239 239
 
240
-$sort_link = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.blogs.php' . URL_DELIMITER;
240
+$sort_link = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.blogs.php'.URL_DELIMITER;
241 241
 $vars      = array();
242 242
 if (!empty($category_id)) {
243
-    $vars[] = 'c' . $category_id;
243
+    $vars[] = 'c'.$category_id;
244 244
 }
245 245
 if (!empty($uid)) {
246
-    $vars[] = 'u' . $uid;
246
+    $vars[] = 'u'.$uid;
247 247
 }
248 248
 if (!empty($list)) {
249 249
     $vars[] = 'li';
250 250
 }
251 251
 if (!empty($vars)) {
252
-    $sort_link .= implode('/', $vars) . '/';
252
+    $sort_link .= implode('/', $vars).'/';
253 253
 }
254 254
 $sortlinks   = array();
255 255
 $valid_sorts = array(
@@ -262,8 +262,8 @@  discard block
 block discarded – undo
262 262
     if ($val == $sort) {
263 263
         continue;
264 264
     }
265
-    $sortlinks[] = "<a href=\"" . $sort_link . $val . "\">" . $name . '</a>';
265
+    $sortlinks[] = "<a href=\"".$sort_link.$val."\">".$name.'</a>';
266 266
 }
267 267
 $xoopsTpl->assign('link_sort', implode(' | ', $sortlinks));
268 268
 
269
-require_once __DIR__ . '/footer.php';
269
+require_once __DIR__.'/footer.php';
Please login to merge, or discard this patch.