Completed
Push — master ( 7c5656...a50592 )
by Michael
01:55
created
action.blog.php 2 patches
Indentation   +107 added lines, -107 removed lines patch added patch discarded remove patch
@@ -33,15 +33,15 @@  discard block
 block discarded – undo
33 33
 $blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int)$blog_id;
34 34
 
35 35
 if (empty($xoopsModuleConfig['newblog_submit']) && (!is_object($xoopsUser) || !$xoopsUser->isAdmin())) {
36
-    redirect_header('index.php', 2, _NOPERM);
36
+	redirect_header('index.php', 2, _NOPERM);
37 37
 }
38 38
 
39 39
 if ($op === 'save' && !empty(Request::getString('fetch', '', 'POST'))) {//!empty($_POST['fetch'])) {
40
-    $op = 'edit';
40
+	$op = 'edit';
41 41
 }
42 42
 
43 43
 if ($op === 'save' && !$GLOBALS['xoopsSecurity']->check()) {
44
-    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID') . ': security check failed');
44
+	redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID') . ': security check failed');
45 45
 }
46 46
 include XOOPS_ROOT_PATH . '/header.php';
47 47
 include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
@@ -50,110 +50,110 @@  discard block
 block discarded – undo
50 50
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
51 51
 
52 52
 switch ($op) {
53
-    /* save a single blog */
54
-    case 'save':
55
-
56
-        if ($blog_id) {
57
-            $blog_obj = $blogHandler->get($blog_id);
58
-            if ($xoopsUser->isAdmin()) {
59
-                $blog_obj->setVar('blog_status', Request::getInt('blog_status', 0, 'POST'));// @$_POST['blog_status']);
60
-            }
61
-        } else {
62
-            if ($blog_exists = $blogHandler->getCount(new Criteria('blog_feed', $myts->addSlashes(trim(Request::getText('blog_feed', '', 'POST')))))  //$_POST['blog_feed']))))
63
-            ) {
64
-                redirect_header('index.php', 2, planet_constant('MD_BLOGEXISTS'));
65
-            }
66
-
67
-            $blog_obj = $blogHandler->create();
68
-            $blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : PlanetUtility::planetGetIP(true));
69
-
70
-            switch ($xoopsModuleConfig['newblog_submit']) {
71
-                case 2:
72
-                    if (!is_object($xoopsUser)) {
73
-                        $status = 0;
74
-                    } else {
75
-                        $status = 1;
76
-                    }
77
-                    break;
78
-                case 0:
79
-                case 3:
80
-                    $status = 1;
81
-                    break;
82
-                case 1:
83
-                default:
84
-                    if (!is_object($xoopsUser) || !$xoopsUser->isAdmin()) {
85
-                        $status = 0;
86
-                    } else {
87
-                        $status = 1;
88
-                    }
89
-                    break;
90
-            }
91
-
92
-            $blog_obj->setVar('blog_status', $status);
93
-        }
94
-
95
-        $blog_obj->setVar('blog_title', Request::getString('blog_title', '', 'POST'));//$_POST['blog_title']);
96
-        $blog_obj->setVar('blog_desc', Request::getString('blog_desc', '', 'POST'));//$_POST['blog_desc']);
97
-        $blog_obj->setVar('blog_image', Request::getString('blog_image', '', 'POST'));//$_POST['blog_image']);
98
-        $blog_obj->setVar('blog_feed', Request::getText('blog_feed', '', 'POST'));//$_POST['blog_feed']);
99
-        $blog_obj->setVar('blog_link', Request::getString('blog_link', '', 'POST'));//$_POST['blog_link']);
100
-        $blog_obj->setVar('blog_language', Request::getString('blog_language', '', 'POST'));//$_POST['blog_language']);
101
-        $blog_obj->setVar('blog_charset', Request::getString('blog_charset', '', 'POST'));//$_POST['blog_charset']);
102
-        $blog_obj->setVar('blog_trackback', Request::getString('blog_trackback', '', 'POST'));//$_POST['blog_trackback']);
103
-        if ($blog_obj->isNew()) {
104
-            $blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : PlanetUtility::planetGetIP(true));
105
-        }
106
-
107
-        if (!$blogHandler->insert($blog_obj)) {
108
-        } elseif (0 !== count(Request::getArray('categories', [], 'POST'))) {
109
-            $blog_id = $blog_obj->getVar('blog_id');
110
-            if (in_array(0, $_POST['categories'])) {
111
-                $_POST['categories'] = [];
112
-            }
113
-            $blogHandler->setCategories($blog_id, Request::getString('andor', '', 'POST'));//$_POST['categories']);
114
-        }
115
-        $message = planet_constant('MD_DBUPDATED');
116
-        redirect_header('index.php' . URL_DELIMITER . 'b' . $blog_id, 2, $message);
117
-
118
-    /* edit a single blog */
119
-    // no break
120
-    case 'edit':
121
-    default:
122
-        if (!empty(Request::getString('fetch', '', 'POST'))) {
123
-            $blog_obj = $blogHandler->fetch(Request::getText('blog_feed', '', 'POST'));
124
-            $blog_obj->setVar('blog_id', $blog_id);
125
-        } else {
126
-            $blog_obj = $blogHandler->get($blog_id);
127
-        }
128
-        $categories = Request::getArray('categories', [], 'POST');//isset($_POST['categories']) ? $_POST['categories'] : array();
129
-        if (in_array('-1', $categories)) {
130
-            $categories = [];
131
-        }
132
-        if (empty($categories) && $blog_id > 0) {
133
-            $crit       = new Criteria('bc.blog_id', $blog_id);
134
-            $categories = array_keys($categoryHandler->getByBlog($crit));
135
-        }
136
-        if (empty($categories)) {
137
-            $categories = [0 => _NONE];
138
-        }
139
-
140
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
141
-        echo '<br>';
142
-        if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
143
-            $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
144
-            $blogs_obj = $blogHandler->getList($criteria);
145
-            if (count($blogs_obj) > 0) {
146
-                echo "<div class=\"errorMsg\">" . planet_constant('MD_BLOGEXISTS');
147
-                foreach (array_keys($blogs_obj) as $bid) {
148
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
149
-                }
150
-                echo '</div>';
151
-                unset($blogs_obj, $criteria);
152
-            }
153
-        }
154
-        include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
155
-        echo '</fieldset>';
156
-        break;
53
+	/* save a single blog */
54
+	case 'save':
55
+
56
+		if ($blog_id) {
57
+			$blog_obj = $blogHandler->get($blog_id);
58
+			if ($xoopsUser->isAdmin()) {
59
+				$blog_obj->setVar('blog_status', Request::getInt('blog_status', 0, 'POST'));// @$_POST['blog_status']);
60
+			}
61
+		} else {
62
+			if ($blog_exists = $blogHandler->getCount(new Criteria('blog_feed', $myts->addSlashes(trim(Request::getText('blog_feed', '', 'POST')))))  //$_POST['blog_feed']))))
63
+			) {
64
+				redirect_header('index.php', 2, planet_constant('MD_BLOGEXISTS'));
65
+			}
66
+
67
+			$blog_obj = $blogHandler->create();
68
+			$blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : PlanetUtility::planetGetIP(true));
69
+
70
+			switch ($xoopsModuleConfig['newblog_submit']) {
71
+				case 2:
72
+					if (!is_object($xoopsUser)) {
73
+						$status = 0;
74
+					} else {
75
+						$status = 1;
76
+					}
77
+					break;
78
+				case 0:
79
+				case 3:
80
+					$status = 1;
81
+					break;
82
+				case 1:
83
+				default:
84
+					if (!is_object($xoopsUser) || !$xoopsUser->isAdmin()) {
85
+						$status = 0;
86
+					} else {
87
+						$status = 1;
88
+					}
89
+					break;
90
+			}
91
+
92
+			$blog_obj->setVar('blog_status', $status);
93
+		}
94
+
95
+		$blog_obj->setVar('blog_title', Request::getString('blog_title', '', 'POST'));//$_POST['blog_title']);
96
+		$blog_obj->setVar('blog_desc', Request::getString('blog_desc', '', 'POST'));//$_POST['blog_desc']);
97
+		$blog_obj->setVar('blog_image', Request::getString('blog_image', '', 'POST'));//$_POST['blog_image']);
98
+		$blog_obj->setVar('blog_feed', Request::getText('blog_feed', '', 'POST'));//$_POST['blog_feed']);
99
+		$blog_obj->setVar('blog_link', Request::getString('blog_link', '', 'POST'));//$_POST['blog_link']);
100
+		$blog_obj->setVar('blog_language', Request::getString('blog_language', '', 'POST'));//$_POST['blog_language']);
101
+		$blog_obj->setVar('blog_charset', Request::getString('blog_charset', '', 'POST'));//$_POST['blog_charset']);
102
+		$blog_obj->setVar('blog_trackback', Request::getString('blog_trackback', '', 'POST'));//$_POST['blog_trackback']);
103
+		if ($blog_obj->isNew()) {
104
+			$blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : PlanetUtility::planetGetIP(true));
105
+		}
106
+
107
+		if (!$blogHandler->insert($blog_obj)) {
108
+		} elseif (0 !== count(Request::getArray('categories', [], 'POST'))) {
109
+			$blog_id = $blog_obj->getVar('blog_id');
110
+			if (in_array(0, $_POST['categories'])) {
111
+				$_POST['categories'] = [];
112
+			}
113
+			$blogHandler->setCategories($blog_id, Request::getString('andor', '', 'POST'));//$_POST['categories']);
114
+		}
115
+		$message = planet_constant('MD_DBUPDATED');
116
+		redirect_header('index.php' . URL_DELIMITER . 'b' . $blog_id, 2, $message);
117
+
118
+	/* edit a single blog */
119
+	// no break
120
+	case 'edit':
121
+	default:
122
+		if (!empty(Request::getString('fetch', '', 'POST'))) {
123
+			$blog_obj = $blogHandler->fetch(Request::getText('blog_feed', '', 'POST'));
124
+			$blog_obj->setVar('blog_id', $blog_id);
125
+		} else {
126
+			$blog_obj = $blogHandler->get($blog_id);
127
+		}
128
+		$categories = Request::getArray('categories', [], 'POST');//isset($_POST['categories']) ? $_POST['categories'] : array();
129
+		if (in_array('-1', $categories)) {
130
+			$categories = [];
131
+		}
132
+		if (empty($categories) && $blog_id > 0) {
133
+			$crit       = new Criteria('bc.blog_id', $blog_id);
134
+			$categories = array_keys($categoryHandler->getByBlog($crit));
135
+		}
136
+		if (empty($categories)) {
137
+			$categories = [0 => _NONE];
138
+		}
139
+
140
+		echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
141
+		echo '<br>';
142
+		if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
143
+			$criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
144
+			$blogs_obj = $blogHandler->getList($criteria);
145
+			if (count($blogs_obj) > 0) {
146
+				echo "<div class=\"errorMsg\">" . planet_constant('MD_BLOGEXISTS');
147
+				foreach (array_keys($blogs_obj) as $bid) {
148
+					echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
149
+				}
150
+				echo '</div>';
151
+				unset($blogs_obj, $criteria);
152
+			}
153
+		}
154
+		include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
155
+		echo '</fieldset>';
156
+		break;
157 157
 }
158 158
 
159 159
 include XOOPS_ROOT_PATH . '/footer.php';
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@  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
-$op      = Request::getString('op', Request::getString('op', '', 'POST'), 'GET');//!empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
32
-$blog_id = Request::getArray('blog', Request::getArray('blog', [], 'POST'), 'GET');//!empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0);
33
-$blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int)$blog_id;
31
+$op      = Request::getString('op', Request::getString('op', '', 'POST'), 'GET'); //!empty($_POST['op']) ? $_POST['op'] : (!empty($_GET['op']) ? $_GET['op'] : '');
32
+$blog_id = Request::getArray('blog', Request::getArray('blog', [], 'POST'), 'GET'); //!empty($_POST['blog']) ? $_POST['blog'] : (!empty($_GET['blog']) ? $_GET['blog'] : 0);
33
+$blog_id = is_array($blog_id) ? array_map('intval', $blog_id) : (int) $blog_id;
34 34
 
35 35
 if (empty($xoopsModuleConfig['newblog_submit']) && (!is_object($xoopsUser) || !$xoopsUser->isAdmin())) {
36 36
     redirect_header('index.php', 2, _NOPERM);
@@ -41,10 +41,10 @@  discard block
 block discarded – undo
41 41
 }
42 42
 
43 43
 if ($op === 'save' && !$GLOBALS['xoopsSecurity']->check()) {
44
-    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID') . ': security check failed');
44
+    redirect_header('javascript:history.go(-1);', 1, planet_constant('MD_INVALID').': security check failed');
45 45
 }
46
-include XOOPS_ROOT_PATH . '/header.php';
47
-include XOOPS_ROOT_PATH . '/modules/' . $xoopsModule->getVar('dirname') . '/include/vars.php';
46
+include XOOPS_ROOT_PATH.'/header.php';
47
+include XOOPS_ROOT_PATH.'/modules/'.$xoopsModule->getVar('dirname').'/include/vars.php';
48 48
 
49 49
 $blogHandler     = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
50 50
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
         if ($blog_id) {
57 57
             $blog_obj = $blogHandler->get($blog_id);
58 58
             if ($xoopsUser->isAdmin()) {
59
-                $blog_obj->setVar('blog_status', Request::getInt('blog_status', 0, 'POST'));// @$_POST['blog_status']);
59
+                $blog_obj->setVar('blog_status', Request::getInt('blog_status', 0, 'POST')); // @$_POST['blog_status']);
60 60
             }
61
-        } else {
61
+        }else {
62 62
             if ($blog_exists = $blogHandler->getCount(new Criteria('blog_feed', $myts->addSlashes(trim(Request::getText('blog_feed', '', 'POST')))))  //$_POST['blog_feed']))))
63 63
             ) {
64 64
                 redirect_header('index.php', 2, planet_constant('MD_BLOGEXISTS'));
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 case 2:
72 72
                     if (!is_object($xoopsUser)) {
73 73
                         $status = 0;
74
-                    } else {
74
+                    }else {
75 75
                         $status = 1;
76 76
                     }
77 77
                     break;
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
                 default:
84 84
                     if (!is_object($xoopsUser) || !$xoopsUser->isAdmin()) {
85 85
                         $status = 0;
86
-                    } else {
86
+                    }else {
87 87
                         $status = 1;
88 88
                     }
89 89
                     break;
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
             $blog_obj->setVar('blog_status', $status);
93 93
         }
94 94
 
95
-        $blog_obj->setVar('blog_title', Request::getString('blog_title', '', 'POST'));//$_POST['blog_title']);
96
-        $blog_obj->setVar('blog_desc', Request::getString('blog_desc', '', 'POST'));//$_POST['blog_desc']);
97
-        $blog_obj->setVar('blog_image', Request::getString('blog_image', '', 'POST'));//$_POST['blog_image']);
98
-        $blog_obj->setVar('blog_feed', Request::getText('blog_feed', '', 'POST'));//$_POST['blog_feed']);
99
-        $blog_obj->setVar('blog_link', Request::getString('blog_link', '', 'POST'));//$_POST['blog_link']);
100
-        $blog_obj->setVar('blog_language', Request::getString('blog_language', '', 'POST'));//$_POST['blog_language']);
101
-        $blog_obj->setVar('blog_charset', Request::getString('blog_charset', '', 'POST'));//$_POST['blog_charset']);
102
-        $blog_obj->setVar('blog_trackback', Request::getString('blog_trackback', '', 'POST'));//$_POST['blog_trackback']);
95
+        $blog_obj->setVar('blog_title', Request::getString('blog_title', '', 'POST')); //$_POST['blog_title']);
96
+        $blog_obj->setVar('blog_desc', Request::getString('blog_desc', '', 'POST')); //$_POST['blog_desc']);
97
+        $blog_obj->setVar('blog_image', Request::getString('blog_image', '', 'POST')); //$_POST['blog_image']);
98
+        $blog_obj->setVar('blog_feed', Request::getText('blog_feed', '', 'POST')); //$_POST['blog_feed']);
99
+        $blog_obj->setVar('blog_link', Request::getString('blog_link', '', 'POST')); //$_POST['blog_link']);
100
+        $blog_obj->setVar('blog_language', Request::getString('blog_language', '', 'POST')); //$_POST['blog_language']);
101
+        $blog_obj->setVar('blog_charset', Request::getString('blog_charset', '', 'POST')); //$_POST['blog_charset']);
102
+        $blog_obj->setVar('blog_trackback', Request::getString('blog_trackback', '', 'POST')); //$_POST['blog_trackback']);
103 103
         if ($blog_obj->isNew()) {
104 104
             $blog_obj->setVar('blog_submitter', is_object($xoopsUser) ? $xoopsUser->getVar('uid') : PlanetUtility::planetGetIP(true));
105 105
         }
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
             if (in_array(0, $_POST['categories'])) {
111 111
                 $_POST['categories'] = [];
112 112
             }
113
-            $blogHandler->setCategories($blog_id, Request::getString('andor', '', 'POST'));//$_POST['categories']);
113
+            $blogHandler->setCategories($blog_id, Request::getString('andor', '', 'POST')); //$_POST['categories']);
114 114
         }
115 115
         $message = planet_constant('MD_DBUPDATED');
116
-        redirect_header('index.php' . URL_DELIMITER . 'b' . $blog_id, 2, $message);
116
+        redirect_header('index.php'.URL_DELIMITER.'b'.$blog_id, 2, $message);
117 117
 
118 118
     /* edit a single blog */
119 119
     // no break
@@ -122,14 +122,14 @@  discard block
 block discarded – undo
122 122
         if (!empty(Request::getString('fetch', '', 'POST'))) {
123 123
             $blog_obj = $blogHandler->fetch(Request::getText('blog_feed', '', 'POST'));
124 124
             $blog_obj->setVar('blog_id', $blog_id);
125
-        } else {
125
+        }else {
126 126
             $blog_obj = $blogHandler->get($blog_id);
127 127
         }
128
-        $categories = Request::getArray('categories', [], 'POST');//isset($_POST['categories']) ? $_POST['categories'] : array();
128
+        $categories = Request::getArray('categories', [], 'POST'); //isset($_POST['categories']) ? $_POST['categories'] : array();
129 129
         if (in_array('-1', $categories)) {
130 130
             $categories = [];
131 131
         }
132
-        if (empty($categories) && $blog_id > 0) {
132
+        if (empty($categories) && $blog_id>0) {
133 133
             $crit       = new Criteria('bc.blog_id', $blog_id);
134 134
             $categories = array_keys($categoryHandler->getByBlog($crit));
135 135
         }
@@ -137,23 +137,23 @@  discard block
 block discarded – undo
137 137
             $categories = [0 => _NONE];
138 138
         }
139 139
 
140
-        echo "<fieldset><legend style='font-weight: bold; color: #900;'>" . _EDIT . '</legend>';
140
+        echo "<fieldset><legend style='font-weight: bold; color: #900;'>"._EDIT.'</legend>';
141 141
         echo '<br>';
142 142
         if (empty($blog_id) && $blog_obj->getVar('blog_feed')) {
143 143
             $criteria  = new Criteria('blog_feed', $blog_obj->getVar('blog_feed'));
144 144
             $blogs_obj = $blogHandler->getList($criteria);
145
-            if (count($blogs_obj) > 0) {
146
-                echo "<div class=\"errorMsg\">" . planet_constant('MD_BLOGEXISTS');
145
+            if (count($blogs_obj)>0) {
146
+                echo "<div class=\"errorMsg\">".planet_constant('MD_BLOGEXISTS');
147 147
                 foreach (array_keys($blogs_obj) as $bid) {
148
-                    echo "<br><a href=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . $bid . "\" target=\"_blank\">" . $blogs_obj[$bid] . '</a>';
148
+                    echo "<br><a href=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.$bid."\" target=\"_blank\">".$blogs_obj[$bid].'</a>';
149 149
                 }
150 150
                 echo '</div>';
151 151
                 unset($blogs_obj, $criteria);
152 152
             }
153 153
         }
154
-        include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/form.blog.php';
154
+        include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/form.blog.php';
155 155
         echo '</fieldset>';
156 156
         break;
157 157
 }
158 158
 
159
-include XOOPS_ROOT_PATH . '/footer.php';
159
+include XOOPS_ROOT_PATH.'/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                 = [
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']           = [
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'][] = [
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'][] = [
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(), ['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(), ['apache', 'apache2handler'])
167 167
 ];
168 168
 
169 169
 $modversion['config'][] = [
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'     => [_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'     => [_NONE => '0'],
176
+	'default'     => ''
177 177
 ];
178 178
 
179 179
 $modversion['config'][] = [
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'     => [
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'     => [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'     => [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'     => [planet_constant('MI_MODERATION') => 0, _ALL => 1, _NONE => 2]
265 265
 ];
266 266
 
267 267
 $modversion['config'][] = [
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'][] = [
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'     => [
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'     => [
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'][] = [
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'][] = [
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('Restricted access.');
29 29
 
30
-include __DIR__ . '/include/vars.php';
30
+include __DIR__.'/include/vars.php';
31 31
 
32
-$modversion                 = [
32
+$modversion = [
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']           = [
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'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_index.tpl', 'description' => ''];
97
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_article.tpl', 'description' => ''];
98
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_archive.tpl', 'description' => ''];
99
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_blogs.tpl', 'description' => ''];
100
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_search.tpl', 'description' => ''];
96
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_index.tpl', 'description' => ''];
97
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_article.tpl', 'description' => ''];
98
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_archive.tpl', 'description' => ''];
99
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_blogs.tpl', 'description' => ''];
100
+$modversion['templates'][] = ['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'][] = [
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'][] = [
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(), ['apache', 'apache2handler'])
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 
169 169
 $modversion['config'][] = [
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'     => [_NONE => '0'],
@@ -178,23 +178,23 @@  discard block
 block discarded – undo
178 178
 
179 179
 $modversion['config'][] = [
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'     => [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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'][] = [
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.
include/config.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@
 block discarded – undo
24 24
 
25 25
 $moduleDirName = basename(dirname(__DIR__));
26 26
 $uploadFolders = [
27
-    NEWBB_UPLOAD_PATH,
28
-    NEWBB_UPLOAD_PATH . '/thumbs'
27
+	NEWBB_UPLOAD_PATH,
28
+	NEWBB_UPLOAD_PATH . '/thumbs'
29 29
 ];
30 30
 
31 31
 //$copyFiles = array(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,12 +20,12 @@
 block discarded – undo
20 20
  */
21 21
 
22 22
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
23
-require_once __DIR__ . '/common.php';
23
+require_once __DIR__.'/common.php';
24 24
 
25 25
 $moduleDirName = basename(dirname(__DIR__));
26 26
 $uploadFolders = [
27 27
     NEWBB_UPLOAD_PATH,
28
-    NEWBB_UPLOAD_PATH . '/thumbs'
28
+    NEWBB_UPLOAD_PATH.'/thumbs'
29 29
 ];
30 30
 
31 31
 //$copyFiles = array(
Please login to merge, or discard this patch.
include/functions.ini.php 2 patches
Indentation   +72 added lines, -72 removed lines patch added patch discarded remove patch
@@ -32,88 +32,88 @@
 block discarded – undo
32 32
 
33 33
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
34 34
 if (!defined('PLANET_INI')) {
35
-    exit();
35
+	exit();
36 36
 }
37 37
 
38 38
 if (!defined('PLANET_FUNCTIONS_INI')):
39
-    define('PLANET_FUNCTIONS_INI', 1);
39
+	define('PLANET_FUNCTIONS_INI', 1);
40 40
 
41
-    /**
42
-     * @param $name
43
-     * @return mixed
44
-     */
45
-    function planet_constant($name)
46
-    {
47
-        return mod_constant($name);
48
-    }
41
+	/**
42
+	 * @param $name
43
+	 * @return mixed
44
+	 */
45
+	function planet_constant($name)
46
+	{
47
+		return mod_constant($name);
48
+	}
49 49
 
50
-    /**
51
-     * @param      $name
52
-     * @param bool $isRel
53
-     * @return string
54
-     */
55
-    function planet_DB_prefix($name, $isRel = false)
56
-    {
57
-        return mod_DB_prefix($name, $isRel);
58
-    }
50
+	/**
51
+	 * @param      $name
52
+	 * @param bool $isRel
53
+	 * @return string
54
+	 */
55
+	function planet_DB_prefix($name, $isRel = false)
56
+	{
57
+		return mod_DB_prefix($name, $isRel);
58
+	}
59 59
 
60
-    /**
61
-     * @return bool
62
-     */
63
-    function planet_load_object()
64
-    {
65
-        return load_object();
66
-    }
60
+	/**
61
+	 * @return bool
62
+	 */
63
+	function planet_load_object()
64
+	{
65
+		return load_object();
66
+	}
67 67
 
68
-    /**
69
-     * @return array|mixed
70
-     */
71
-    function planet_load_config()
72
-    {
73
-        static $moduleConfig;
74
-        if (isset($moduleConfig)) {
75
-            return $moduleConfig;
76
-        }
68
+	/**
69
+	 * @return array|mixed
70
+	 */
71
+	function planet_load_config()
72
+	{
73
+		static $moduleConfig;
74
+		if (isset($moduleConfig)) {
75
+			return $moduleConfig;
76
+		}
77 77
 
78
-        if (is_object($GLOBALS['xoopsModule'])
79
-            && $GLOBALS['xoopsModule']->getVar('dirname') == $GLOBALS['moddirname']) {
80
-            if (isset($GLOBALS['xoopsModuleConfig'])) {
81
-                $moduleConfig = $GLOBALS['xoopsModuleConfig'];
82
-            }
83
-        } else {
84
-            /** @var XoopsModuleHandler $moduleHandler */
85
-            $moduleHandler = xoops_getHandler('module');
86
-            $module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
78
+		if (is_object($GLOBALS['xoopsModule'])
79
+			&& $GLOBALS['xoopsModule']->getVar('dirname') == $GLOBALS['moddirname']) {
80
+			if (isset($GLOBALS['xoopsModuleConfig'])) {
81
+				$moduleConfig = $GLOBALS['xoopsModuleConfig'];
82
+			}
83
+		} else {
84
+			/** @var XoopsModuleHandler $moduleHandler */
85
+			$moduleHandler = xoops_getHandler('module');
86
+			$module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
87 87
 
88
-            $configHandler = xoops_getHandler('config');
89
-            $criteria      = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid')));
90
-            $configs       = $configHandler->getConfigs($criteria);
91
-            foreach (array_keys($configs) as $i) {
92
-                $moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
93
-            }
94
-            unset($configs);
95
-        }
96
-        if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
97
-            $moduleConfig = array_merge($moduleConfig, $customConfig);
98
-        }
88
+			$configHandler = xoops_getHandler('config');
89
+			$criteria      = new CriteriaCompo(new Criteria('conf_modid', $module->getVar('mid')));
90
+			$configs       = $configHandler->getConfigs($criteria);
91
+			foreach (array_keys($configs) as $i) {
92
+				$moduleConfig[$configs[$i]->getVar('conf_name')] = $configs[$i]->getConfValueForOutput();
93
+			}
94
+			unset($configs);
95
+		}
96
+		if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
97
+			$moduleConfig = array_merge($moduleConfig, $customConfig);
98
+		}
99 99
 
100
-        return $moduleConfig;
101
-    }
100
+		return $moduleConfig;
101
+	}
102 102
 
103
-    function planet_define_url_delimiter()
104
-    {
105
-        if (defined('URL_DELIMITER')) {
106
-            if (!in_array(URL_DELIMITER, ['?', '/'])) {
107
-                die('Exit on security');
108
-            }
109
-        } else {
110
-            $moduleConfig = planet_load_config();
111
-            if (empty($moduleConfig['do_urw'])) {
112
-                define('URL_DELIMITER', '?');
113
-            } else {
114
-                define('URL_DELIMITER', '/');
115
-            }
116
-        }
117
-    }
103
+	function planet_define_url_delimiter()
104
+	{
105
+		if (defined('URL_DELIMITER')) {
106
+			if (!in_array(URL_DELIMITER, ['?', '/'])) {
107
+				die('Exit on security');
108
+			}
109
+		} else {
110
+			$moduleConfig = planet_load_config();
111
+			if (empty($moduleConfig['do_urw'])) {
112
+				define('URL_DELIMITER', '?');
113
+			} else {
114
+				define('URL_DELIMITER', '/');
115
+			}
116
+		}
117
+	}
118 118
 
119 119
 endif;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             if (isset($GLOBALS['xoopsModuleConfig'])) {
81 81
                 $moduleConfig = $GLOBALS['xoopsModuleConfig'];
82 82
             }
83
-        } else {
83
+        }else {
84 84
             /** @var XoopsModuleHandler $moduleHandler */
85 85
             $moduleHandler = xoops_getHandler('module');
86 86
             $module        = $moduleHandler->getByDirname($GLOBALS['moddirname']);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             }
94 94
             unset($configs);
95 95
         }
96
-        if ($customConfig = @include XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/plugin.php') {
96
+        if ($customConfig = @include XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/plugin.php') {
97 97
             $moduleConfig = array_merge($moduleConfig, $customConfig);
98 98
         }
99 99
 
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
             if (!in_array(URL_DELIMITER, ['?', '/'])) {
107 107
                 die('Exit on security');
108 108
             }
109
-        } else {
109
+        }else {
110 110
             $moduleConfig = planet_load_config();
111 111
             if (empty($moduleConfig['do_urw'])) {
112 112
                 define('URL_DELIMITER', '?');
113
-            } else {
113
+            }else {
114 114
                 define('URL_DELIMITER', '/');
115 115
             }
116 116
         }
Please login to merge, or discard this patch.
include/common.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,19 +22,19 @@
 block discarded – undo
22 22
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
23 23
 
24 24
 define('NEWBB_DIRNAME', basename(dirname(__DIR__)));
25
-define('NEWBB_URL', XOOPS_URL . '/modules/' . NEWBB_DIRNAME);
26
-define('NEWBB_PATH', XOOPS_ROOT_PATH . '/modules/' . NEWBB_DIRNAME);
27
-define('NEWBB_IMAGES_URL', NEWBB_URL . '/assets/images');
28
-define('NEWBB_ADMIN_URL', NEWBB_URL . '/admin');
29
-define('NEWBB_ADMIN_PATH', NEWBB_PATH . '/admin/index.php');
30
-define('NEWBB_ROOT_PATH', $GLOBALS['xoops']->path('modules/' . NEWBB_DIRNAME));
31
-define('NEWBB_AUTHOR_LOGOIMG', NEWBB_URL . '/assets/images/logo_module.png');
32
-define('NEWBB_UPLOAD_URL', XOOPS_UPLOAD_URL . '/' . NEWBB_DIRNAME); // WITHOUT Trailing slash
33
-define('NEWBB_UPLOAD_PATH', XOOPS_UPLOAD_PATH . '/' . NEWBB_DIRNAME); // WITHOUT Trailing slash
25
+define('NEWBB_URL', XOOPS_URL.'/modules/'.NEWBB_DIRNAME);
26
+define('NEWBB_PATH', XOOPS_ROOT_PATH.'/modules/'.NEWBB_DIRNAME);
27
+define('NEWBB_IMAGES_URL', NEWBB_URL.'/assets/images');
28
+define('NEWBB_ADMIN_URL', NEWBB_URL.'/admin');
29
+define('NEWBB_ADMIN_PATH', NEWBB_PATH.'/admin/index.php');
30
+define('NEWBB_ROOT_PATH', $GLOBALS['xoops']->path('modules/'.NEWBB_DIRNAME));
31
+define('NEWBB_AUTHOR_LOGOIMG', NEWBB_URL.'/assets/images/logo_module.png');
32
+define('NEWBB_UPLOAD_URL', XOOPS_UPLOAD_URL.'/'.NEWBB_DIRNAME); // WITHOUT Trailing slash
33
+define('NEWBB_UPLOAD_PATH', XOOPS_UPLOAD_PATH.'/'.NEWBB_DIRNAME); // WITHOUT Trailing slash
34 34
 
35 35
 // module information
36 36
 $mod_copyright = "<a href='https://xoops.org' title='XOOPS Project' target='_blank'>
37
-                     <img src='" . NEWBB_AUTHOR_LOGOIMG . "' alt='XOOPS Project'></a>";
37
+                     <img src='" . NEWBB_AUTHOR_LOGOIMG."' alt='XOOPS Project'></a>";
38 38
 
39 39
 xoops_loadLanguage('common', NEWBB_DIRNAME);
40 40
 
Please login to merge, or discard this patch.
include/form.blog.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -43,28 +43,28 @@
 block discarded – undo
43 43
 $categories_option = $categoryHandler->getList();
44 44
 natsort($categories_option);
45 45
 if (count($categories_option)) {
46
-    $cat_option_tray = new XoopsFormElementTray(planet_constant('MD_CATEGORY'), '<br>');
47
-    $options         = [0 => _NONE];
48
-    foreach ($categories_option as $id => $title) {
49
-        $options[$id] = $title;
50
-    }
51
-    $cat_select = new XoopsFormSelect('', 'categories', $categories, 3, true);
52
-    $cat_select->addOptionArray($options);
53
-    $cat_option_tray->addElement($cat_select);
54
-    $form->addElement($cat_option_tray);
46
+	$cat_option_tray = new XoopsFormElementTray(planet_constant('MD_CATEGORY'), '<br>');
47
+	$options         = [0 => _NONE];
48
+	foreach ($categories_option as $id => $title) {
49
+		$options[$id] = $title;
50
+	}
51
+	$cat_select = new XoopsFormSelect('', 'categories', $categories, 3, true);
52
+	$cat_select->addOptionArray($options);
53
+	$cat_option_tray->addElement($cat_select);
54
+	$form->addElement($cat_option_tray);
55 55
 }
56 56
 
57 57
 /* For admin only */
58 58
 if (is_object($xoopsUser) && $xoopsUser->isAdmin()) {
59
-    $status_option_tray = new XoopsFormElementTray(planet_constant('MD_STATUS'), '<br>');
60
-    $status_select      = new XoopsFormSelect('', 'blog_status', $blog_obj->getVar('blog_status'));
61
-    $status_select->addOptionArray([
62
-                                       '0' => planet_constant('MD_PENDING'),
63
-                                       '1' => planet_constant('MD_ACTIVE'),
64
-                                       '2' => planet_constant('MD_FEATURED')
65
-                                   ]);
66
-    $status_option_tray->addElement($status_select);
67
-    $form->addElement($status_option_tray);
59
+	$status_option_tray = new XoopsFormElementTray(planet_constant('MD_STATUS'), '<br>');
60
+	$status_select      = new XoopsFormSelect('', 'blog_status', $blog_obj->getVar('blog_status'));
61
+	$status_select->addOptionArray([
62
+									   '0' => planet_constant('MD_PENDING'),
63
+									   '1' => planet_constant('MD_ACTIVE'),
64
+									   '2' => planet_constant('MD_FEATURED')
65
+								   ]);
66
+	$status_option_tray->addElement($status_select);
67
+	$form->addElement($status_option_tray);
68 68
 }
69 69
 
70 70
 $form->addElement(new XoopsFormHidden('blog', $blog_id));
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
28 28
 
29
-require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
29
+require_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php';
30 30
 $categoryHandler = xoops_getModuleHandler('category', $GLOBALS['moddirname']);
31 31
 
32 32
 $form = new XoopsThemeForm(_EDIT, 'formblog', xoops_getenv('PHP_SELF'), 'POST', true);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 $butt_save = new XoopsFormButton('', 'submit', _SUBMIT, 'submit');
77 77
 $button_tray->addElement($butt_save);
78 78
 $butt_cancel = new XoopsFormButton('', 'cancel', _CANCEL, 'button');
79
-$butt_cancel->setExtra("onclick='window.document.location=\"" . XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/index.php' . URL_DELIMITER . 'b' . (int)$blog_id . "\"'");
79
+$butt_cancel->setExtra("onclick='window.document.location=\"".XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/index.php'.URL_DELIMITER.'b'.(int) $blog_id."\"'");
80 80
 $button_tray->addElement($butt_cancel);
81 81
 $form->addElement($button_tray);
82 82
 $form->display();
Please login to merge, or discard this patch.
include/plugin.transfer.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
16 16
 
17 17
 if (!@require_once XOOPS_ROOT_PATH . '/Frameworks/transfer/transfer.php') {
18
-    return null;
18
+	return null;
19 19
 }
20 20
 
21 21
 // Specify the addons to skip for the module
@@ -28,41 +28,41 @@  discard block
 block discarded – undo
28 28
  */
29 29
 class ModuleTransferHandler extends TransferHandler
30 30
 {
31
-    /**
32
-     * ModuleTransferHandler constructor.
33
-     */
34
-    public function __construct()
35
-    {
36
-        parent::__construct();
37
-    }
31
+	/**
32
+	 * ModuleTransferHandler constructor.
33
+	 */
34
+	public function __construct()
35
+	{
36
+		parent::__construct();
37
+	}
38 38
 
39
-    /**
40
-     * Get valid addon list
41
-     *
42
-     * @param array   $skip Addons to skip
43
-     * @param boolean $sort To sort the list upon 'level'
44
-     *                      return  array   $list
45
-     */
46
-    public function &getList($skip = [], $sort = true)
47
-    {
48
-        $list = parent::getList($skip, $sort);
39
+	/**
40
+	 * Get valid addon list
41
+	 *
42
+	 * @param array   $skip Addons to skip
43
+	 * @param boolean $sort To sort the list upon 'level'
44
+	 *                      return  array   $list
45
+	 */
46
+	public function &getList($skip = [], $sort = true)
47
+	{
48
+		$list = parent::getList($skip, $sort);
49 49
 
50
-        return $list;
51
-    }
50
+		return $list;
51
+	}
52 52
 
53
-    /**
54
-     * If need change config of an item
55
-     * 1 parent::load_item
56
-     * 2 $this->config
57
-     * 3 $this->do_transfer
58
-     * @param $item
59
-     * @param $data
60
-     * @return
61
-     */
62
-    public function do_transfer($item, &$data)
63
-    {
64
-        $ret = parent::do_transfer($item, $data);
53
+	/**
54
+	 * If need change config of an item
55
+	 * 1 parent::load_item
56
+	 * 2 $this->config
57
+	 * 3 $this->do_transfer
58
+	 * @param $item
59
+	 * @param $data
60
+	 * @return
61
+	 */
62
+	public function do_transfer($item, &$data)
63
+	{
64
+		$ret = parent::do_transfer($item, $data);
65 65
 
66
-        return $ret;
67
-    }
66
+		return $ret;
67
+	}
68 68
 }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
 
15 15
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
16 16
 
17
-if (!@require_once XOOPS_ROOT_PATH . '/Frameworks/transfer/transfer.php') {
17
+if (!@require_once XOOPS_ROOT_PATH.'/Frameworks/transfer/transfer.php') {
18 18
     return null;
19 19
 }
20 20
 
Please login to merge, or discard this patch.
include/action.module.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
29 29
 
30
-include __DIR__ . '/vars.php';
30
+include __DIR__.'/vars.php';
31 31
 //mod_loadFunctions('', $GLOBALS['moddirname']);
32 32
 
33 33
 PlanetUtility::planetParseFunction('
Please login to merge, or discard this patch.
include/notification.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
 
20 20
 // defined('XOOPS_ROOT_PATH') || exit('Restricted access.');
21 21
 
22
-include __DIR__ . '/vars.php';
22
+include __DIR__.'/vars.php';
23 23
 //mod_loadFunctions('', $GLOBALS['moddirname']);
24 24
 
25 25
 PlanetUtility::planetParseFunction('
Please login to merge, or discard this patch.