@@ -87,7 +87,7 @@ function featherbb_write_cache_file($file, $content)
8787{
8888 $ fh = @fopen (FORUM_CACHE_DIR .$ file , 'wb ' );
8989 if (!$ fh ) {
90- error ('Unable to write cache file ' .$ feather -> utils -> escape ($ file ).' to cache directory. Please make sure PHP has write access to the directory \'' .$ feather -> utils -> escape (FORUM_CACHE_DIR ).'\'' , __FILE__ , __LINE__ );
90+ die ('Unable to write cache file ' .Utils:: escape ($ file ).' to cache directory. Please make sure PHP has write access to the directory \'' .Utils:: escape (FORUM_CACHE_DIR ).'\'' , __FILE__ , __LINE__ );
9191 }
9292
9393 flock ($ fh , LOCK_EX );
@@ -224,7 +224,7 @@ function authenticate_user($user, $password, $password_is_hash = false)
224224
225225 if (!isset ($ feather ->user ->id ) ||
226226 ($ password_is_hash && $ password != $ feather ->user ->password ) ||
227- (!$ password_is_hash && \FeatherBB \Utils::feather_hash ($ password ) != $ feather ->user ->password )) {
227+ (!$ password_is_hash && \FeatherBB \Utils::hash ($ password ) != $ feather ->user ->password )) {
228228 set_default_user ();
229229 } else {
230230 $ feather ->user ->is_guest = false ;
@@ -286,9 +286,9 @@ function output_rss($feed)
286286 echo '<?xml version="1.0" encoding="utf-8"?> ' ."\n" ;
287287 echo '<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> ' ."\n" ;
288288 echo "\t" .'<channel> ' ."\n" ;
289- echo "\t\t" .'<atom:link href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-s1">$ feather -> utils -> escape (get_current_url ()).'" rel="self" type="application/rss+xml" /> ' ."\n" ;
289+ echo "\t\t" .'<atom:link href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"x x-first x-last">Utils:: escape (get_current_url ()).'" rel="self" type="application/rss+xml" /> ' ."\n" ;
290290 echo "\t\t" .'<title><![CDATA[ ' .escape_cdata ($ feed ['title ' ]).']]></title> ' ."\n" ;
291- echo "\t\t" .'<link> ' .$ feather -> utils -> escape ($ feed ['link ' ]).'</link> ' ."\n" ;
291+ echo "\t\t" .'<link> ' .Utils:: escape ($ feed ['link ' ]).'</link> ' ."\n" ;
292292 echo "\t\t" .'<description><![CDATA[ ' .escape_cdata ($ feed ['description ' ]).']]></description> ' ."\n" ;
293293 echo "\t\t" .'<lastBuildDate> ' .gmdate ('r ' , count ($ feed ['items ' ]) ? $ feed ['items ' ][0 ]['pubdate ' ] : time ()).'</lastBuildDate> ' ."\n" ;
294294
@@ -301,11 +301,11 @@ function output_rss($feed)
301301 foreach ($ feed ['items ' ] as $ item ) {
302302 echo "\t\t" .'<item> ' ."\n" ;
303303 echo "\t\t\t" .'<title><![CDATA[ ' .escape_cdata ($ item ['title ' ]).']]></title> ' ."\n" ;
304- echo "\t\t\t" .'<link> ' .$ feather -> utils -> escape ($ item ['link ' ]).'</link> ' ."\n" ;
304+ echo "\t\t\t" .'<link> ' .Utils:: escape ($ item ['link ' ]).'</link> ' ."\n" ;
305305 echo "\t\t\t" .'<description><![CDATA[ ' .escape_cdata ($ item ['description ' ]).']]></description> ' ."\n" ;
306306 echo "\t\t\t" .
'<author><![CDATA[ ' .(
isset (
$ item[
'author ' ][
'email ' ]) ?
escape_cdata (
$ item[
'author ' ][
'email ' ]) :
'[email protected] ' ).
' ( ' .
escape_cdata (
$ item[
'author ' ][
'name ' ]).
')]]></author> ' .
"\n" ;
307307 echo "\t\t\t" .'<pubDate> ' .gmdate ('r ' , $ item ['pubdate ' ]).'</pubDate> ' ."\n" ;
308- echo "\t\t\t" .'<guid> ' .$ feather -> utils -> escape ($ item ['link ' ]).'</guid> ' ."\n" ;
308+ echo "\t\t\t" .'<guid> ' .Utils:: escape ($ item ['link ' ]).'</guid> ' ."\n" ;
309309
310310 echo "\t\t" .'</item> ' ."\n" ;
311311 }
@@ -330,8 +330,8 @@ function output_atom($feed)
330330 echo '<feed xmlns="http://www.w3.org/2005/Atom"> ' ."\n" ;
331331
332332 echo "\t" .'<title type="html"><![CDATA[ ' .escape_cdata ($ feed ['title ' ]).']]></title> ' ."\n" ;
333- echo "\t" .'<link rel="self" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-s1">$ feather -> utils -> escape (get_current_url ()).'"/> ' ."\n" ;
334- echo "\t" .'<link href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-s1">$ feather -> utils -> escape ($ feed ['link ' ]).'"/> ' ."\n" ;
333+ echo "\t" .'<link rel="self" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"x x-first x-last">Utils:: escape (get_current_url ()).'"/> ' ."\n" ;
334+ echo "\t" .'<link href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"x x-first x-last">Utils:: escape ($ feed ['link ' ]).'"/> ' ."\n" ;
335335 echo "\t" .'<updated> ' .gmdate ('Y-m-d\TH:i:s\Z ' , count ($ feed ['items ' ]) ? $ feed ['items ' ][0 ]['pubdate ' ] : time ()).'</updated> ' ."\n" ;
336336
337337 if ($ feather ->forum_settings ['o_show_version ' ] == '1 ' ) {
@@ -340,14 +340,14 @@ function output_atom($feed)
340340 echo "\t" .'<generator>FluxBB</generator> ' ."\n" ;
341341 }
342342
343- echo "\t" .'<id> ' .$ feather -> utils -> escape ($ feed ['link ' ]).'</id> ' ."\n" ;
343+ echo "\t" .'<id> ' .Utils:: escape ($ feed ['link ' ]).'</id> ' ."\n" ;
344344
345345 $ content_tag = ($ feed ['type ' ] == 'posts ' ) ? 'content ' : 'summary ' ;
346346
347347 foreach ($ feed ['items ' ] as $ item ) {
348348 echo "\t" .'<entry> ' ."\n" ;
349349 echo "\t\t" .'<title type="html"><![CDATA[ ' .escape_cdata ($ item ['title ' ]).']]></title> ' ."\n" ;
350- echo "\t\t" .'<link rel="alternate" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-s1">$ feather -> utils -> escape ($ item ['link ' ]).'"/> ' ."\n" ;
350+ echo "\t\t" .'<link rel="alternate" href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"x x-first x-last">Utils:: escape ($ item ['link ' ]).'"/> ' ."\n" ;
351351 echo "\t\t" .'< ' .$ content_tag .' type="html"><![CDATA[ ' .escape_cdata ($ item ['description ' ]).']]></ ' .$ content_tag .'> ' ."\n" ;
352352 echo "\t\t" .'<author> ' ."\n" ;
353353 echo "\t\t\t" .'<name><![CDATA[ ' .escape_cdata ($ item ['author ' ]['name ' ]).']]></name> ' ."\n" ;
@@ -357,13 +357,13 @@ function output_atom($feed)
357357 }
358358
359359 if (isset ($ item ['author ' ]['uri ' ])) {
360- echo "\t\t\t" .'<uri> ' .$ feather -> utils -> escape ($ item ['author ' ]['uri ' ]).'</uri> ' ."\n" ;
360+ echo "\t\t\t" .'<uri> ' .Utils:: escape ($ item ['author ' ]['uri ' ]).'</uri> ' ."\n" ;
361361 }
362362
363363 echo "\t\t" .'</author> ' ."\n" ;
364364 echo "\t\t" .'<updated> ' .gmdate ('Y-m-d\TH:i:s\Z ' , $ item ['pubdate ' ]).'</updated> ' ."\n" ;
365365
366- echo "\t\t" .'<id> ' .$ feather -> utils -> escape ($ item ['link ' ]).'</id> ' ."\n" ;
366+ echo "\t\t" .'<id> ' .Utils:: escape ($ item ['link ' ]).'</id> ' ."\n" ;
367367 echo "\t" .'</entry> ' ."\n" ;
368368 }
369369
@@ -384,15 +384,15 @@ function output_xml($feed)
384384
385385 echo '<?xml version="1.0" encoding="utf-8"?> ' ."\n" ;
386386 echo '<source> ' ."\n" ;
387- echo "\t" .'<url> ' .$ feather -> utils -> escape ($ feed ['link ' ]).'</url> ' ."\n" ;
387+ echo "\t" .'<url> ' .Utils:: escape ($ feed ['link ' ]).'</url> ' ."\n" ;
388388
389389 $ forum_tag = ($ feed ['type ' ] == 'posts ' ) ? 'post ' : 'topic ' ;
390390
391391 foreach ($ feed ['items ' ] as $ item ) {
392392 echo "\t" .'< ' .$ forum_tag .' id=" ' .$ item ['id ' ].'"> ' ."\n" ;
393393
394394 echo "\t\t" .'<title><![CDATA[ ' .escape_cdata ($ item ['title ' ]).']]></title> ' ."\n" ;
395- echo "\t\t" .'<link> ' .$ feather -> utils -> escape ($ item ['link ' ]).'</link> ' ."\n" ;
395+ echo "\t\t" .'<link> ' .Utils:: escape ($ item ['link ' ]).'</link> ' ."\n" ;
396396 echo "\t\t" .'<content><![CDATA[ ' .escape_cdata ($ item ['description ' ]).']]></content> ' ."\n" ;
397397 echo "\t\t" .'<author> ' ."\n" ;
398398 echo "\t\t\t" .'<name><![CDATA[ ' .escape_cdata ($ item ['author ' ]['name ' ]).']]></name> ' ."\n" ;
@@ -402,7 +402,7 @@ function output_xml($feed)
402402 }
403403
404404 if (isset ($ item ['author ' ]['uri ' ])) {
405- echo "\t\t\t" .'<uri> ' .$ feather -> utils -> escape ($ item ['author ' ]['uri ' ]).'</uri> ' ."\n" ;
405+ echo "\t\t\t" .'<uri> ' .Utils:: escape ($ item ['author ' ]['uri ' ]).'</uri> ' ."\n" ;
406406 }
407407
408408 echo "\t\t" .'</author> ' ."\n" ;
@@ -428,12 +428,12 @@ function output_html($feed)
428428
429429 foreach ($ feed ['items ' ] as $ item ) {
430430 if (utf8_strlen ($ item ['title ' ]) > FORUM_EXTERN_MAX_SUBJECT_LENGTH ) {
431- $ subject_truncated = $ feather -> utils -> escape ($ feather ->utils ->trim (utf8_substr ($ item ['title ' ], 0 , (FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5 )))).' … ' ;
431+ $ subject_truncated = Utils:: escape ($ feather ->utils ->trim (utf8_substr ($ item ['title ' ], 0 , (FORUM_EXTERN_MAX_SUBJECT_LENGTH - 5 )))).' … ' ;
432432 } else {
433- $ subject_truncated = $ feather -> utils -> escape ($ item ['title ' ]);
433+ $ subject_truncated = Utils:: escape ($ item ['title ' ]);
434434 }
435435
436- echo '<li><a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-s1">$ feather -> utils -> escape ($ item ['link ' ]).'" title=" ' .$ feather -> utils -> escape ($ item ['title ' ]).'"> ' .$ subject_truncated .'</a></li> ' ."\n" ;
436+ echo '<li><a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"x x-first x-last">Utils:: escape ($ item ['link ' ]).'" title=" ' .Utils:: escape ($ item ['title ' ]).'"> ' .$ subject_truncated .'</a></li> ' ."\n" ;
437437 }
438438}
439439
@@ -700,7 +700,7 @@ function output_html($feed)
700700
701701 foreach ($ result as $ feather_user_online ) {
702702 if ($ feather_user_online ['user_id ' ] > 1 ) {
703- $ users [] = ($ feather ->user ->g_view_users == '1 ' ) ? '<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-en">get ('user/ ' .$ feather_user_online ['user_id ' ].'/ ' ).'"> ' .$ feather -> utils -> escape ($ feather_user_online ['ident ' ]).'</a> ' : $ feather -> utils -> escape ($ feather_user_online ['ident ' ]);
703+ $ users [] = ($ feather ->user ->g_view_users == '1 ' ) ? '<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-en">get ('user/ ' .$ feather_user_online ['user_id ' ].'/ ' ).'"> ' .Utils:: escape ($ feather_user_online ['ident ' ]).'</a> ' : Utils:: escape ($ feather_user_online ['ident ' ]);
704704 ++$ num_users ;
705705 } else {
706706 ++$ num_guests ;
@@ -713,12 +713,12 @@ function output_html($feed)
713713 header ('Cache-Control: must-revalidate, post-check=0, pre-check=0 ' );
714714 header ('Pragma: public ' );
715715
716- echo sprintf (__ ('Guests online ' ), $ feather -> utils -> forum_number_format ($ num_guests )).'<br /> ' ."\n" ;
716+ echo sprintf (__ ('Guests online ' ), Utils:: forum_number_format ($ num_guests )).'<br /> ' ."\n" ;
717717
718718 if ($ action == 'online_full ' && !empty ($ users )) {
719719 echo sprintf (__ ('Users online ' ), implode (', ' , $ users )).'<br /> ' ."\n" ;
720720 } else {
721- echo sprintf (__ ('Users online ' ), $ feather -> utils -> forum_number_format ($ num_users )).'<br /> ' ."\n" ;
721+ echo sprintf (__ ('Users online ' ), Utils:: forum_number_format ($ num_users )).'<br /> ' ."\n" ;
722722 }
723723
724724 exit ;
@@ -747,10 +747,10 @@ function output_html($feed)
747747 header ('Cache-Control: must-revalidate, post-check=0, pre-check=0 ' );
748748 header ('Pragma: public ' );
749749
750- echo sprintf (__ ('No of users ' ), $ feather -> utils -> forum_number_format ($ stats ['total_users ' ])).'<br /> ' ."\n" ;
751- echo sprintf (__ ('Newest user ' ), (($ feather ->user ->g_view_users == '1 ' ) ? '<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-en">get ('user/ ' .$ stats ['last_user ' ]['id ' ].'/ ' ).'"> ' .$ feather -> utils -> escape ($ stats ['last_user ' ]['username ' ]).'</a> ' : $ feather -> utils -> escape ($ stats ['last_user ' ]['username ' ]))).'<br /> ' ."\n" ;
752- echo sprintf (__ ('No of topics ' ), $ feather -> utils -> forum_number_format ($ stats ['total_topics ' ])).'<br /> ' ."\n" ;
753- echo sprintf (__ ('No of posts ' ), $ feather -> utils -> forum_number_format ($ stats ['total_posts ' ])).'<br /> ' ."\n" ;
750+ echo sprintf (__ ('No of users ' ), Utils:: forum_number_format ($ stats ['total_users ' ])).'<br /> ' ."\n" ;
751+ echo sprintf (__ ('Newest user ' ), (($ feather ->user ->g_view_users == '1 ' ) ? '<a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3C%2Fspan%3E%27%3C%2Fspan%3E.%3Cspan+class%3D"pl-en">get ('user/ ' .$ stats ['last_user ' ]['id ' ].'/ ' ).'"> ' .Utils:: escape ($ stats ['last_user ' ]['username ' ]).'</a> ' : Utils:: escape ($ stats ['last_user ' ]['username ' ]))).'<br /> ' ."\n" ;
752+ echo sprintf (__ ('No of topics ' ), Utils:: forum_number_format ($ stats ['total_topics ' ])).'<br /> ' ."\n" ;
753+ echo sprintf (__ ('No of posts ' ), Utils:: forum_number_format ($ stats ['total_posts ' ])).'<br /> ' ."\n" ;
754754
755755 exit ;
756756}
0 commit comments