From 2c69095a1edf7474073451285238659d0f62ce3f Mon Sep 17 00:00:00 2001 From: Appleman1234 Date: Sun, 25 Sep 2022 13:30:13 +1000 Subject: PHP8.1 fixes from Rector --- templates/themes/recent/info.php | 74 ++++++++-------------------------------- 1 file changed, 14 insertions(+), 60 deletions(-) (limited to 'templates/themes/recent/info.php') diff --git a/templates/themes/recent/info.php b/templates/themes/recent/info.php index bea3513c..188f9dfe 100644 --- a/templates/themes/recent/info.php +++ b/templates/themes/recent/info.php @@ -1,76 +1,30 @@ 'Title', - 'name' => 'title', - 'type' => 'text', - 'default' => 'Recent Posts' - ); + $theme['config'][] = ['title' => 'Title', 'name' => 'title', 'type' => 'text', 'default' => 'Recent Posts']; - $theme['config'][] = Array( - 'title' => 'Excluded boards', - 'name' => 'exclude', - 'type' => 'text', - 'comment' => '(space seperated)' - ); + $theme['config'][] = ['title' => 'Excluded boards', 'name' => 'exclude', 'type' => 'text', 'comment' => '(space seperated)']; - $theme['config'][] = Array( - 'title' => '# of recent images', - 'name' => 'limit_images', - 'type' => 'text', - 'default' => '3', - 'comment' => '(maximum images to display)' - ); + $theme['config'][] = ['title' => '# of recent images', 'name' => 'limit_images', 'type' => 'text', 'default' => '3', 'comment' => '(maximum images to display)']; - $theme['config'][] = Array( - 'title' => '# of recent posts', - 'name' => 'limit_posts', - 'type' => 'text', - 'default' => '30', - 'comment' => '(maximum posts to display)' - ); + $theme['config'][] = ['title' => '# of recent posts', 'name' => 'limit_posts', 'type' => 'text', 'default' => '30', 'comment' => '(maximum posts to display)']; - $theme['config'][] = Array( - 'title' => 'HTML file', - 'name' => 'html', - 'type' => 'text', - 'default' => 'recent.html', - 'comment' => '(eg. "recent.html")' - ); + $theme['config'][] = ['title' => 'HTML file', 'name' => 'html', 'type' => 'text', 'default' => 'recent.html', 'comment' => '(eg. "recent.html")']; - $theme['config'][] = Array( - 'title' => 'CSS file', - 'name' => 'css', - 'type' => 'text', - 'default' => 'recent.css', - 'comment' => '(eg. "recent.css")' - ); + $theme['config'][] = ['title' => 'CSS file', 'name' => 'css', 'type' => 'text', 'default' => 'recent.css', 'comment' => '(eg. "recent.css")']; - $theme['config'][] = Array( - 'title' => 'CSS stylesheet name', - 'name' => 'basecss', - 'type' => 'text', - 'default' => 'recent.css', - 'comment' => '(eg. "recent.css" - see templates/themes/recent for details)' - ); + $theme['config'][] = ['title' => 'CSS stylesheet name', 'name' => 'basecss', 'type' => 'text', 'default' => 'recent.css', 'comment' => '(eg. "recent.css" - see templates/themes/recent for details)']; - $theme['config'][] = Array( - 'title' => '# of recent news', - 'name' => 'limit_news', - 'type' => 'text', - 'default' => '1', - 'comment' => '(maximum news to display)' - ); + $theme['config'][] = ['title' => '# of recent news', 'name' => 'limit_news', 'type' => 'text', 'default' => '1', 'comment' => '(maximum news to display)']; // Unique function name for building everything $theme['build_function'] = 'recentposts_build'; $theme['install_callback'] = 'recentposts_install'; @@ -78,11 +32,11 @@ if (!function_exists('recentposts_install')) { function recentposts_install($settings) { if (!is_numeric($settings['limit_news']) || $settings['limit_news'] < 0) - return Array(false, '' . utf8tohtml($settings['limit_news']) . ' is not a non-negative integer.'); + return [false, '' . utf8tohtml($settings['limit_news']) . ' is not a non-negative integer.']; if (!is_numeric($settings['limit_images']) || $settings['limit_images'] < 0) - return Array(false, '' . utf8tohtml($settings['limit_images']) . ' is not a non-negative integer.'); + return [false, '' . utf8tohtml($settings['limit_images']) . ' is not a non-negative integer.']; if (!is_numeric($settings['limit_posts']) || $settings['limit_posts'] < 0) - return Array(false, '' . utf8tohtml($settings['limit_posts']) . ' is not a non-negative integer.'); + return [false, '' . utf8tohtml($settings['limit_posts']) . ' is not a non-negative integer.']; } } -- cgit v1.3