Completed
Push — master ( 10bab4...a0a78b )
by Michael
02:06
created
xoops_version.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -28,10 +28,10 @@  discard block
 block discarded – undo
28 28
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
29 29
 
30 30
 
31
-require_once __DIR__ . '/preloads/autoloader.php';
32
-include __DIR__ . '/include/vars.php';
31
+require_once __DIR__.'/preloads/autoloader.php';
32
+include __DIR__.'/include/vars.php';
33 33
 
34
-$modversion                 = [
34
+$modversion = [
35 35
     'name'          => planet_constant('MI_NAME'),
36 36
     'version'       => 2.10,
37 37
     'module_status' => 'Final',
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
     'credits'       => 'XOOPS Project',
42 42
     'image'         => 'assets/images/logoModule.png',
43 43
     'dirname'       => $GLOBALS['moddirname'],
44
-    'help'          => XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/readme.html'
44
+    'help'          => XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/readme.html'
45 45
 ];
46 46
 $modversion['help']         = 'page=help';
47 47
 $modversion['license']      = 'GNU see LICENSE';
48
-$modversion['license_file'] = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/gpl.txt';
48
+$modversion['license_file'] = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/gpl.txt';
49 49
 $modversion['author_word']  = '';
50 50
 $modversion['module_team']  = '';
51 51
 
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
 // database tables
65 65
 $modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
66 66
 $modversion['tables']           = [
67
-    $GLOBALS['MOD_DB_PREFIX'] . '_category',
68
-    $GLOBALS['MOD_DB_PREFIX'] . '_article',
69
-    $GLOBALS['MOD_DB_PREFIX'] . '_blog',
70
-    $GLOBALS['MOD_DB_PREFIX'] . '_blogcat',
71
-    $GLOBALS['MOD_DB_PREFIX'] . '_bookmark',
72
-    $GLOBALS['MOD_DB_PREFIX'] . '_rate'
67
+    $GLOBALS['MOD_DB_PREFIX'].'_category',
68
+    $GLOBALS['MOD_DB_PREFIX'].'_article',
69
+    $GLOBALS['MOD_DB_PREFIX'].'_blog',
70
+    $GLOBALS['MOD_DB_PREFIX'].'_blogcat',
71
+    $GLOBALS['MOD_DB_PREFIX'].'_bookmark',
72
+    $GLOBALS['MOD_DB_PREFIX'].'_rate'
73 73
 ];
74 74
 
75 75
 // Admin things
@@ -95,11 +95,11 @@  discard block
 block discarded – undo
95 95
 /**
96 96
  * Templates
97 97
  */
98
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_index.tpl', 'description' => ''];
99
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_article.tpl', 'description' => ''];
100
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_archive.tpl', 'description' => ''];
101
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_blogs.tpl', 'description' => ''];
102
-$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'] . '_search.tpl', 'description' => ''];
98
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_index.tpl', 'description' => ''];
99
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_article.tpl', 'description' => ''];
100
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_archive.tpl', 'description' => ''];
101
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_blogs.tpl', 'description' => ''];
102
+$modversion['templates'][] = ['file' => $GLOBALS['VAR_PREFIX'].'_search.tpl', 'description' => ''];
103 103
 
104 104
 //module css
105 105
 $modversion['css'] = 'templates/style.css';
@@ -111,31 +111,31 @@  discard block
 block discarded – undo
111 111
 $modversion['blocks'][$i]['file']        = 'block.php';
112 112
 $modversion['blocks'][$i]['name']        = planet_constant('MI_ARTICLE');
113 113
 $modversion['blocks'][$i]['description'] = planet_constant('MI_ARTICLE_DESC');
114
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_article_show';
114
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_article_show';
115 115
 $modversion['blocks'][$i]['options']     = 'time|10|0|0'; // type|MaxItems|TitleLength|SummaryLength
116
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_article_edit';
117
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_article.tpl';
116
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_article_edit';
117
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_article.tpl';
118 118
 
119 119
 ++$i;
120 120
 $modversion['blocks'][$i]['file']        = 'block.php';
121 121
 $modversion['blocks'][$i]['name']        = planet_constant('MI_CATEGORY');
122 122
 $modversion['blocks'][$i]['description'] = planet_constant('MI_CATEGORY_DESC');
123
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_category_show';
124
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_category.tpl';
123
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_category_show';
124
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_category.tpl';
125 125
 
126 126
 ++$i;
127 127
 $modversion['blocks'][$i]['file']        = 'block.php';
128 128
 $modversion['blocks'][$i]['name']        = planet_constant('MI_BLOG');
129 129
 $modversion['blocks'][$i]['description'] = planet_constant('MI_BLOG_DESC');
130
-$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_show';
130
+$modversion['blocks'][$i]['show_func']   = $GLOBALS['VAR_PREFIX'].'_blog_show';
131 131
 $modversion['blocks'][$i]['options']     = 'feature|10|0|1'; // type|MaxItems|TitleLength|ShowDesc
132
-$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'] . '_blog_edit';
133
-$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'] . '_block_blog.tpl';
132
+$modversion['blocks'][$i]['edit_func']   = $GLOBALS['VAR_PREFIX'].'_blog_edit';
133
+$modversion['blocks'][$i]['template']    = $GLOBALS['VAR_PREFIX'].'_block_blog.tpl';
134 134
 
135 135
 // Search
136 136
 $modversion['hasSearch']      = 1;
137 137
 $modversion['search']['file'] = 'include/search.inc.php';
138
-$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'] . '_search';
138
+$modversion['search']['func'] = $GLOBALS['VAR_PREFIX'].'_search';
139 139
 
140 140
 // Comments
141 141
 $modversion['hasComments'] = 1;
@@ -145,15 +145,15 @@  discard block
 block discarded – undo
145 145
 
146 146
 // Comment callback functions
147 147
 $modversion['comments']['callbackFile']        = 'include/comment.inc.php';
148
-$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'] . '_com_approve';
149
-$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'] . '_com_update';
148
+$modversion['comments']['callback']['approve'] = $GLOBALS['VAR_PREFIX'].'_com_approve';
149
+$modversion['comments']['callback']['update']  = $GLOBALS['VAR_PREFIX'].'_com_update';
150 150
 
151 151
 // Configs
152 152
 // Config items
153 153
 $modversion['config'][] = [
154 154
     'name'        => 'do_debug',
155
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG',
156
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC',
155
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG',
156
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC',
157 157
     'formtype'    => 'yesno',
158 158
     'valuetype'   => 'int',
159 159
     'default'     => 1
@@ -161,8 +161,8 @@  discard block
 block discarded – undo
161 161
 
162 162
 $modversion['config'][] = [
163 163
     'name'        => 'do_urw',
164
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE',
165
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC',
164
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE',
165
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC',
166 166
     'formtype'    => 'yesno',
167 167
     'valuetype'   => 'int',
168 168
     'default'     => in_array(php_sapi_name(), ['apache', 'apache2handler'])
@@ -170,8 +170,8 @@  discard block
 block discarded – undo
170 170
 
171 171
 $modversion['config'][] = [
172 172
     'name'        => 'theme_set',
173
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET',
174
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC',
173
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET',
174
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC',
175 175
     'formtype'    => 'select',
176 176
     'valuetype'   => 'text',
177 177
     'options'     => [_NONE => '0'],
@@ -180,23 +180,23 @@  discard block
 block discarded – undo
180 180
 
181 181
 $modversion['config'][] = [
182 182
     'name'        => 'timeformat',
183
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT',
184
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC',
183
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT',
184
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC',
185 185
     'formtype'    => 'select',
186 186
     'valuetype'   => 'text',
187 187
     'options'     => [
188 188
         _DATESTRING                                       => 'l',
189 189
         _MEDIUMDATESTRING                                 => 'm',
190 190
         _SHORTDATESTRING                                  => 's',
191
-        $GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM' => 'c'
191
+        $GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM' => 'c'
192 192
     ],
193 193
     'default'     => 'c'
194 194
 ];
195 195
 
196 196
 $modversion['config'][] = [
197 197
     'name'        => 'articles_perpage',
198
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE',
199
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC',
198
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE',
199
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC',
200 200
     'formtype'    => 'textbox',
201 201
     'valuetype'   => 'int',
202 202
     'default'     => 10
@@ -204,8 +204,8 @@  discard block
 block discarded – undo
204 204
 
205 205
 $modversion['config'][] = [
206 206
     'name'        => 'list_perpage',
207
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE',
208
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC',
207
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE',
208
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC',
209 209
     'formtype'    => 'textbox',
210 210
     'valuetype'   => 'int',
211 211
     'default'     => 20
@@ -213,8 +213,8 @@  discard block
 block discarded – undo
213 213
 
214 214
 $modversion['config'][] = [
215 215
     'name'        => 'blogs_perupdate',
216
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE',
217
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC',
216
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE',
217
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC',
218 218
     'formtype'    => 'textbox',
219 219
     'valuetype'   => 'int',
220 220
     'default'     => 10
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 
223 223
 $modversion['config'][] = [
224 224
     'name'        => 'article_expire',
225
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE',
226
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC',
225
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE',
226
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC',
227 227
     'formtype'    => 'textbox',
228 228
     'valuetype'   => 'int',
229 229
     'default'     => 30
@@ -231,8 +231,8 @@  discard block
 block discarded – undo
231 231
 
232 232
 $modversion['config'][] = [
233 233
     'name'        => 'display_summary',
234
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY',
235
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC',
234
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY',
235
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC',
236 236
     'formtype'    => 'textbox',
237 237
     'valuetype'   => 'int',
238 238
     'default'     => 0
@@ -240,8 +240,8 @@  discard block
 block discarded – undo
240 240
 
241 241
 $modversion['config'][] = [
242 242
     'name'        => 'do_sibling',
243
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING',
244
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC',
243
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING',
244
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC',
245 245
     'formtype'    => 'yesno',
246 246
     'valuetype'   => 'int',
247 247
     'default'     => 1
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
 
250 250
 $modversion['config'][] = [
251 251
     'name'        => 'pings',
252
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PING',
253
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC',
252
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PING',
253
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC',
254 254
     'formtype'    => 'textarea',
255 255
     'valuetype'   => 'text',
256 256
     'default'     => ''
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
 
259 259
 $modversion['config'][] = [
260 260
     'name'        => 'trackback_option',
261
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION',
262
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC',
261
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION',
262
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC',
263 263
     'formtype'    => 'select',
264 264
     'valuetype'   => 'int',
265 265
     'default'     => 0,
@@ -268,17 +268,17 @@  discard block
 block discarded – undo
268 268
 
269 269
 $modversion['config'][] = [
270 270
     'name'        => 'copyright',
271
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT',
272
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC',
271
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT',
272
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC',
273 273
     'formtype'    => 'textbox',
274 274
     'valuetype'   => 'text',
275
-    'default'     => 'Copyright© %s & ' . $xoopsConfig['sitename']
275
+    'default'     => 'Copyright© %s & '.$xoopsConfig['sitename']
276 276
 ];
277 277
 
278 278
 $modversion['config'][] = [
279 279
     'name'        => 'newblog_submit',
280
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT',
281
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC',
280
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT',
281
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC',
282 282
     'formtype'    => 'select',
283 283
     'valuetype'   => 'int',
284 284
     'default'     => 2,
@@ -293,8 +293,8 @@  discard block
 block discarded – undo
293 293
 
294 294
 $modversion['config'][] = [
295 295
     'name'        => 'anonymous_rate',
296
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE',
297
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC',
296
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE',
297
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC',
298 298
     'formtype'    => 'yesno',
299 299
     'valuetype'   => 'int',
300 300
     'default'     => 0
@@ -302,8 +302,8 @@  discard block
 block discarded – undo
302 302
 
303 303
 $modversion['config'][] = [
304 304
     'name'        => 'do_pseudocron',
305
-    'title'       => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON',
306
-    'description' => $GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC',
305
+    'title'       => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON',
306
+    'description' => $GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC',
307 307
     'formtype'    => 'yesno',
308 308
     'valuetype'   => 'int',
309 309
     'default'     => 1
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
 
314 314
 $modversion['hasNotification']             = 1;
315 315
 $modversion['notification']['lookup_file'] = 'include/notification.inc.php';
316
-$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'] . '_notify_iteminfo';
316
+$modversion['notification']['lookup_func'] = $GLOBALS['VAR_PREFIX'].'_notify_iteminfo';
317 317
 
318 318
 $i = 0;
319 319
 ++$i;
Please login to merge, or discard this patch.
language/english/common.php 1 patch
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -21,51 +21,51 @@
 block discarded – undo
21 21
 $moduleDirName      = basename(dirname(dirname(__DIR__)));
22 22
 $moduleDirNameUpper = strtoupper($moduleDirName);
23 23
 
24
-define('CO_' . $moduleDirNameUpper . '_GDLIBSTATUS', 'GD library support: ');
25
-define('CO_' . $moduleDirNameUpper . '_GDLIBVERSION', 'GD Library version: ');
26
-define('CO_' . $moduleDirNameUpper . '_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
-define('CO_' . $moduleDirNameUpper . '_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
-define('CO_' . $moduleDirNameUpper . '_IMAGEINFO', 'Server status');
29
-define('CO_' . $moduleDirNameUpper . '_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
-define('CO_' . $moduleDirNameUpper . '_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
-define('CO_' . $moduleDirNameUpper . '_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
-define('CO_' . $moduleDirNameUpper . '_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
-define('CO_' . $moduleDirNameUpper . '_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
-define('CO_' . $moduleDirNameUpper . '_ON', "<span style='font-weight: bold;'>ON</span>");
35
-define('CO_' . $moduleDirNameUpper . '_SERVERPATH', 'Server path to XOOPS root: ');
36
-define('CO_' . $moduleDirNameUpper . '_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
-define('CO_' . $moduleDirNameUpper . '_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
-define('CO_' . $moduleDirNameUpper . '_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
24
+define('CO_'.$moduleDirNameUpper.'_GDLIBSTATUS', 'GD library support: ');
25
+define('CO_'.$moduleDirNameUpper.'_GDLIBVERSION', 'GD Library version: ');
26
+define('CO_'.$moduleDirNameUpper.'_GDOFF', "<span style='font-weight: bold;'>Disabled</span> (No thumbnails available)");
27
+define('CO_'.$moduleDirNameUpper.'_GDON', "<span style='font-weight: bold;'>Enabled</span> (Thumbsnails available)");
28
+define('CO_'.$moduleDirNameUpper.'_IMAGEINFO', 'Server status');
29
+define('CO_'.$moduleDirNameUpper.'_MAXPOSTSIZE', 'Max post size permitted (post_max_size directive in php.ini): ');
30
+define('CO_'.$moduleDirNameUpper.'_MAXUPLOADSIZE', 'Max upload size permitted (upload_max_filesize directive in php.ini): ');
31
+define('CO_'.$moduleDirNameUpper.'_MEMORYLIMIT', 'Memory limit (memory_limit directive in php.ini): ');
32
+define('CO_'.$moduleDirNameUpper.'_METAVERSION', "<span style='font-weight: bold;'>Downloads meta version:</span> ");
33
+define('CO_'.$moduleDirNameUpper.'_OFF', "<span style='font-weight: bold;'>OFF</span>");
34
+define('CO_'.$moduleDirNameUpper.'_ON', "<span style='font-weight: bold;'>ON</span>");
35
+define('CO_'.$moduleDirNameUpper.'_SERVERPATH', 'Server path to XOOPS root: ');
36
+define('CO_'.$moduleDirNameUpper.'_SERVERUPLOADSTATUS', 'Server uploads status: ');
37
+define('CO_'.$moduleDirNameUpper.'_SPHPINI', "<span style='font-weight: bold;'>Information taken from PHP ini file:</span>");
38
+define('CO_'.$moduleDirNameUpper.'_UPLOADPATHDSC', 'Note. Upload path *MUST* contain the full server path of your upload folder.');
39 39
 
40
-define('CO_' . $moduleDirNameUpper . '_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
-define('CO_' . $moduleDirNameUpper . '_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
40
+define('CO_'.$moduleDirNameUpper.'_PRINT', "<span style='font-weight: bold;'>Print</span>");
41
+define('CO_'.$moduleDirNameUpper.'_PDF', "<span style='font-weight: bold;'>Create PDF</span>");
42 42
 
43 43
 
44
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
45
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED1', "Update failed - couldn't add new fields");
46
-define('CO_' . $moduleDirNameUpper . '_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
47
-define('CO_' . $moduleDirNameUpper . '_ERROR_COLUMN', 'Could not create column in database : %s');
48
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
49
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
50
-define('CO_' . $moduleDirNameUpper . '_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
44
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED0', "Update failed - couldn't rename field '%s'");
45
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED1', "Update failed - couldn't add new fields");
46
+define('CO_'.$moduleDirNameUpper.'_UPGRADEFAILED2', "Update failed - couldn't rename table '%s'");
47
+define('CO_'.$moduleDirNameUpper.'_ERROR_COLUMN', 'Could not create column in database : %s');
48
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_XOOPS', 'This module requires XOOPS %s+ (%s installed)');
49
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_PHP', 'This module requires PHP version %s+ (%s installed)');
50
+define('CO_'.$moduleDirNameUpper.'_ERROR_TAG_REMOVAL', 'Could not remove tags from Tag Module');
51 51
 
52
-define('CO_' . $moduleDirNameUpper . '_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
52
+define('CO_'.$moduleDirNameUpper.'_FOLDERS_DELETED_OK', 'Upload Folders have been deleted');
53 53
 
54 54
 // Error Msgs
55
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
56
-define('CO_' . $moduleDirNameUpper . '_ERROR_BAD_REMOVE', 'Could not delete %s');
57
-define('CO_' . $moduleDirNameUpper . '_ERROR_NO_PLUGIN', 'Could not load plugin');
55
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_DEL_PATH', 'Could not delete %s directory');
56
+define('CO_'.$moduleDirNameUpper.'_ERROR_BAD_REMOVE', 'Could not delete %s');
57
+define('CO_'.$moduleDirNameUpper.'_ERROR_NO_PLUGIN', 'Could not load plugin');
58 58
 
59 59
 
60 60
 //Help
61
-define('CO_' . $moduleDirNameUpper . '_DIRNAME', basename(dirname(dirname(__DIR__))));
62
-define('CO_' . $moduleDirNameUpper . '_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
63
-define('CO_' . $moduleDirNameUpper . '_BACK_2_ADMIN', 'Back to Administration of ');
64
-define('CO_' . $moduleDirNameUpper . '_OVERVIEW', 'Overview');
61
+define('CO_'.$moduleDirNameUpper.'_DIRNAME', basename(dirname(dirname(__DIR__))));
62
+define('CO_'.$moduleDirNameUpper.'_HELP_HEADER', __DIR__.'/help/helpheader.tpl');
63
+define('CO_'.$moduleDirNameUpper.'_BACK_2_ADMIN', 'Back to Administration of ');
64
+define('CO_'.$moduleDirNameUpper.'_OVERVIEW', 'Overview');
65 65
 
66 66
 //define('CO_' . $moduleDirNameUpper . '_HELP_DIR', __DIR__);
67 67
 
68 68
 //help multi-page
69
-define('CO_' . $moduleDirNameUpper . '_DISCLAIMER', 'Disclaimer');
70
-define('CO_' . $moduleDirNameUpper . '_LICENSE', 'License');
71
-define('CO_' . $moduleDirNameUpper . '_SUPPORT', 'Support');
69
+define('CO_'.$moduleDirNameUpper.'_DISCLAIMER', 'Disclaimer');
70
+define('CO_'.$moduleDirNameUpper.'_LICENSE', 'License');
71
+define('CO_'.$moduleDirNameUpper.'_SUPPORT', 'Support');
Please login to merge, or discard this patch.
language/english/modinfo.php 1 patch
Spacing   +113 added lines, -113 removed lines patch added patch discarded remove patch
@@ -11,119 +11,119 @@
 block discarded – undo
11 11
     $current_path = str_replace(strpos($current_path, "\\\\", 2) ? "\\\\" : DIRECTORY_SEPARATOR, '/', $current_path);
12 12
 }
13 13
 $url_arr = explode('/', strstr($current_path, '/modules/'));
14
-include XOOPS_ROOT_PATH . '/modules/' . $url_arr[2] . '/include/vars.php';
14
+include XOOPS_ROOT_PATH.'/modules/'.$url_arr[2].'/include/vars.php';
15 15
 
16
-if (defined($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO')) {
16
+if (defined($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MODINFO')) {
17 17
     return;
18 18
 }
19
-define($GLOBALS['VAR_PREFIXU'] . '_LANG_EN_MODINFO', 1);
20
-
21
-define($GLOBALS['VAR_PREFIXU'] . '_MI_NAME', 'Planet');
22
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DESC', 'Feed Planet For Xoops');
23
-
24
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_INDEX', 'Index');
25
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_ARTICLE', 'Article');
26
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_ARCHIVE', 'Archive');
27
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PAGE_LIST', 'List');
28
-
29
-define($GLOBALS['VAR_PREFIXU'] . '_MI_SUBMIT', 'Submit');
30
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE', 'Articles');
31
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_DESC', '');
32
-define($GLOBALS['VAR_PREFIXU'] . '_MI_CATEGORY', 'Categories');
33
-define($GLOBALS['VAR_PREFIXU'] . '_MI_CATEGORY_DESC', '');
34
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG', 'BLogs');
35
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_DESC', '');
36
-
37
-define($GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET', 'Theme set');
38
-define($GLOBALS['VAR_PREFIXU'] . '_MI_THEMESET_DESC', "Module-wide, select '" . _NONE . "' will use site-wide theme");
39
-
40
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT', 'Time format for display');
41
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_DESC', '');
42
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TIMEFORMAT_CUSTOM', 'Custom');
43
-
44
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY', 'Display summary length on article list');
45
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DISPLAY_SUMMARY_DESC', '0 for full text');
46
-
47
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG', 'Enable debug');
48
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DODEBUG_DESC', '');
49
-
50
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE', 'Enable URL rewrite');
51
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOURLREWRITE_DESC', 'AcceptPathInfo On for Apache2 is required');
52
-
53
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING', 'Enable sibling articles');
54
-define($GLOBALS['VAR_PREFIXU'] . '_MI_DOSIBLING_DESC', '');
55
-
56
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE', 'Articles on one page');
57
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLESPERPAGE_DESC', '');
58
-
59
-define($GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE', 'Lists on one page');
60
-define($GLOBALS['VAR_PREFIXU'] . '_MI_LISTPERPAGE_DESC', '');
61
-
62
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE', 'Blogs for each update');
63
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOGSPERUPDATE_DESC', '');
64
-
65
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE', 'Time for article to expire');
66
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_EXPIRE_DESC', 'In days');
67
-
68
-define($GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT', 'Copyright');
69
-define($GLOBALS['VAR_PREFIXU'] . '_MI_COPYRIGHT_DESC', '');
70
-
71
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PING', 'Pings');
72
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PING_DESC', 'URLs to ping');
73
-
74
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION', 'Option for recieved trackbacks');
75
-define($GLOBALS['VAR_PREFIXU'] . '_MI_TRACKBACK_OPTION_DESC', '');
76
-
77
-define($GLOBALS['VAR_PREFIXU'] . '_MI_MODERATION', 'Moderator to approve');
78
-define($GLOBALS['VAR_PREFIXU'] . '_MI_MEMBER', 'Member atuo-approve');
79
-
80
-define($GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT', 'Right for submitting new blog');
81
-define($GLOBALS['VAR_PREFIXU'] . '_MI_NEWBLOG_SUBMIT_DESC', '');
82
-
83
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE', 'Allow anonymous to rate');
84
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ANONYMOUSRATE_DESC', '');
85
-
86
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON', 'Pseudo cron');
87
-define($GLOBALS['VAR_PREFIXU'] . '_MI_PSEUDOCRON_DESC', 'Use pseudo cron to update blogs');
88
-
89
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_INDEX', 'Index');
90
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_CATEGORY', 'Category');
91
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_BLOG', 'Blog');
92
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_ARTICLE', 'Article');
93
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_BLOCK', 'Block');
94
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_ABOUT', 'About');
95
-
96
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NOTIFY', 'Global');
97
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NOTIFYDSC', 'Global notification options');
98
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_NOTIFY', 'Blog');
99
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_NOTIFYDSC', 'Blog notification options');
100
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_NOTIFY', 'Article');
101
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_NOTIFYDSC', 'Article notification options');
102
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFY', 'Article submission');
103
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYCAP', 'Notify me of any pending blog');
104
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYDSC', 'Receive notification when a new blog is submitted');
105
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_BLOGSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog submitted');
106
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFY', 'New blog');
107
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYCAP', 'Notify of any new blog published');
108
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYDSC', 'Receive notification when a new blog is published');
109
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_NEWBLOG_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog published');
110
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFY', 'Article monitor');
111
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of all actions on my articles');
112
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken over my articles');
113
-define($GLOBALS['VAR_PREFIXU'] . '_MI_GLOBAL_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New action');
114
-
115
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFY', 'Blog approved');
116
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYCAP', 'Notify me of approval of this blog');
117
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYDSC', 'Receive notification when the blog is approved');
118
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGAPPROVE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog approved');
119
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFY', 'Blog updated');
120
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYCAP', 'Notify me of update of this blog');
121
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYDSC', 'Receive notification when the blog is upated');
122
-define($GLOBALS['VAR_PREFIXU'] . '_MI_BLOG_BLOGUPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog updated');
123
-
124
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFY', 'Article monitor');
125
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of any action taken on this article');
126
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken on this article');
127
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ARTICLE_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New article published');
128
-
129
-define($GLOBALS['VAR_PREFIXU'] . '_MI_ADMENU_HOME', 'Home');
19
+define($GLOBALS['VAR_PREFIXU'].'_LANG_EN_MODINFO', 1);
20
+
21
+define($GLOBALS['VAR_PREFIXU'].'_MI_NAME', 'Planet');
22
+define($GLOBALS['VAR_PREFIXU'].'_MI_DESC', 'Feed Planet For Xoops');
23
+
24
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_INDEX', 'Index');
25
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_ARTICLE', 'Article');
26
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_ARCHIVE', 'Archive');
27
+define($GLOBALS['VAR_PREFIXU'].'_MI_PAGE_LIST', 'List');
28
+
29
+define($GLOBALS['VAR_PREFIXU'].'_MI_SUBMIT', 'Submit');
30
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE', 'Articles');
31
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_DESC', '');
32
+define($GLOBALS['VAR_PREFIXU'].'_MI_CATEGORY', 'Categories');
33
+define($GLOBALS['VAR_PREFIXU'].'_MI_CATEGORY_DESC', '');
34
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG', 'BLogs');
35
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_DESC', '');
36
+
37
+define($GLOBALS['VAR_PREFIXU'].'_MI_THEMESET', 'Theme set');
38
+define($GLOBALS['VAR_PREFIXU'].'_MI_THEMESET_DESC', "Module-wide, select '"._NONE."' will use site-wide theme");
39
+
40
+define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT', 'Time format for display');
41
+define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_DESC', '');
42
+define($GLOBALS['VAR_PREFIXU'].'_MI_TIMEFORMAT_CUSTOM', 'Custom');
43
+
44
+define($GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY', 'Display summary length on article list');
45
+define($GLOBALS['VAR_PREFIXU'].'_MI_DISPLAY_SUMMARY_DESC', '0 for full text');
46
+
47
+define($GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG', 'Enable debug');
48
+define($GLOBALS['VAR_PREFIXU'].'_MI_DODEBUG_DESC', '');
49
+
50
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE', 'Enable URL rewrite');
51
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOURLREWRITE_DESC', 'AcceptPathInfo On for Apache2 is required');
52
+
53
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING', 'Enable sibling articles');
54
+define($GLOBALS['VAR_PREFIXU'].'_MI_DOSIBLING_DESC', '');
55
+
56
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE', 'Articles on one page');
57
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLESPERPAGE_DESC', '');
58
+
59
+define($GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE', 'Lists on one page');
60
+define($GLOBALS['VAR_PREFIXU'].'_MI_LISTPERPAGE_DESC', '');
61
+
62
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE', 'Blogs for each update');
63
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOGSPERUPDATE_DESC', '');
64
+
65
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE', 'Time for article to expire');
66
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_EXPIRE_DESC', 'In days');
67
+
68
+define($GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT', 'Copyright');
69
+define($GLOBALS['VAR_PREFIXU'].'_MI_COPYRIGHT_DESC', '');
70
+
71
+define($GLOBALS['VAR_PREFIXU'].'_MI_PING', 'Pings');
72
+define($GLOBALS['VAR_PREFIXU'].'_MI_PING_DESC', 'URLs to ping');
73
+
74
+define($GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION', 'Option for recieved trackbacks');
75
+define($GLOBALS['VAR_PREFIXU'].'_MI_TRACKBACK_OPTION_DESC', '');
76
+
77
+define($GLOBALS['VAR_PREFIXU'].'_MI_MODERATION', 'Moderator to approve');
78
+define($GLOBALS['VAR_PREFIXU'].'_MI_MEMBER', 'Member atuo-approve');
79
+
80
+define($GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT', 'Right for submitting new blog');
81
+define($GLOBALS['VAR_PREFIXU'].'_MI_NEWBLOG_SUBMIT_DESC', '');
82
+
83
+define($GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE', 'Allow anonymous to rate');
84
+define($GLOBALS['VAR_PREFIXU'].'_MI_ANONYMOUSRATE_DESC', '');
85
+
86
+define($GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON', 'Pseudo cron');
87
+define($GLOBALS['VAR_PREFIXU'].'_MI_PSEUDOCRON_DESC', 'Use pseudo cron to update blogs');
88
+
89
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_INDEX', 'Index');
90
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_CATEGORY', 'Category');
91
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_BLOG', 'Blog');
92
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_ARTICLE', 'Article');
93
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_BLOCK', 'Block');
94
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_ABOUT', 'About');
95
+
96
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NOTIFY', 'Global');
97
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NOTIFYDSC', 'Global notification options');
98
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_NOTIFY', 'Blog');
99
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_NOTIFYDSC', 'Blog notification options');
100
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_NOTIFY', 'Article');
101
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_NOTIFYDSC', 'Article notification options');
102
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFY', 'Article submission');
103
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYCAP', 'Notify me of any pending blog');
104
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYDSC', 'Receive notification when a new blog is submitted');
105
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_BLOGSUBMIT_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog submitted');
106
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFY', 'New blog');
107
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYCAP', 'Notify of any new blog published');
108
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYDSC', 'Receive notification when a new blog is published');
109
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_NEWBLOG_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New blog published');
110
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFY', 'Article monitor');
111
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of all actions on my articles');
112
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken over my articles');
113
+define($GLOBALS['VAR_PREFIXU'].'_MI_GLOBAL_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New action');
114
+
115
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFY', 'Blog approved');
116
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYCAP', 'Notify me of approval of this blog');
117
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYDSC', 'Receive notification when the blog is approved');
118
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGAPPROVE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog approved');
119
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFY', 'Blog updated');
120
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYCAP', 'Notify me of update of this blog');
121
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYDSC', 'Receive notification when the blog is upated');
122
+define($GLOBALS['VAR_PREFIXU'].'_MI_BLOG_BLOGUPDATE_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : blog updated');
123
+
124
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFY', 'Article monitor');
125
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYCAP', 'Notify me of any action taken on this article');
126
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYDSC', 'Receive notification when an action is taken on this article');
127
+define($GLOBALS['VAR_PREFIXU'].'_MI_ARTICLE_ARTICLEMONITOR_NOTIFYSBJ', '[{X_SITENAME}] {X_MODULE} auto-notify : New article published');
128
+
129
+define($GLOBALS['VAR_PREFIXU'].'_MI_ADMENU_HOME', 'Home');
Please login to merge, or discard this patch.
class/blog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  */
31 31
 
32 32
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
33
-require_once __DIR__ . '/../include/vars.php';
33
+require_once __DIR__.'/../include/vars.php';
34 34
 //mod_loadFunctions('', $GLOBALS['moddirname']);
35 35
 
36 36
 /**
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
         {
134 134
             $ave = 3;
135 135
             if ($this->getVar('blog_rates')) {
136
-                $ave = number_format($this->getVar('blog_rating') / $this->getVar('blog_rates'), $decimals);
136
+                $ave = number_format($this->getVar('blog_rating')/$this->getVar('blog_rates'), $decimals);
137 137
             }
138 138
 
139 139
             return $ave;
Please login to merge, or discard this patch.
class/xml.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
29
-require_once __DIR__ . '/../include/vars.php';
29
+require_once __DIR__.'/../include/vars.php';
30 30
 //mod_loadFunctions('', $GLOBALS['moddirname']);
31 31
 
32 32
 /*** GENERAL USAGE *********************************************************
@@ -64,14 +64,14 @@  discard block
 block discarded – undo
64 64
  */
65 65
 
66 66
 // your local timezone, set to "" to disable or for GMT
67
-$server_TZ = abs((int)($GLOBALS['xoopsConfig']['server_TZ'] * 3600.0));
68
-$prefix    = ($GLOBALS['xoopsConfig']['server_TZ'] < 0) ? '-' : '+';
69
-$TIME_ZONE = $prefix . date('H:i', $server_TZ);
67
+$server_TZ = abs((int) ($GLOBALS['xoopsConfig']['server_TZ']*3600.0));
68
+$prefix    = ($GLOBALS['xoopsConfig']['server_TZ']<0) ? '-' : '+';
69
+$TIME_ZONE = $prefix.date('H:i', $server_TZ);
70 70
 define('TIME_ZONE', $TIME_ZONE);
71 71
 // Version string.
72 72
 define('FEEDCREATOR_VERSION', 'ARTICLE @ XOOPS powered by FeedCreator');
73 73
 
74
-require_once __DIR__ . '/feedcreator.class.php';
74
+require_once __DIR__.'/feedcreator.class.php';
75 75
 
76 76
 /**
77 77
  * Description
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
          */
96 96
         public function __construct($version)
97 97
         {
98
-            $this->filename = XOOPS_CACHE_PATH . '/feed.xml';
98
+            $this->filename = XOOPS_CACHE_PATH.'/feed.xml';
99 99
             $this->version  = $version;
100 100
         }
101 101
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 foreach (array_keys($val) as $key) {
123 123
                     $val[$key] = $this->convert_encoding($val[$key]);
124 124
                 }
125
-            } else {
125
+            }else {
126 126
                 $val = XoopsLocal::convert_encoding($val, $this->encoding, _CHARSET);
127 127
             }
128 128
 
Please login to merge, or discard this patch.
class/article.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
  */
31 31
 
32 32
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
33
-require_once __DIR__ . '/../include/vars.php';
33
+require_once __DIR__.'/../include/vars.php';
34 34
 //mod_loadFunctions('', $GLOBALS['moddirname']);
35 35
 
36 36
 /**
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         public function &getSummary($length = 0)
120 120
         {
121 121
             $content = $this->getVar('art_content');
122
-            $summary =& PlanetUtility::planetHtml2text($content);
122
+            $summary = & PlanetUtility::planetHtml2text($content);
123 123
             if (empty($length)) {
124 124
                 $length = $GLOBALS['xoopsModuleConfig']['display_summary'];
125 125
             }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         {
141 141
             $ave = 3;
142 142
             if ($this->getVar('art_rates')) {
143
-                $ave = number_format($this->getVar('art_rating') / $this->getVar('art_rates'), $decimals);
143
+                $ave = number_format($this->getVar('art_rating')/$this->getVar('art_rates'), $decimals);
144 144
             }
145 145
 
146 146
             return $ave;
Please login to merge, or discard this patch.
class/Utility.php 2 patches
Indentation   +522 added lines, -522 removed lines patch added patch discarded remove patch
@@ -34,535 +34,535 @@
 block discarded – undo
34 34
 
35 35
 $current_path = __FILE__;
36 36
 if (DIRECTORY_SEPARATOR !== '/') {
37
-    $current_path = str_replace(strpos($current_path, '\\\\', 2) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $current_path);
37
+	$current_path = str_replace(strpos($current_path, '\\\\', 2) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $current_path);
38 38
 }
39 39
 $url_arr               = explode('/', strstr($current_path, '/modules/'));
40 40
 $GLOBALS['moddirname'] = $url_arr[2];
41 41
 
42 42
 if (!defined('planet_FUNCTIONS')):
43
-    define('planet_FUNCTIONS', 1);
44
-
45
-    require XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/vars.php';
46
-    require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
47
-    require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.php';
48
-
49
-    /**
50
-     * Class Utility
51
-     */
52
-    class Utility
53
-    {
54
-
55
-        /**
56
-         * Function to display messages
57
-         *
58
-         * @var mixed $messages
59
-         * @return bool
60
-         */
61
-        public static function planetDisplayMessage($message)
62
-        {
63
-            return mod_message($message);
64
-        }
65
-
66
-        /**
67
-         * Function to parse arguments for a page according to $_SERVER['REQUEST_URI']
68
-         *
69
-         * @var array $args_numeric array of numeric variable values
70
-         * @var array $args         array of indexed variables: name and value
71
-         * @var array $args_string  array of string variable values
72
-         *
73
-         * @return bool true on args parsed
74
-         */
75
-
76
-        /* known issues:
43
+	define('planet_FUNCTIONS', 1);
44
+
45
+	require XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/vars.php';
46
+	require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
47
+	require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.php';
48
+
49
+	/**
50
+	 * Class Utility
51
+	 */
52
+	class Utility
53
+	{
54
+
55
+		/**
56
+		 * Function to display messages
57
+		 *
58
+		 * @var mixed $messages
59
+		 * @return bool
60
+		 */
61
+		public static function planetDisplayMessage($message)
62
+		{
63
+			return mod_message($message);
64
+		}
65
+
66
+		/**
67
+		 * Function to parse arguments for a page according to $_SERVER['REQUEST_URI']
68
+		 *
69
+		 * @var array $args_numeric array of numeric variable values
70
+		 * @var array $args         array of indexed variables: name and value
71
+		 * @var array $args_string  array of string variable values
72
+		 *
73
+		 * @return bool true on args parsed
74
+		 */
75
+
76
+		/* known issues:
77 77
          * - "/" in a string
78 78
          * - "&" in a string
79 79
         */
80
-        public static function planetParseArguments(&$args_numeric, &$args, &$args_string)
81
-        {
82
-            $args_abb     = [
83
-                'a' => 'article',
84
-                'b' => 'blog',
85
-                'c' => 'category',
86
-                'l' => 'list',
87
-                'o' => 'sort',
88
-                's' => 'start',
89
-                'u' => 'uid'
90
-            ];
91
-            $args         = [];
92
-            $args_numeric = [];
93
-            $args_string  = [];
94
-            if (preg_match("/[^\?]*\.php[\/|\?]([^\?]*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
95
-                $vars = preg_split("/[\/|&]/", $matches[1]);
96
-                $vars = array_map('trim', $vars);
97
-                if (count($vars) > 0) {
98
-                    foreach ($vars as $var) {
99
-                        if (is_numeric($var)) {
100
-                            $args_numeric[] = $var;
101
-                        } elseif (false === strpos($var, '=')) {
102
-                            if (is_numeric(substr($var, 1))) {
103
-                                $args[$args_abb[strtolower($var{0})]] = (int)substr($var, 1);
104
-                            } else {
105
-                                $args_string[] = urldecode($var);
106
-                            }
107
-                        } else {
108
-                            parse_str($var, $args);
109
-                        }
110
-                    }
111
-                }
112
-            }
113
-
114
-            return (0 == count($args) + count($args_numeric) + count($args_string)) ? null : true;
115
-        }
116
-
117
-        /**
118
-         * Function to parse class prefix
119
-         *
120
-         * @var string $class_string string to be parsed
121
-         * @var mixed  $pattern
122
-         * @var mixed  $replacement
123
-         *
124
-         * @return bool true on success
125
-         */
126
-        public static function planetParseClass($class_string, $pattern = '', $replacement = '')
127
-        {
128
-            if (empty($class_string)) {
129
-                return;
130
-            }
131
-            $patterns     = ["/\[CLASS_PREFIX\]/"];
132
-            $replacements = [ucfirst(strtolower($GLOBALS['moddirname']))];
133
-            if (!empty($pattern) && !is_array($pattern) && !is_array($replacement)) {
134
-                $pattern     = [$pattern];
135
-                $replacement = [$replacement];
136
-            }
137
-            if (is_array($pattern) && count($pattern) > 0) {
138
-                $ii = 0;
139
-                foreach ($pattern as $pat) {
140
-                    if (!in_array($pat, $patterns)) {
141
-                        $patterns[]     = $pat;
142
-                        $replacements[] = isset($replacement[$ii]) ? $replacement[$ii] : '';
143
-                    }
144
-                    ++$ii;
145
-                }
146
-            }
147
-            $class_string = preg_replace($patterns, $replacements, $class_string);
148
-            eval($class_string);
149
-
150
-            return true;
151
-        }
152
-
153
-        /**
154
-         * Function to parse function prefix
155
-         *
156
-         * @var string $function_string string to be parsed
157
-         * @var mixed  $pattern
158
-         * @var mixed  $replacement
159
-         *
160
-         * @return bool true on success
161
-         */
162
-        public static function planetParseFunction($function_string, $pattern = '', $replacement = '')
163
-        {
164
-            if (empty($function_string)) {
165
-                return;
166
-            }
167
-            $patterns     = ["/\[DIRNAME\]/", "/\[VAR_PREFIX\]/"];
168
-            $replacements = [$GLOBALS['moddirname'], $GLOBALS['VAR_PREFIX']];
169
-            if (!empty($pattern) && !is_array($pattern) && !is_array($replacement)) {
170
-                $pattern     = [$pattern];
171
-                $replacement = [$replacement];
172
-            }
173
-            if (is_array($pattern) && count($pattern) > 0) {
174
-                $ii = 0;
175
-                foreach ($pattern as $pat) {
176
-                    if (!in_array($pat, $patterns)) {
177
-                        $patterns[]     = $pat;
178
-                        $replacements[] = isset($replacement[$ii]) ? $replacement[$ii] : '';
179
-                    }
180
-                    ++$ii;
181
-                }
182
-            }
183
-            $function_string = preg_replace($patterns, $replacements, $function_string);
184
-            if (is_array($function_string)) {
185
-                eval($function_string);
186
-            }
187
-
188
-            return true;
189
-        }
190
-
191
-        /**
192
-         * Function to convert UNIX time to formatted time string
193
-         * @param        $time
194
-         * @param string $format
195
-         * @return string
196
-         */
197
-        public static function planetFormatTimestamp($time, $format = '')
198
-        {
199
-            if (empty($time)) {
200
-                return '';
201
-            }
202
-
203
-            return formatTimestamp($time, $format);
204
-        }
205
-
206
-        /**
207
-         * Function to a list of user names associated with their user IDs
208
-         * @param int  $userid
209
-         * @param int  $usereal
210
-         * @param bool $linked
211
-         * @return array
212
-         */
213
-        public static function &planetGetUnameFromId($userid, $usereal = 0, $linked = false)
214
-        {
215
-            if (!is_array($userid)) {
216
-                $userid = [$userid];
217
-            }
218
-            $users =& mod_getUnameFromIds($userid, $usereal, $linked);
219
-
220
-            return $users;
221
-        }
222
-
223
-        /**
224
-         * Function to parse links, links are delimited by link break, URL and title of a link are delimited by space
225
-         *
226
-         * @var string $text raw content
227
-         *
228
-         * @return array associative array of link url and title
229
-         */
230
-        public static function &planetParseLinks($text)
231
-        {
232
-            $myts       = \MyTextSanitizer::getInstance();
233
-            $link_array = preg_split("/(\r\n|\r|\n)( *)/", $text);
234
-            $links      = [];
235
-            if (count($link_array) > 0) {
236
-                foreach ($link_array as $link) {
237
-                    @list($url, $title) = array_map('trim', preg_split('/ /', $link, 2));
238
-                    if (empty($url)) {
239
-                        continue;
240
-                    }
241
-                    //if(empty($title)) $title = $url;
242
-                    $links[] = ['url' => $url, 'title' => $myts->htmlSpecialChars($title)];
243
-                }
244
-            }
245
-
246
-            return $links;
247
-        }
248
-
249
-        /**
250
-         * @param $pagename
251
-         * @return string
252
-         */
253
-        public static function planetGetTemplate($pagename)
254
-        {
255
-            return $GLOBALS['VAR_PREFIX'] . '_' . $pagename . '.tpl';
256
-        }
257
-
258
-        /**
259
-         * @param int $currentoption
260
-         */
261
-        //public static function planet_adminmenu($currentoption = -1)
262
-        //{
263
-        //    loadModuleAdminMenu($currentoption, '');
264
-        //
265
-        //    return;
266
-        //}
267
-
268
-        /**
269
-         * Function to send a trackback
270
-         *
271
-         * @param $article
272
-         * @param $comment
273
-         * @return bool
274
-         */
275
-        public static function planetSendTrackback(&$article, &$comment)
276
-        {
277
-            $blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
278
-            $blog_obj    = $blogHandler->get($article->getVar('blog_id'));
279
-            if (!$pattern = $blog_obj->getVar('blog_trackback')) {
280
-                return false;
281
-            }
282
-
283
-            @list($pat, $rep) = array_map('trim', preg_split("#[\s]+#", $pattern));
284
-            $trackback_url = preg_replace('#' . $pat . '#', $rep, $article_obj->getVar('art_link'));
285
-
286
-            return static::planetTrackback($trackback_url, $article);
287
-        }
288
-
289
-        /**
290
-         * @param $trackback_url
291
-         * @param $article
292
-         * @return bool
293
-         */
294
-        public static function planetTrackback($trackback_url, $article)
295
-        {
296
-            global $myts, $xoopsConfig, $xoopsModule;
297
-            /** @var Planet\Helper $helper */
298
-            $helper = Planet\Helper::getInstance();
299
-
300
-            $title         = $article->getVar('art_title');
301
-            $excerpt       = $article->getVar('art_content');
302
-            $blog_name     = $xoopsConfig['sitename'] . '-' . $xoopsModule->getVar('name');
303
-            $title         = xoops_utf8_encode($title);
304
-            $excerpt       = xoops_utf8_encode($excerpt);
305
-            $blog_name     = xoops_utf8_encode($blog_name);
306
-            $charset       = 'utf-8';
307
-            $title1        = urlencode($title);
308
-            $excerpt1      = urlencode($excerpt);
309
-            $name1         = urlencode($blog_name);
310
-            $url           = urlencode(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article->getVar('art_id'));
311
-            $query_string  = "title=$title1&url=$url&blog_name=$name1&excerpt=$excerpt1&charset=$charset";
312
-            $trackback_url = parse_url($trackback_url);
313
-
314
-            $http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?' . $trackback_url['query'] : '') . " HTTP/1.0\r\n";
315
-            $http_request .= 'Host: ' . $trackback_url['host'] . "\r\n";
316
-            $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . $charset . "\r\n";
317
-            $http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
318
-            $http_request .= 'User-Agent: XOOPS Blogs/' . XOOPS_VERSION;
319
-            $http_request .= "\r\n\r\n";
320
-            $http_request .= $query_string;
321
-            if ('' == $trackback_url['port']) {
322
-                $trackback_url['port'] = 80;
323
-            }
324
-            $fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4);
325
-            @fwrite($fs, $http_request);
326
-            if ($helper->getConfig('do_debug')) {
327
-                $debug_file = XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '_trackback.log';
328
-                $fr         = "\n*****\nRequest:\n\n$http_request\n\nResponse:\n\n";
329
-                $fr         .= "CHARSET:$charset\n";
330
-                $fr         .= "NAME:$blog_name\n";
331
-                $fr         .= 'TITLE:' . $title . "\n";
332
-                $fr         .= "EXCERPT:$excerpt\n\n";
333
-                while (!@feof($fs)) {
334
-                    $fr .= @fgets($fs, 4096);
335
-                }
336
-                $fr .= "\n\n";
337
-
338
-                if ($fp = fopen($debug_file, 'a')) {
339
-                    fwrite($fp, $fr);
340
-                    fclose($fp);
341
-                } else {
342
-                }
343
-            }
344
-            @fclose($fs);
345
-
346
-            return true;
347
-        }
348
-
349
-        /**
350
-         * Function to ping servers
351
-         * @param $server
352
-         * @param $id
353
-         */
354
-        public static function planetGetPing($server, $id)
355
-        {
356
-            if (is_array($server)) {
357
-                foreach ($server as $serv) {
358
-                    PlanetUtility::planetGetPing($serv, $id);
359
-                }
360
-            }
361
-            require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/class-IXR.php';
362
-
363
-            // using a timeout of 3 seconds should be enough to cover slow servers
364
-            $client            = new IXR_Client($server, false);
365
-            $client->timeout   = 3;
366
-            $client->useragent .= ' -- XOOPS Article/' . XOOPS_VERSION;
367
-
368
-            // when set to true, this outputs debug messages by itself
369
-            $client->debug = false;
370
-
371
-            $blogname = xoops_utf8_encode($GLOBALS['xoopsModule']->getVar('name'));
372
-            $home     = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/';
373
-            $rss2_url = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php' . URL_DELIMITER . 'rss2.0/' . $id;
374
-
375
-            if (!$client->query('weblogUpdates.extendedPing', $blogname, $home, $rss2_url)) { // then try a normal ping
376
-                $client->query('weblogUpdates.ping', $blogname, $home);
377
-            }
378
-        }
379
-
380
-        /**
381
-         * Function to respond to a trackback
382
-         * @param int    $error
383
-         * @param string $error_message
384
-         */
385
-        public static function planetRespondToTrackback($error = 0, $error_message = '')
386
-        {
387
-            $charset       = 'utf-8';
388
-            $error_message = xoops_utf8_encode($error_message);
389
-            header('Content-Type: text/xml; charset="' . $charset . '"');
390
-            if ($error) {
391
-                echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
392
-                echo "<response>\n";
393
-                echo "<error>1</error>\n";
394
-                echo "<message>$error_message</message>\n";
395
-                echo '</response>';
396
-                die();
397
-            } else {
398
-                echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
399
-                echo "<response>\n";
400
-                echo "<error>0</error>\n";
401
-                echo '</response>';
402
-            }
403
-        }
404
-
405
-        /**
406
-         * Function to set a cookie with module-specified name
407
-         *
408
-         * using customized serialization method
409
-         * @param        $name
410
-         * @param string $string
411
-         * @param int    $expire
412
-         */
413
-        public static function planetSetCookie($name, $string = '', $expire = 0)
414
-        {
415
-            if (is_array($string)) {
416
-                $value = [];
417
-                foreach ($string as $key => $val) {
418
-                    $value[] = $key . '|' . $val;
419
-                }
420
-                $string = implode(',', $value);
421
-            }
422
-            setcookie($GLOBALS['VAR_PREFIX'] . $name, $string, (int)$expire, '/');
423
-        }
424
-
425
-        /**
426
-         * @param      $name
427
-         * @param bool $isArray
428
-         * @return array|null
429
-         */
430
-        public static function planetGetCookie($name, $isArray = false)
431
-        {
432
-            $value = isset($_COOKIE[$GLOBALS['VAR_PREFIX'] . $name]) ? $_COOKIE[$GLOBALS['VAR_PREFIX'] . $name] : null;
433
-            if ($isArray) {
434
-                $_value = $value ? explode(',', $value) : [];
435
-                $value  = [];
436
-                if (count($_value) > 0) {
437
-                    foreach ($_value as $string) {
438
-                        $key         = substr($string, 0, strpos($string, '|'));
439
-                        $val         = substr($string, strpos($string, '|') + 1);
440
-                        $value[$key] = $val;
441
-                    }
442
-                }
443
-                unset($_value);
444
-            }
445
-
446
-            return $value;
447
-        }
448
-
449
-        /**
450
-         * Function to filter text
451
-         *
452
-         * @param $document
453
-         * @return string filtered text
454
-         */
455
-        public static function &planetHtml2text(&$document)
456
-        {
457
-            $document = strip_tags($document);
458
-
459
-            return $document;
460
-        }
461
-
462
-        // Adapted from PMA_getIp() [phpmyadmin project]
463
-
464
-        /**
465
-         * @param bool $asString
466
-         * @return mixed
467
-         */
468
-        public static function planetGetIP($asString = false)
469
-        {
470
-            return mod_getIP($asString);
471
-        }
472
-
473
-        /**
474
-         * @param $url
475
-         * @return bool|mixed|string
476
-         */
477
-        public static function planetGetRemoteContent($url)
478
-        {
479
-            if ($data = static::planetFetchSnoopy($url)) {
480
-                return $data;
481
-            }
482
-            if ($data = static::planetFetchCURL($url)) {
483
-                return $data;
484
-            }
485
-            if ($data = static::planetFetchFopen($url)) {
486
-                return $data;
487
-            }
488
-
489
-            return false;
490
-        }
491
-
492
-        /**
493
-         * @param $url
494
-         * @return string
495
-         */
496
-        public static function planetFetchSnoopy($url)
497
-        {
498
-            require_once XOOPS_ROOT_PATH . '/class/snoopy.php';
499
-            $snoopy = new Snoopy;
500
-            $data   = '';
501
-            if (@$snoopy->fetch($url)) {
502
-                $data = is_array($snoopy->results) ? implode("\n", $snoopy->results) : $snoopy->results;
503
-            }
504
-
505
-            return $data;
506
-        }
507
-
508
-        /**
509
-         * @param $url
510
-         * @return bool|mixed
511
-         */
512
-        public static function planetFetchCURL($url)
513
-        {
514
-            if (!function_exists('curl_init')) {
515
-                return false;
516
-            }
517
-            $ch = curl_init();    // initialize curl handle
518
-            curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
519
-            curl_setopt($ch, CURLOPT_FAILONERROR, 1);
520
-            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
521
-            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable
522
-            curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 31s
523
-            $data = curl_exec($ch); // run the whole process
524
-            curl_close($ch);
525
-
526
-            return $data;
527
-        }
528
-
529
-        /**
530
-         * @param $url
531
-         * @return bool|string
532
-         */
533
-        public static function planetFetchFopen($url)
534
-        {
535
-            if (!$fp = @fopen($url, 'r')) {
536
-                return false;
537
-            }
538
-            $data = '';
539
-            while (!feof($fp)) {
540
-                $data .= fgets($fp, 1024);
541
-            }
542
-            fclose($fp);
543
-
544
-            return $data;
545
-        }
546
-
547
-        /**
548
-         * @param     $haystack
549
-         * @param     $needle
550
-         * @param int $offset
551
-         * @return bool|int
552
-         */
553
-        public static function planetStrrPos($haystack, $needle, $offset = 0)
554
-        {
555
-            if (5 == substr(PHP_VERSION, 0, 1)) {
556
-                return strrpos($haystack, $needle, $offset);
557
-            }
558
-            $index = strpos(strrev($haystack), strrev($needle));
559
-            if (false === $index) {
560
-                return false;
561
-            }
562
-            $index = strlen($haystack) - strlen($needle) - $index;
563
-
564
-            return $index;
565
-        }
566
-    }
80
+		public static function planetParseArguments(&$args_numeric, &$args, &$args_string)
81
+		{
82
+			$args_abb     = [
83
+				'a' => 'article',
84
+				'b' => 'blog',
85
+				'c' => 'category',
86
+				'l' => 'list',
87
+				'o' => 'sort',
88
+				's' => 'start',
89
+				'u' => 'uid'
90
+			];
91
+			$args         = [];
92
+			$args_numeric = [];
93
+			$args_string  = [];
94
+			if (preg_match("/[^\?]*\.php[\/|\?]([^\?]*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
95
+				$vars = preg_split("/[\/|&]/", $matches[1]);
96
+				$vars = array_map('trim', $vars);
97
+				if (count($vars) > 0) {
98
+					foreach ($vars as $var) {
99
+						if (is_numeric($var)) {
100
+							$args_numeric[] = $var;
101
+						} elseif (false === strpos($var, '=')) {
102
+							if (is_numeric(substr($var, 1))) {
103
+								$args[$args_abb[strtolower($var{0})]] = (int)substr($var, 1);
104
+							} else {
105
+								$args_string[] = urldecode($var);
106
+							}
107
+						} else {
108
+							parse_str($var, $args);
109
+						}
110
+					}
111
+				}
112
+			}
113
+
114
+			return (0 == count($args) + count($args_numeric) + count($args_string)) ? null : true;
115
+		}
116
+
117
+		/**
118
+		 * Function to parse class prefix
119
+		 *
120
+		 * @var string $class_string string to be parsed
121
+		 * @var mixed  $pattern
122
+		 * @var mixed  $replacement
123
+		 *
124
+		 * @return bool true on success
125
+		 */
126
+		public static function planetParseClass($class_string, $pattern = '', $replacement = '')
127
+		{
128
+			if (empty($class_string)) {
129
+				return;
130
+			}
131
+			$patterns     = ["/\[CLASS_PREFIX\]/"];
132
+			$replacements = [ucfirst(strtolower($GLOBALS['moddirname']))];
133
+			if (!empty($pattern) && !is_array($pattern) && !is_array($replacement)) {
134
+				$pattern     = [$pattern];
135
+				$replacement = [$replacement];
136
+			}
137
+			if (is_array($pattern) && count($pattern) > 0) {
138
+				$ii = 0;
139
+				foreach ($pattern as $pat) {
140
+					if (!in_array($pat, $patterns)) {
141
+						$patterns[]     = $pat;
142
+						$replacements[] = isset($replacement[$ii]) ? $replacement[$ii] : '';
143
+					}
144
+					++$ii;
145
+				}
146
+			}
147
+			$class_string = preg_replace($patterns, $replacements, $class_string);
148
+			eval($class_string);
149
+
150
+			return true;
151
+		}
152
+
153
+		/**
154
+		 * Function to parse function prefix
155
+		 *
156
+		 * @var string $function_string string to be parsed
157
+		 * @var mixed  $pattern
158
+		 * @var mixed  $replacement
159
+		 *
160
+		 * @return bool true on success
161
+		 */
162
+		public static function planetParseFunction($function_string, $pattern = '', $replacement = '')
163
+		{
164
+			if (empty($function_string)) {
165
+				return;
166
+			}
167
+			$patterns     = ["/\[DIRNAME\]/", "/\[VAR_PREFIX\]/"];
168
+			$replacements = [$GLOBALS['moddirname'], $GLOBALS['VAR_PREFIX']];
169
+			if (!empty($pattern) && !is_array($pattern) && !is_array($replacement)) {
170
+				$pattern     = [$pattern];
171
+				$replacement = [$replacement];
172
+			}
173
+			if (is_array($pattern) && count($pattern) > 0) {
174
+				$ii = 0;
175
+				foreach ($pattern as $pat) {
176
+					if (!in_array($pat, $patterns)) {
177
+						$patterns[]     = $pat;
178
+						$replacements[] = isset($replacement[$ii]) ? $replacement[$ii] : '';
179
+					}
180
+					++$ii;
181
+				}
182
+			}
183
+			$function_string = preg_replace($patterns, $replacements, $function_string);
184
+			if (is_array($function_string)) {
185
+				eval($function_string);
186
+			}
187
+
188
+			return true;
189
+		}
190
+
191
+		/**
192
+		 * Function to convert UNIX time to formatted time string
193
+		 * @param        $time
194
+		 * @param string $format
195
+		 * @return string
196
+		 */
197
+		public static function planetFormatTimestamp($time, $format = '')
198
+		{
199
+			if (empty($time)) {
200
+				return '';
201
+			}
202
+
203
+			return formatTimestamp($time, $format);
204
+		}
205
+
206
+		/**
207
+		 * Function to a list of user names associated with their user IDs
208
+		 * @param int  $userid
209
+		 * @param int  $usereal
210
+		 * @param bool $linked
211
+		 * @return array
212
+		 */
213
+		public static function &planetGetUnameFromId($userid, $usereal = 0, $linked = false)
214
+		{
215
+			if (!is_array($userid)) {
216
+				$userid = [$userid];
217
+			}
218
+			$users =& mod_getUnameFromIds($userid, $usereal, $linked);
219
+
220
+			return $users;
221
+		}
222
+
223
+		/**
224
+		 * Function to parse links, links are delimited by link break, URL and title of a link are delimited by space
225
+		 *
226
+		 * @var string $text raw content
227
+		 *
228
+		 * @return array associative array of link url and title
229
+		 */
230
+		public static function &planetParseLinks($text)
231
+		{
232
+			$myts       = \MyTextSanitizer::getInstance();
233
+			$link_array = preg_split("/(\r\n|\r|\n)( *)/", $text);
234
+			$links      = [];
235
+			if (count($link_array) > 0) {
236
+				foreach ($link_array as $link) {
237
+					@list($url, $title) = array_map('trim', preg_split('/ /', $link, 2));
238
+					if (empty($url)) {
239
+						continue;
240
+					}
241
+					//if(empty($title)) $title = $url;
242
+					$links[] = ['url' => $url, 'title' => $myts->htmlSpecialChars($title)];
243
+				}
244
+			}
245
+
246
+			return $links;
247
+		}
248
+
249
+		/**
250
+		 * @param $pagename
251
+		 * @return string
252
+		 */
253
+		public static function planetGetTemplate($pagename)
254
+		{
255
+			return $GLOBALS['VAR_PREFIX'] . '_' . $pagename . '.tpl';
256
+		}
257
+
258
+		/**
259
+		 * @param int $currentoption
260
+		 */
261
+		//public static function planet_adminmenu($currentoption = -1)
262
+		//{
263
+		//    loadModuleAdminMenu($currentoption, '');
264
+		//
265
+		//    return;
266
+		//}
267
+
268
+		/**
269
+		 * Function to send a trackback
270
+		 *
271
+		 * @param $article
272
+		 * @param $comment
273
+		 * @return bool
274
+		 */
275
+		public static function planetSendTrackback(&$article, &$comment)
276
+		{
277
+			$blogHandler = xoops_getModuleHandler('blog', $GLOBALS['moddirname']);
278
+			$blog_obj    = $blogHandler->get($article->getVar('blog_id'));
279
+			if (!$pattern = $blog_obj->getVar('blog_trackback')) {
280
+				return false;
281
+			}
282
+
283
+			@list($pat, $rep) = array_map('trim', preg_split("#[\s]+#", $pattern));
284
+			$trackback_url = preg_replace('#' . $pat . '#', $rep, $article_obj->getVar('art_link'));
285
+
286
+			return static::planetTrackback($trackback_url, $article);
287
+		}
288
+
289
+		/**
290
+		 * @param $trackback_url
291
+		 * @param $article
292
+		 * @return bool
293
+		 */
294
+		public static function planetTrackback($trackback_url, $article)
295
+		{
296
+			global $myts, $xoopsConfig, $xoopsModule;
297
+			/** @var Planet\Helper $helper */
298
+			$helper = Planet\Helper::getInstance();
299
+
300
+			$title         = $article->getVar('art_title');
301
+			$excerpt       = $article->getVar('art_content');
302
+			$blog_name     = $xoopsConfig['sitename'] . '-' . $xoopsModule->getVar('name');
303
+			$title         = xoops_utf8_encode($title);
304
+			$excerpt       = xoops_utf8_encode($excerpt);
305
+			$blog_name     = xoops_utf8_encode($blog_name);
306
+			$charset       = 'utf-8';
307
+			$title1        = urlencode($title);
308
+			$excerpt1      = urlencode($excerpt);
309
+			$name1         = urlencode($blog_name);
310
+			$url           = urlencode(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article->getVar('art_id'));
311
+			$query_string  = "title=$title1&url=$url&blog_name=$name1&excerpt=$excerpt1&charset=$charset";
312
+			$trackback_url = parse_url($trackback_url);
313
+
314
+			$http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?' . $trackback_url['query'] : '') . " HTTP/1.0\r\n";
315
+			$http_request .= 'Host: ' . $trackback_url['host'] . "\r\n";
316
+			$http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . $charset . "\r\n";
317
+			$http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
318
+			$http_request .= 'User-Agent: XOOPS Blogs/' . XOOPS_VERSION;
319
+			$http_request .= "\r\n\r\n";
320
+			$http_request .= $query_string;
321
+			if ('' == $trackback_url['port']) {
322
+				$trackback_url['port'] = 80;
323
+			}
324
+			$fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4);
325
+			@fwrite($fs, $http_request);
326
+			if ($helper->getConfig('do_debug')) {
327
+				$debug_file = XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '_trackback.log';
328
+				$fr         = "\n*****\nRequest:\n\n$http_request\n\nResponse:\n\n";
329
+				$fr         .= "CHARSET:$charset\n";
330
+				$fr         .= "NAME:$blog_name\n";
331
+				$fr         .= 'TITLE:' . $title . "\n";
332
+				$fr         .= "EXCERPT:$excerpt\n\n";
333
+				while (!@feof($fs)) {
334
+					$fr .= @fgets($fs, 4096);
335
+				}
336
+				$fr .= "\n\n";
337
+
338
+				if ($fp = fopen($debug_file, 'a')) {
339
+					fwrite($fp, $fr);
340
+					fclose($fp);
341
+				} else {
342
+				}
343
+			}
344
+			@fclose($fs);
345
+
346
+			return true;
347
+		}
348
+
349
+		/**
350
+		 * Function to ping servers
351
+		 * @param $server
352
+		 * @param $id
353
+		 */
354
+		public static function planetGetPing($server, $id)
355
+		{
356
+			if (is_array($server)) {
357
+				foreach ($server as $serv) {
358
+					PlanetUtility::planetGetPing($serv, $id);
359
+				}
360
+			}
361
+			require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/class-IXR.php';
362
+
363
+			// using a timeout of 3 seconds should be enough to cover slow servers
364
+			$client            = new IXR_Client($server, false);
365
+			$client->timeout   = 3;
366
+			$client->useragent .= ' -- XOOPS Article/' . XOOPS_VERSION;
367
+
368
+			// when set to true, this outputs debug messages by itself
369
+			$client->debug = false;
370
+
371
+			$blogname = xoops_utf8_encode($GLOBALS['xoopsModule']->getVar('name'));
372
+			$home     = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/';
373
+			$rss2_url = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php' . URL_DELIMITER . 'rss2.0/' . $id;
374
+
375
+			if (!$client->query('weblogUpdates.extendedPing', $blogname, $home, $rss2_url)) { // then try a normal ping
376
+				$client->query('weblogUpdates.ping', $blogname, $home);
377
+			}
378
+		}
379
+
380
+		/**
381
+		 * Function to respond to a trackback
382
+		 * @param int    $error
383
+		 * @param string $error_message
384
+		 */
385
+		public static function planetRespondToTrackback($error = 0, $error_message = '')
386
+		{
387
+			$charset       = 'utf-8';
388
+			$error_message = xoops_utf8_encode($error_message);
389
+			header('Content-Type: text/xml; charset="' . $charset . '"');
390
+			if ($error) {
391
+				echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
392
+				echo "<response>\n";
393
+				echo "<error>1</error>\n";
394
+				echo "<message>$error_message</message>\n";
395
+				echo '</response>';
396
+				die();
397
+			} else {
398
+				echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
399
+				echo "<response>\n";
400
+				echo "<error>0</error>\n";
401
+				echo '</response>';
402
+			}
403
+		}
404
+
405
+		/**
406
+		 * Function to set a cookie with module-specified name
407
+		 *
408
+		 * using customized serialization method
409
+		 * @param        $name
410
+		 * @param string $string
411
+		 * @param int    $expire
412
+		 */
413
+		public static function planetSetCookie($name, $string = '', $expire = 0)
414
+		{
415
+			if (is_array($string)) {
416
+				$value = [];
417
+				foreach ($string as $key => $val) {
418
+					$value[] = $key . '|' . $val;
419
+				}
420
+				$string = implode(',', $value);
421
+			}
422
+			setcookie($GLOBALS['VAR_PREFIX'] . $name, $string, (int)$expire, '/');
423
+		}
424
+
425
+		/**
426
+		 * @param      $name
427
+		 * @param bool $isArray
428
+		 * @return array|null
429
+		 */
430
+		public static function planetGetCookie($name, $isArray = false)
431
+		{
432
+			$value = isset($_COOKIE[$GLOBALS['VAR_PREFIX'] . $name]) ? $_COOKIE[$GLOBALS['VAR_PREFIX'] . $name] : null;
433
+			if ($isArray) {
434
+				$_value = $value ? explode(',', $value) : [];
435
+				$value  = [];
436
+				if (count($_value) > 0) {
437
+					foreach ($_value as $string) {
438
+						$key         = substr($string, 0, strpos($string, '|'));
439
+						$val         = substr($string, strpos($string, '|') + 1);
440
+						$value[$key] = $val;
441
+					}
442
+				}
443
+				unset($_value);
444
+			}
445
+
446
+			return $value;
447
+		}
448
+
449
+		/**
450
+		 * Function to filter text
451
+		 *
452
+		 * @param $document
453
+		 * @return string filtered text
454
+		 */
455
+		public static function &planetHtml2text(&$document)
456
+		{
457
+			$document = strip_tags($document);
458
+
459
+			return $document;
460
+		}
461
+
462
+		// Adapted from PMA_getIp() [phpmyadmin project]
463
+
464
+		/**
465
+		 * @param bool $asString
466
+		 * @return mixed
467
+		 */
468
+		public static function planetGetIP($asString = false)
469
+		{
470
+			return mod_getIP($asString);
471
+		}
472
+
473
+		/**
474
+		 * @param $url
475
+		 * @return bool|mixed|string
476
+		 */
477
+		public static function planetGetRemoteContent($url)
478
+		{
479
+			if ($data = static::planetFetchSnoopy($url)) {
480
+				return $data;
481
+			}
482
+			if ($data = static::planetFetchCURL($url)) {
483
+				return $data;
484
+			}
485
+			if ($data = static::planetFetchFopen($url)) {
486
+				return $data;
487
+			}
488
+
489
+			return false;
490
+		}
491
+
492
+		/**
493
+		 * @param $url
494
+		 * @return string
495
+		 */
496
+		public static function planetFetchSnoopy($url)
497
+		{
498
+			require_once XOOPS_ROOT_PATH . '/class/snoopy.php';
499
+			$snoopy = new Snoopy;
500
+			$data   = '';
501
+			if (@$snoopy->fetch($url)) {
502
+				$data = is_array($snoopy->results) ? implode("\n", $snoopy->results) : $snoopy->results;
503
+			}
504
+
505
+			return $data;
506
+		}
507
+
508
+		/**
509
+		 * @param $url
510
+		 * @return bool|mixed
511
+		 */
512
+		public static function planetFetchCURL($url)
513
+		{
514
+			if (!function_exists('curl_init')) {
515
+				return false;
516
+			}
517
+			$ch = curl_init();    // initialize curl handle
518
+			curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
519
+			curl_setopt($ch, CURLOPT_FAILONERROR, 1);
520
+			curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
521
+			curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable
522
+			curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 31s
523
+			$data = curl_exec($ch); // run the whole process
524
+			curl_close($ch);
525
+
526
+			return $data;
527
+		}
528
+
529
+		/**
530
+		 * @param $url
531
+		 * @return bool|string
532
+		 */
533
+		public static function planetFetchFopen($url)
534
+		{
535
+			if (!$fp = @fopen($url, 'r')) {
536
+				return false;
537
+			}
538
+			$data = '';
539
+			while (!feof($fp)) {
540
+				$data .= fgets($fp, 1024);
541
+			}
542
+			fclose($fp);
543
+
544
+			return $data;
545
+		}
546
+
547
+		/**
548
+		 * @param     $haystack
549
+		 * @param     $needle
550
+		 * @param int $offset
551
+		 * @return bool|int
552
+		 */
553
+		public static function planetStrrPos($haystack, $needle, $offset = 0)
554
+		{
555
+			if (5 == substr(PHP_VERSION, 0, 1)) {
556
+				return strrpos($haystack, $needle, $offset);
557
+			}
558
+			$index = strpos(strrev($haystack), strrev($needle));
559
+			if (false === $index) {
560
+				return false;
561
+			}
562
+			$index = strlen($haystack) - strlen($needle) - $index;
563
+
564
+			return $index;
565
+		}
566
+	}
567 567
 
568 568
 endif;
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
 if (!defined('planet_FUNCTIONS')):
43 43
     define('planet_FUNCTIONS', 1);
44 44
 
45
-    require XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/include/vars.php';
46
-    require_once XOOPS_ROOT_PATH . '/class/xoopslists.php';
47
-    require_once XOOPS_ROOT_PATH . '/Frameworks/art/functions.php';
45
+    require XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/include/vars.php';
46
+    require_once XOOPS_ROOT_PATH.'/class/xoopslists.php';
47
+    require_once XOOPS_ROOT_PATH.'/Frameworks/art/functions.php';
48 48
 
49 49
     /**
50 50
      * Class Utility
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         */
80 80
         public static function planetParseArguments(&$args_numeric, &$args, &$args_string)
81 81
         {
82
-            $args_abb     = [
82
+            $args_abb = [
83 83
                 'a' => 'article',
84 84
                 'b' => 'blog',
85 85
                 'c' => 'category',
@@ -94,24 +94,24 @@  discard block
 block discarded – undo
94 94
             if (preg_match("/[^\?]*\.php[\/|\?]([^\?]*)/i", Request::getUrl('REQUEST_URI', '', 'SERVER'), $matches)) {
95 95
                 $vars = preg_split("/[\/|&]/", $matches[1]);
96 96
                 $vars = array_map('trim', $vars);
97
-                if (count($vars) > 0) {
97
+                if (count($vars)>0) {
98 98
                     foreach ($vars as $var) {
99 99
                         if (is_numeric($var)) {
100 100
                             $args_numeric[] = $var;
101 101
                         } elseif (false === strpos($var, '=')) {
102 102
                             if (is_numeric(substr($var, 1))) {
103
-                                $args[$args_abb[strtolower($var{0})]] = (int)substr($var, 1);
104
-                            } else {
103
+                                $args[$args_abb[strtolower($var{0})]] = (int) substr($var, 1);
104
+                            }else {
105 105
                                 $args_string[] = urldecode($var);
106 106
                             }
107
-                        } else {
107
+                        }else {
108 108
                             parse_str($var, $args);
109 109
                         }
110 110
                     }
111 111
                 }
112 112
             }
113 113
 
114
-            return (0 == count($args) + count($args_numeric) + count($args_string)) ? null : true;
114
+            return (0 == count($args)+count($args_numeric)+count($args_string)) ? null : true;
115 115
         }
116 116
 
117 117
         /**
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
                 $pattern     = [$pattern];
135 135
                 $replacement = [$replacement];
136 136
             }
137
-            if (is_array($pattern) && count($pattern) > 0) {
137
+            if (is_array($pattern) && count($pattern)>0) {
138 138
                 $ii = 0;
139 139
                 foreach ($pattern as $pat) {
140 140
                     if (!in_array($pat, $patterns)) {
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
                 $pattern     = [$pattern];
171 171
                 $replacement = [$replacement];
172 172
             }
173
-            if (is_array($pattern) && count($pattern) > 0) {
173
+            if (is_array($pattern) && count($pattern)>0) {
174 174
                 $ii = 0;
175 175
                 foreach ($pattern as $pat) {
176 176
                     if (!in_array($pat, $patterns)) {
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
             if (!is_array($userid)) {
216 216
                 $userid = [$userid];
217 217
             }
218
-            $users =& mod_getUnameFromIds($userid, $usereal, $linked);
218
+            $users = & mod_getUnameFromIds($userid, $usereal, $linked);
219 219
 
220 220
             return $users;
221 221
         }
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
             $myts       = \MyTextSanitizer::getInstance();
233 233
             $link_array = preg_split("/(\r\n|\r|\n)( *)/", $text);
234 234
             $links      = [];
235
-            if (count($link_array) > 0) {
235
+            if (count($link_array)>0) {
236 236
                 foreach ($link_array as $link) {
237 237
                     @list($url, $title) = array_map('trim', preg_split('/ /', $link, 2));
238 238
                     if (empty($url)) {
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
          */
253 253
         public static function planetGetTemplate($pagename)
254 254
         {
255
-            return $GLOBALS['VAR_PREFIX'] . '_' . $pagename . '.tpl';
255
+            return $GLOBALS['VAR_PREFIX'].'_'.$pagename.'.tpl';
256 256
         }
257 257
 
258 258
         /**
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             }
282 282
 
283 283
             @list($pat, $rep) = array_map('trim', preg_split("#[\s]+#", $pattern));
284
-            $trackback_url = preg_replace('#' . $pat . '#', $rep, $article_obj->getVar('art_link'));
284
+            $trackback_url = preg_replace('#'.$pat.'#', $rep, $article_obj->getVar('art_link'));
285 285
 
286 286
             return static::planetTrackback($trackback_url, $article);
287 287
         }
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
 
300 300
             $title         = $article->getVar('art_title');
301 301
             $excerpt       = $article->getVar('art_content');
302
-            $blog_name     = $xoopsConfig['sitename'] . '-' . $xoopsModule->getVar('name');
302
+            $blog_name     = $xoopsConfig['sitename'].'-'.$xoopsModule->getVar('name');
303 303
             $title         = xoops_utf8_encode($title);
304 304
             $excerpt       = xoops_utf8_encode($excerpt);
305 305
             $blog_name     = xoops_utf8_encode($blog_name);
@@ -307,15 +307,15 @@  discard block
 block discarded – undo
307 307
             $title1        = urlencode($title);
308 308
             $excerpt1      = urlencode($excerpt);
309 309
             $name1         = urlencode($blog_name);
310
-            $url           = urlencode(XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/view.article.php' . URL_DELIMITER . '' . $article->getVar('art_id'));
310
+            $url           = urlencode(XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/view.article.php'.URL_DELIMITER.''.$article->getVar('art_id'));
311 311
             $query_string  = "title=$title1&url=$url&blog_name=$name1&excerpt=$excerpt1&charset=$charset";
312 312
             $trackback_url = parse_url($trackback_url);
313 313
 
314
-            $http_request = 'POST ' . $trackback_url['path'] . ($trackback_url['query'] ? '?' . $trackback_url['query'] : '') . " HTTP/1.0\r\n";
315
-            $http_request .= 'Host: ' . $trackback_url['host'] . "\r\n";
316
-            $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset=' . $charset . "\r\n";
317
-            $http_request .= 'Content-Length: ' . strlen($query_string) . "\r\n";
318
-            $http_request .= 'User-Agent: XOOPS Blogs/' . XOOPS_VERSION;
314
+            $http_request = 'POST '.$trackback_url['path'].($trackback_url['query'] ? '?'.$trackback_url['query'] : '')." HTTP/1.0\r\n";
315
+            $http_request .= 'Host: '.$trackback_url['host']."\r\n";
316
+            $http_request .= 'Content-Type: application/x-www-form-urlencoded; charset='.$charset."\r\n";
317
+            $http_request .= 'Content-Length: '.strlen($query_string)."\r\n";
318
+            $http_request .= 'User-Agent: XOOPS Blogs/'.XOOPS_VERSION;
319 319
             $http_request .= "\r\n\r\n";
320 320
             $http_request .= $query_string;
321 321
             if ('' == $trackback_url['port']) {
@@ -324,11 +324,11 @@  discard block
 block discarded – undo
324 324
             $fs = @fsockopen($trackback_url['host'], $trackback_url['port'], $errno, $errstr, 4);
325 325
             @fwrite($fs, $http_request);
326 326
             if ($helper->getConfig('do_debug')) {
327
-                $debug_file = XOOPS_CACHE_PATH . '/' . $GLOBALS['moddirname'] . '_trackback.log';
327
+                $debug_file = XOOPS_CACHE_PATH.'/'.$GLOBALS['moddirname'].'_trackback.log';
328 328
                 $fr         = "\n*****\nRequest:\n\n$http_request\n\nResponse:\n\n";
329 329
                 $fr         .= "CHARSET:$charset\n";
330 330
                 $fr         .= "NAME:$blog_name\n";
331
-                $fr         .= 'TITLE:' . $title . "\n";
331
+                $fr         .= 'TITLE:'.$title."\n";
332 332
                 $fr         .= "EXCERPT:$excerpt\n\n";
333 333
                 while (!@feof($fs)) {
334 334
                     $fr .= @fgets($fs, 4096);
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                 if ($fp = fopen($debug_file, 'a')) {
339 339
                     fwrite($fp, $fr);
340 340
                     fclose($fp);
341
-                } else {
341
+                }else {
342 342
                 }
343 343
             }
344 344
             @fclose($fs);
@@ -358,19 +358,19 @@  discard block
 block discarded – undo
358 358
                     PlanetUtility::planetGetPing($serv, $id);
359 359
                 }
360 360
             }
361
-            require_once XOOPS_ROOT_PATH . '/modules/' . $GLOBALS['moddirname'] . '/class-IXR.php';
361
+            require_once XOOPS_ROOT_PATH.'/modules/'.$GLOBALS['moddirname'].'/class-IXR.php';
362 362
 
363 363
             // using a timeout of 3 seconds should be enough to cover slow servers
364 364
             $client            = new IXR_Client($server, false);
365 365
             $client->timeout   = 3;
366
-            $client->useragent .= ' -- XOOPS Article/' . XOOPS_VERSION;
366
+            $client->useragent .= ' -- XOOPS Article/'.XOOPS_VERSION;
367 367
 
368 368
             // when set to true, this outputs debug messages by itself
369 369
             $client->debug = false;
370 370
 
371 371
             $blogname = xoops_utf8_encode($GLOBALS['xoopsModule']->getVar('name'));
372
-            $home     = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/';
373
-            $rss2_url = XOOPS_URL . '/modules/' . $GLOBALS['moddirname'] . '/xml.php' . URL_DELIMITER . 'rss2.0/' . $id;
372
+            $home     = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/';
373
+            $rss2_url = XOOPS_URL.'/modules/'.$GLOBALS['moddirname'].'/xml.php'.URL_DELIMITER.'rss2.0/'.$id;
374 374
 
375 375
             if (!$client->query('weblogUpdates.extendedPing', $blogname, $home, $rss2_url)) { // then try a normal ping
376 376
                 $client->query('weblogUpdates.ping', $blogname, $home);
@@ -386,16 +386,16 @@  discard block
 block discarded – undo
386 386
         {
387 387
             $charset       = 'utf-8';
388 388
             $error_message = xoops_utf8_encode($error_message);
389
-            header('Content-Type: text/xml; charset="' . $charset . '"');
389
+            header('Content-Type: text/xml; charset="'.$charset.'"');
390 390
             if ($error) {
391
-                echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
391
+                echo '<?xml version="1.0" encoding="'.$charset.'"?'.">\n";
392 392
                 echo "<response>\n";
393 393
                 echo "<error>1</error>\n";
394 394
                 echo "<message>$error_message</message>\n";
395 395
                 echo '</response>';
396 396
                 die();
397
-            } else {
398
-                echo '<?xml version="1.0" encoding="' . $charset . '"?' . ">\n";
397
+            }else {
398
+                echo '<?xml version="1.0" encoding="'.$charset.'"?'.">\n";
399 399
                 echo "<response>\n";
400 400
                 echo "<error>0</error>\n";
401 401
                 echo '</response>';
@@ -415,11 +415,11 @@  discard block
 block discarded – undo
415 415
             if (is_array($string)) {
416 416
                 $value = [];
417 417
                 foreach ($string as $key => $val) {
418
-                    $value[] = $key . '|' . $val;
418
+                    $value[] = $key.'|'.$val;
419 419
                 }
420 420
                 $string = implode(',', $value);
421 421
             }
422
-            setcookie($GLOBALS['VAR_PREFIX'] . $name, $string, (int)$expire, '/');
422
+            setcookie($GLOBALS['VAR_PREFIX'].$name, $string, (int) $expire, '/');
423 423
         }
424 424
 
425 425
         /**
@@ -429,14 +429,14 @@  discard block
 block discarded – undo
429 429
          */
430 430
         public static function planetGetCookie($name, $isArray = false)
431 431
         {
432
-            $value = isset($_COOKIE[$GLOBALS['VAR_PREFIX'] . $name]) ? $_COOKIE[$GLOBALS['VAR_PREFIX'] . $name] : null;
432
+            $value = isset($_COOKIE[$GLOBALS['VAR_PREFIX'].$name]) ? $_COOKIE[$GLOBALS['VAR_PREFIX'].$name] : null;
433 433
             if ($isArray) {
434 434
                 $_value = $value ? explode(',', $value) : [];
435 435
                 $value  = [];
436
-                if (count($_value) > 0) {
436
+                if (count($_value)>0) {
437 437
                     foreach ($_value as $string) {
438 438
                         $key         = substr($string, 0, strpos($string, '|'));
439
-                        $val         = substr($string, strpos($string, '|') + 1);
439
+                        $val         = substr($string, strpos($string, '|')+1);
440 440
                         $value[$key] = $val;
441 441
                     }
442 442
                 }
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
          */
496 496
         public static function planetFetchSnoopy($url)
497 497
         {
498
-            require_once XOOPS_ROOT_PATH . '/class/snoopy.php';
498
+            require_once XOOPS_ROOT_PATH.'/class/snoopy.php';
499 499
             $snoopy = new Snoopy;
500 500
             $data   = '';
501 501
             if (@$snoopy->fetch($url)) {
@@ -514,10 +514,10 @@  discard block
 block discarded – undo
514 514
             if (!function_exists('curl_init')) {
515 515
                 return false;
516 516
             }
517
-            $ch = curl_init();    // initialize curl handle
517
+            $ch = curl_init(); // initialize curl handle
518 518
             curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
519 519
             curl_setopt($ch, CURLOPT_FAILONERROR, 1);
520
-            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);// allow redirects
520
+            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects
521 521
             curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // return into a variable
522 522
             curl_setopt($ch, CURLOPT_TIMEOUT, 30); // times out after 31s
523 523
             $data = curl_exec($ch); // run the whole process
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
             if (false === $index) {
560 560
                 return false;
561 561
             }
562
-            $index = strlen($haystack) - strlen($needle) - $index;
562
+            $index = strlen($haystack)-strlen($needle)-$index;
563 563
 
564 564
             return $index;
565 565
         }
Please login to merge, or discard this patch.
class/xmlpc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 // ------------------------------------------------------------------------ //
27 27
 
28 28
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
29
-require_once __DIR__ . '/../include/vars.php';
29
+require_once __DIR__.'/../include/vars.php';
30 30
 //mod_loadFunctions('', $GLOBALS['moddirname']);
31 31
 
32 32
 if (!class_exists('Xmlrpc_client')) {
Please login to merge, or discard this patch.
class/bookmark.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
  */
31 31
 
32 32
 // defined('XOOPS_ROOT_PATH') || die('Restricted access');
33
-require_once __DIR__ . '/../include/vars.php';
33
+require_once __DIR__.'/../include/vars.php';
34 34
 //mod_loadFunctions('', $GLOBALS['moddirname']);
35 35
 
36 36
 /**
Please login to merge, or discard this patch.