summaryrefslogtreecommitdiff
path: root/templates/themes/frameset
diff options
context:
space:
mode:
authorAppleman1234 <applemansigloo@gmail.com>2022-09-25 13:30:13 +1000
committerAppleman1234 <applemansigloo@gmail.com>2022-09-25 13:30:13 +1000
commit2c69095a1edf7474073451285238659d0f62ce3f (patch)
tree5dee476605402c66dc2853d0836b29f6aedae62b /templates/themes/frameset
parente9a61e2fbbd930eaa80d6a5f33420cedc59d748c (diff)
PHP8.1 fixes from Rector
Diffstat (limited to 'templates/themes/frameset')
-rw-r--r--templates/themes/frameset/info.php43
-rw-r--r--templates/themes/frameset/theme.php14
2 files changed, 11 insertions, 46 deletions
diff --git a/templates/themes/frameset/info.php b/templates/themes/frameset/info.php
index 8cff78a9..f19ea010 100644
--- a/templates/themes/frameset/info.php
+++ b/templates/themes/frameset/info.php
@@ -1,8 +1,8 @@
<?php
- $theme = Array();
+ $theme = [];
// Theme name
- $theme['name'] = 'Frameset';
+ $theme['name'] = \Frameset::class;
// Description (you can use Tinyboard markup here)
$theme['description'] =
'Use a basic frameset layout, with a list of boards and pages on a sidebar to the left of the page.
@@ -11,44 +11,17 @@ Users never have to leave the homepage; they can do all their browsing from the
$theme['version'] = 'v0.1';
// Theme configuration
- $theme['config'] = Array();
+ $theme['config'] = [];
- $theme['config'][] = Array(
- 'title' => 'Site title',
- 'name' => 'title',
- 'type' => 'text'
- );
+ $theme['config'][] = ['title' => 'Site title', 'name' => 'title', 'type' => 'text'];
- $theme['config'][] = Array(
- 'title' => 'Slogan',
- 'name' => 'subtitle',
- 'type' => 'text',
- 'comment' => '(optional)'
- );
+ $theme['config'][] = ['title' => 'Slogan', 'name' => 'subtitle', 'type' => 'text', 'comment' => '(optional)'];
- $theme['config'][] = Array(
- 'title' => 'Main HTML file',
- 'name' => 'file_main',
- 'type' => 'text',
- 'default' => $config['file_index'],
- 'comment' => '(eg. "index.html")'
- );
+ $theme['config'][] = ['title' => 'Main HTML file', 'name' => 'file_main', 'type' => 'text', 'default' => $config['file_index'], 'comment' => '(eg. "index.html")'];
- $theme['config'][] = Array(
- 'title' => 'Sidebar file',
- 'name' => 'file_sidebar',
- 'type' => 'text',
- 'default' => 'sidebar.html',
- 'comment' => '(eg. "sidebar.html")'
- );
+ $theme['config'][] = ['title' => 'Sidebar file', 'name' => 'file_sidebar', 'type' => 'text', 'default' => 'sidebar.html', 'comment' => '(eg. "sidebar.html")'];
- $theme['config'][] = Array(
- 'title' => 'News file',
- 'name' => 'file_news',
- 'type' => 'text',
- 'default' => 'news.html',
- 'comment' => '(eg. "news.html")'
- );
+ $theme['config'][] = ['title' => 'News file', 'name' => 'file_news', 'type' => 'text', 'default' => 'news.html', 'comment' => '(eg. "news.html")'];
// Unique function name for building everything
$theme['build_function'] = 'frameset_build';
diff --git a/templates/themes/frameset/theme.php b/templates/themes/frameset/theme.php
index ffab0538..996ee64e 100644
--- a/templates/themes/frameset/theme.php
+++ b/templates/themes/frameset/theme.php
@@ -29,7 +29,7 @@
public static function homepage($settings) {
global $config;
- return Element('themes/frameset/frames.html', Array('config' => $config, 'settings' => $settings));
+ return Element('themes/frameset/frames.html', ['config' => $config, 'settings' => $settings]);
}
// Build news page
@@ -39,22 +39,14 @@
$query = query("SELECT * FROM ``news`` ORDER BY `time` DESC") or error(db_error());
$news = $query->fetchAll(PDO::FETCH_ASSOC);
- return Element('themes/frameset/news.html', Array(
- 'settings' => $settings,
- 'config' => $config,
- 'news' => $news
- ));
+ return Element('themes/frameset/news.html', ['settings' => $settings, 'config' => $config, 'news' => $news]);
}
// Build sidebar
public static function sidebar($settings) {
global $config, $board;
- return Element('themes/frameset/sidebar.html', Array(
- 'settings' => $settings,
- 'config' => $config,
- 'boards' => listBoards()
- ));
+ return Element('themes/frameset/sidebar.html', ['settings' => $settings, 'config' => $config, 'boards' => listBoards()]);
}
};