From e651ae1da61bd7ab0b30c85c7651f589da69acca Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 28 Mar 2018 12:57:37 +0200 Subject: [PATCH] Remove Page and AdminPage classes, adjust pages accordingly --- Blacklight/http/AdminPage.php | 55 -------- Blacklight/http/BasePage.php | 134 ++++++++++++++++--- Blacklight/http/Page.php | 85 ------------ Changelog | 1 + public/admin/ajax.php | 5 +- public/admin/ajax_regex.php | 5 +- public/admin/ajax_sharing_settings.php | 6 +- public/admin/anidb-edit.php | 8 +- public/admin/anidb-list.php | 8 +- public/admin/anidb-remove.php | 7 +- public/admin/binaryblacklist-edit.php | 7 +- public/admin/binaryblacklist-list.php | 7 +- public/admin/book-edit.php | 7 +- public/admin/book-list.php | 7 +- public/admin/category-edit.php | 7 +- public/admin/category-list.php | 7 +- public/admin/category_regexes-edit.php | 7 +- public/admin/category_regexes-list.php | 7 +- public/admin/collection_regexes-edit.php | 7 +- public/admin/collection_regexes-list.php | 7 +- public/admin/collection_regexes-test.php | 7 +- public/admin/comments-list.php | 7 +- public/admin/console-edit.php | 7 +- public/admin/console-list.php | 7 +- public/admin/content-add.php | 7 +- public/admin/content-list.php | 7 +- public/admin/failrel-list.php | 7 +- public/admin/game-edit.php | 7 +- public/admin/game-list.php | 7 +- public/admin/group-bulk.php | 7 +- public/admin/group-edit.php | 7 +- public/admin/group-list-active.php | 7 +- public/admin/group-list-inactive.php | 7 +- public/admin/group-list.php | 7 +- public/admin/index.php | 8 +- public/admin/menu-edit.php | 7 +- public/admin/menu-list.php | 7 +- public/admin/movie-add.php | 7 +- public/admin/movie-edit.php | 7 +- public/admin/movie-list.php | 7 +- public/admin/music-edit.php | 7 +- public/admin/music-list.php | 7 +- public/admin/nzb-export.php | 7 +- public/admin/nzb-import.php | 7 +- public/admin/opcachestats.php | 5 +- public/admin/posters-edit.php | 7 +- public/admin/posters-list.php | 7 +- public/admin/predb.php | 7 +- public/admin/release-delete.php | 4 +- public/admin/release-edit.php | 7 +- public/admin/release-files.php | 9 +- public/admin/release-list.php | 7 +- public/admin/release_naming_regexes-edit.php | 7 +- public/admin/release_naming_regexes-list.php | 7 +- public/admin/release_naming_regexes-test.php | 7 +- public/admin/role-edit.php | 7 +- public/admin/role-list.php | 7 +- public/admin/sharing.php | 7 +- public/admin/show-edit.php | 7 +- public/admin/show-list.php | 7 +- public/admin/show-remove.php | 7 +- public/admin/site-edit.php | 7 +- public/admin/site-stats.php | 7 +- public/admin/tmux-edit.php | 7 +- public/admin/user-edit.php | 7 +- public/admin/user-list.php | 7 +- public/index.php | 6 +- public/pages/.htaccess | 2 +- public/pages/ajax_release-admin.php | 4 +- public/pages/ajax_resetusergrabs-admin.php | 4 +- public/pages/anime.php | 4 +- public/pages/apihelp.php | 2 +- public/pages/bookmodal.php | 2 +- public/pages/books.php | 2 +- public/pages/browse.php | 2 +- public/pages/browsegroup.php | 2 +- public/pages/btc_payment.php | 2 +- public/pages/cart.php | 2 +- public/pages/console.php | 2 +- public/pages/consolemodal.php | 2 +- public/pages/contact-us.php | 2 +- public/pages/content.php | 2 +- public/pages/details.php | 2 +- public/pages/filelist.php | 2 +- public/pages/forgottenpassword.php | 2 +- public/pages/forum.php | 2 +- public/pages/forumpost.php | 2 +- public/pages/games.php | 2 +- public/pages/login.php | 2 +- public/pages/movie.php | 4 +- public/pages/movies.php | 2 +- public/pages/movietrailer.php | 2 +- public/pages/music.php | 2 +- public/pages/musicmodal.php | 2 +- public/pages/mymovies.php | 8 +- public/pages/myshows.php | 8 +- public/pages/nfo.php | 2 +- public/pages/nzbvortex.php | 2 +- public/pages/post_edit.php | 2 +- public/pages/profile.php | 2 +- public/pages/profileedit.php | 2 +- public/pages/queue.php | 2 +- public/pages/register.php | 2 +- public/pages/rss-info.php | 2 +- public/pages/rss.php | 2 +- public/pages/search.php | 2 +- public/pages/series.php | 4 +- public/pages/sitemap.php | 2 +- public/pages/terms-and-conditions.php | 2 +- public/pages/xxx.php | 2 +- public/pages/xxxmodal.php | 4 +- 111 files changed, 424 insertions(+), 398 deletions(-) delete mode 100644 Blacklight/http/AdminPage.php delete mode 100644 Blacklight/http/Page.php diff --git a/Blacklight/http/AdminPage.php b/Blacklight/http/AdminPage.php deleted file mode 100644 index 07828eadc..000000000 --- a/Blacklight/http/AdminPage.php +++ /dev/null @@ -1,55 +0,0 @@ -smarty->setTemplateDir( - [ - 'admin' => config('ytake-laravel-smarty.template_path').'/admin', - 'shared' => config('ytake-laravel-smarty.template_path').'/shared', - 'default' => config('ytake-laravel-smarty.template_path').'/admin', - ] - ); - - if (! isset($this->userdata['user_roles_id']) || (int) $this->userdata['user_roles_id'] !== User::ROLE_ADMIN || ! Auth::check()) { - $this->show403(true); - } - - $this->smarty->assign('catClass', Category::class); - } - - /** - * Output a page using the admin template. - * - * @throws \Exception - */ - public function render(): void - { - $this->smarty->assign('page', $this); - - $admin_menu = $this->smarty->fetch('adminmenu.tpl'); - $this->smarty->assign('admin_menu', $admin_menu); - - $this->page_template = 'baseadminpage.tpl'; - - parent::render(); - } -} diff --git a/Blacklight/http/BasePage.php b/Blacklight/http/BasePage.php index 5ed541091..3bbea6dc8 100644 --- a/Blacklight/http/BasePage.php +++ b/Blacklight/http/BasePage.php @@ -4,7 +4,11 @@ namespace Blacklight\http; require_once NN_LIB.'utility/SmartyUtils.php'; +use App\Models\Category; +use App\Models\Forumpost; +use App\Models\Menu; use App\Models\User; +use Blacklight\Contents; use Blacklight\db\DB; use Blacklight\SABnzbd; use App\Models\Settings; @@ -25,12 +29,19 @@ class BasePage public $smarty; public $title = ''; + public $content = ''; + public $head = ''; + public $body = ''; + public $meta_keywords = ''; + public $meta_title = ''; + public $meta_description = ''; + public $secure_connection = false; /** @@ -103,9 +114,7 @@ class BasePage { $kernel = app()->make(\Illuminate\Contracts\Http\Kernel::class); - $response = $kernel->handle( - $request = \Illuminate\Http\Request::capture() - ); + $response = $kernel->handle($request = \Illuminate\Http\Request::capture()); $response->send(); $kernel->terminate($request, $response); @@ -120,7 +129,7 @@ class BasePage foreach (array_get(config('ytake-laravel-smarty'), 'plugins_paths', []) as $plugins) { $this->smarty->addPluginsDir($plugins); } - $this->smarty->error_reporting = E_ALL - E_NOTICE; + $this->smarty->error_reporting = E_ALL & ~E_NOTICE; $this->smarty->assign('serverroot', url('/')); @@ -201,12 +210,7 @@ class BasePage */ public function show403($from_admin = false): void { - header( - 'Location: '. - ($from_admin ? str_replace('/admin', '', WWW_TOP) : WWW_TOP). - '/login?redirect='. - urlencode(request()->getRequestUri()) - ); + header('Location: '.($from_admin ? str_replace('/admin', '', WWW_TOP) : WWW_TOP).'/login?redirect='.urlencode(request()->getRequestUri())); exit(); } @@ -295,9 +299,7 @@ class BasePage } // Update last login every 15 mins. - if ((strtotime($this->userdata['now']) - 900) > - strtotime($this->userdata['lastlogin']) - ) { + if ((strtotime($this->userdata['now']) - 900) > strtotime($this->userdata['lastlogin'])) { User::updateSiteAccessed($this->userdata['id']); } @@ -338,10 +340,7 @@ class BasePage public function getSetting($setting) { if (strpos($setting, '.') === false) { - trigger_error( - 'You should update your template to use the newer method "$page->getSettingValue()"" of fetching values from the "settings" table! This method *will* be removed in a future version.', - E_USER_WARNING - ); + trigger_error('You should update your template to use the newer method "$page->getSettingValue()"" of fetching values from the "settings" table! This method *will* be removed in a future version.', E_USER_WARNING); } else { return $this->getSettingValue($setting); } @@ -359,4 +358,105 @@ class BasePage { return Settings::settingValue($setting); } + + /** + * Setup user preferences + * + * + * @throws \Exception + * @throws \SmartyException + */ + public function setUserPrefs() + { + // Tell Smarty which directories to use for templates + $this->smarty->setTemplateDir([ + 'user' => config('ytake-laravel-smarty.template_path').DIRECTORY_SEPARATOR.$this->theme, + 'shared' => config('ytake-laravel-smarty.template_path').'/shared', + 'default' => config('ytake-laravel-smarty.template_path').'/Gentele', + ]); + + $role = User::ROLE_USER; + if (! empty($this->userdata)) { + $role = $this->userdata['user_roles_id']; + } + + $content = new Contents(); + $this->smarty->assign('menulist', Menu::getMenu($role, $this->serverurl)); + $this->smarty->assign('usefulcontentlist', $content->getForMenuByTypeAndRole(Contents::TYPEUSEFUL, $role)); + $this->smarty->assign('articlecontentlist', $content->getForMenuByTypeAndRole(Contents::TYPEARTICLE, $role)); + if ($this->userdata !== null) { + $this->smarty->assign('recentforumpostslist', Forumpost::getPosts(Settings::settingValue('..showrecentforumposts'))); + } + + $this->smarty->assign('main_menu', $this->smarty->fetch('mainmenu.tpl')); + $this->smarty->assign('useful_menu', $this->smarty->fetch('usefullinksmenu.tpl')); + $this->smarty->assign('article_menu', $this->smarty->fetch('articlesmenu.tpl')); + + if (! empty($this->userdata)) { + $parentcatlist = Category::getForMenu($this->userdata['categoryexclusions'], $this->userdata['rolecategoryexclusions']); + } else { + $parentcatlist = Category::getForMenu(); + } + + $this->smarty->assign('parentcatlist', $parentcatlist); + $this->smarty->assign('catClass', Category::class); + $searchStr = ''; + if ($this->page === 'search' && request()->has('id')) { + $searchStr = request()->input('id'); + } + $this->smarty->assign('header_menu_search', $searchStr); + + if (request()->has('t')) { + $this->smarty->assign('header_menu_cat', request()->input('t')); + } else { + $this->smarty->assign('header_menu_cat', ''); + } + $header_menu = $this->smarty->fetch('headermenu.tpl'); + $this->smarty->assign('header_menu', $header_menu); + } + + /** + * + */ + public function setAdminPrefs() + { + // Tell Smarty which directories to use for templates + $this->smarty->setTemplateDir( + [ + 'admin' => config('ytake-laravel-smarty.template_path').'/admin', + 'shared' => config('ytake-laravel-smarty.template_path').'/shared', + 'default' => config('ytake-laravel-smarty.template_path').'/admin', + ] + ); + + $this->smarty->assign('catClass', Category::class); + } + + /** + * Output the page. + */ + public function pagerender(): void + { + $this->smarty->assign('page', $this); + $this->page_template = 'basepage.tpl'; + + $this->render(); + } + + /** + * Output a page using the admin template. + * + * @throws \Exception + */ + public function adminrender(): void + { + $this->smarty->assign('page', $this); + + $admin_menu = $this->smarty->fetch('adminmenu.tpl'); + $this->smarty->assign('admin_menu', $admin_menu); + + $this->page_template = 'baseadminpage.tpl'; + + $this->render(); + } } diff --git a/Blacklight/http/Page.php b/Blacklight/http/Page.php deleted file mode 100644 index 1727ca541..000000000 --- a/Blacklight/http/Page.php +++ /dev/null @@ -1,85 +0,0 @@ -smarty->setTemplateDir( - [ - 'user' => config('ytake-laravel-smarty.template_path').DIRECTORY_SEPARATOR.$this->theme, - 'shared' => config('ytake-laravel-smarty.template_path').'/shared', - 'default' => config('ytake-laravel-smarty.template_path').'/Gentele', - ] - ); - - $role = User::ROLE_USER; - if (! empty($this->userdata)) { - $role = $this->userdata['user_roles_id']; - } - - $content = new Contents(); - $this->smarty->assign('menulist', Menu::getMenu($role, $this->serverurl)); - $this->smarty->assign('usefulcontentlist', $content->getForMenuByTypeAndRole(Contents::TYPEUSEFUL, $role)); - $this->smarty->assign('articlecontentlist', $content->getForMenuByTypeAndRole(Contents::TYPEARTICLE, $role)); - if ($this->userdata !== null) { - $this->smarty->assign('recentforumpostslist', Forumpost::getPosts(Settings::settingValue('..showrecentforumposts'))); - } - - $this->smarty->assign('main_menu', $this->smarty->fetch('mainmenu.tpl')); - $this->smarty->assign('useful_menu', $this->smarty->fetch('usefullinksmenu.tpl')); - $this->smarty->assign('article_menu', $this->smarty->fetch('articlesmenu.tpl')); - - if (! empty($this->userdata)) { - $parentcatlist = Category::getForMenu($this->userdata['categoryexclusions'], $this->userdata['rolecategoryexclusions']); - } else { - $parentcatlist = Category::getForMenu(); - } - - $this->smarty->assign('parentcatlist', $parentcatlist); - $this->smarty->assign('catClass', Category::class); - $searchStr = ''; - if ($this->page === 'search' && request()->has('id')) { - $searchStr = request()->input('id'); - } - $this->smarty->assign('header_menu_search', $searchStr); - - if (request()->has('t')) { - $this->smarty->assign('header_menu_cat', request()->input('t')); - } else { - $this->smarty->assign('header_menu_cat', ''); - } - $header_menu = $this->smarty->fetch('headermenu.tpl'); - $this->smarty->assign('header_menu', $header_menu); - } - - /** - * Output the page. - */ - public function render() - { - $this->smarty->assign('page', $this); - $this->page_template = 'basepage.tpl'; - - parent::render(); - } -} diff --git a/Changelog b/Changelog index 5ae35e983..097dd2aba 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-03-28 DariusIII + * Chg: Remove Page and AdminPage classes, adjust pages accordingly * Chg: Update font-awesome to version 5.0.9 2018-03-27 DariusIII * Chg: Update session, .htaccess and env.example diff --git a/public/admin/ajax.php b/public/admin/ajax.php index b770910c9..dc3bee478 100644 --- a/public/admin/ajax.php +++ b/public/admin/ajax.php @@ -6,7 +6,9 @@ use Blacklight\Regexes; use Blacklight\Sharing; use Blacklight\Binaries; use App\Models\ReleaseComment; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; + +$page = new BasePage(); // This script waits for ajax queries from the web. @@ -14,7 +16,6 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma // Make sure the user is an admin and logged in. $pdo = new DB(); -$page = new AdminPage(); if (! request()->has('action')) { exit(); diff --git a/public/admin/ajax_regex.php b/public/admin/ajax_regex.php index a6b4b76a4..b0b252f87 100644 --- a/public/admin/ajax_regex.php +++ b/public/admin/ajax_regex.php @@ -4,10 +4,9 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Regexes; use Blacklight\Binaries; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -// Login Check -$page = new AdminPage; +$page = new BasePage(); if (! request()->has('action')) { exit(); diff --git a/public/admin/ajax_sharing_settings.php b/public/admin/ajax_sharing_settings.php index 6214c9678..c6ac3d32a 100644 --- a/public/admin/ajax_sharing_settings.php +++ b/public/admin/ajax_sharing_settings.php @@ -5,10 +5,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\db\DB; use Blacklight\Sharing; use App\Models\ReleaseComment; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; + +$page = new BasePage(); -// Login check. -$page = new AdminPage; $db = new DB(); if (request()->has('site_ID') && request()->has('site_status')) { diff --git a/public/admin/anidb-edit.php b/public/admin/anidb-edit.php index 3cb59baca..9e8b5e5d0 100644 --- a/public/admin/anidb-edit.php +++ b/public/admin/anidb-edit.php @@ -3,10 +3,12 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\AniDB; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; + +$page = new BasePage(); +$page->setAdminPrefs(); $AniDB = new AniDB(['Settings' => $page->pdo]); -$page = new AdminPage(); $id = 0; // Set the current action. @@ -52,4 +54,4 @@ switch ($action) { $page->title = 'Edit AniDB Data'; $page->content = $page->smarty->fetch('anidb-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/anidb-list.php b/public/admin/anidb-list.php index 4eb20317e..4ed87e6fb 100644 --- a/public/admin/anidb-list.php +++ b/public/admin/anidb-list.php @@ -2,10 +2,12 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\AniDB; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; + +$page = new BasePage(); +$page->setAdminPrefs(); $AniDB = new AniDB(); -$page = new AdminPage(); $page->title = 'AniDB List'; $aname = ''; @@ -31,4 +33,4 @@ $anidblist = $AniDB->getAnimeRange($offset, config('nntmux.items_per_page'), $an $page->smarty->assign('anidblist', $anidblist); $page->content = $page->smarty->fetch('anidb-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/anidb-remove.php b/public/admin/anidb-remove.php index c262d7ef5..20c305121 100644 --- a/public/admin/anidb-remove.php +++ b/public/admin/anidb-remove.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Release; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $success = false; @@ -17,4 +18,4 @@ $page->smarty->assign('success', $success); $page->title = 'Remove anidbID from Releases'; $page->content = $page->smarty->fetch('anidb-remove.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/binaryblacklist-edit.php b/public/admin/binaryblacklist-edit.php index 9b6d8d89c..6a67c01fb 100644 --- a/public/admin/binaryblacklist-edit.php +++ b/public/admin/binaryblacklist-edit.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use App\Models\Category; use Blacklight\Binaries; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $bin = new Binaries(['Settings' => $page->pdo]); $error = ''; $regex = ['id' => '', 'groupname' => '', 'regex' => '', 'description' => '', 'msgcol' => 1, 'status' => 1, 'optype' => 1]; @@ -77,4 +78,4 @@ $page->smarty->assign( ); $page->content = $page->smarty->fetch('binaryblacklist-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/binaryblacklist-list.php b/public/admin/binaryblacklist-list.php index 64cc2d382..e68ad9ad3 100644 --- a/public/admin/binaryblacklist-list.php +++ b/public/admin/binaryblacklist-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Binaries; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $bin = new Binaries(); $page->title = 'Binary Black/Whitelist List'; @@ -14,4 +15,4 @@ $binlist = $bin->getBlacklist(false); $page->smarty->assign('binlist', $binlist); $page->content = $page->smarty->fetch('binaryblacklist-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/book-edit.php b/public/admin/book-edit.php index 419d7efe6..34b718b41 100644 --- a/public/admin/book-edit.php +++ b/public/admin/book-edit.php @@ -4,10 +4,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Books; use Blacklight\Genres; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Carbon; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $book = new Books(); $gen = new Genres(); $id = 0; @@ -51,4 +52,4 @@ if (request()->has('id')) { } $page->content = $page->smarty->fetch('book-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/book-list.php b/public/admin/book-list.php index 50074e4ef..67c1315b9 100644 --- a/public/admin/book-list.php +++ b/public/admin/book-list.php @@ -3,10 +3,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Books; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Blacklight\utility\Utility; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $book = new Books(); $page->title = 'Book List'; @@ -31,4 +32,4 @@ $bookList = Utility::getRange('bookinfo', $offset, config('nntmux.items_per_page $page->smarty->assign('booklist', $bookList); $page->content = $page->smarty->fetch('book-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/category-edit.php b/public/admin/category-edit.php index d0792facb..7cbd1ceb8 100644 --- a/public/admin/category-edit.php +++ b/public/admin/category-edit.php @@ -1,11 +1,12 @@ setAdminPrefs(); $id = 0; // set the current action @@ -38,4 +39,4 @@ $page->smarty->assign('status_ids', [Category::STATUS_ACTIVE, Category::STATUS_I $page->smarty->assign('status_names', ['Yes', 'No']); $page->content = $page->smarty->fetch('category-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/category-list.php b/public/admin/category-list.php index b8fdeb2d0..5dd3d0500 100644 --- a/public/admin/category-list.php +++ b/public/admin/category-list.php @@ -1,11 +1,12 @@ setAdminPrefs(); $page->title = 'Category List'; $categorylist = Category::getFlat(); @@ -13,4 +14,4 @@ $categorylist = Category::getFlat(); $page->smarty->assign('categorylist', $categorylist); $page->content = $page->smarty->fetch('category-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/category_regexes-edit.php b/public/admin/category_regexes-edit.php index 3fb33aa38..6bdaf95e1 100644 --- a/public/admin/category_regexes-edit.php +++ b/public/admin/category_regexes-edit.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Regexes; use App\Models\Category; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $regexes = new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'category_regexes']); // Set the current action. @@ -83,4 +84,4 @@ $page->smarty->assign('category_names', $categories['category_names']); $page->smarty->assign('category_ids', $categories['category_ids']); $page->content = $page->smarty->fetch('category_regexes-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/category_regexes-list.php b/public/admin/category_regexes-list.php index 0f02cad34..98c34abd6 100644 --- a/public/admin/category_regexes-list.php +++ b/public/admin/category_regexes-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Regexes; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $regexes = new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'category_regexes']); $page->title = 'Category Regex List'; @@ -29,4 +30,4 @@ $page->smarty->assign( $page->smarty->assign('pager', $page->smarty->fetch('pager.tpl')); $page->content = $page->smarty->fetch('category_regexes-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/collection_regexes-edit.php b/public/admin/collection_regexes-edit.php index a4f09a917..ecc1ac046 100644 --- a/public/admin/collection_regexes-edit.php +++ b/public/admin/collection_regexes-edit.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Regexes; use App\Models\Category; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $regexes = new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'collection_regexes']); $error = ''; $regex = ['id' => '', 'regex' => '', 'description' => '', 'group_regex' => '', 'ordinal' => '', 'status' => 1]; @@ -59,4 +60,4 @@ $page->smarty->assign('status_ids', [Category::STATUS_ACTIVE, Category::STATUS_I $page->smarty->assign('status_names', ['Yes', 'No']); $page->content = $page->smarty->fetch('collection_regexes-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/collection_regexes-list.php b/public/admin/collection_regexes-list.php index 52c04a74b..ceaa4aa2d 100644 --- a/public/admin/collection_regexes-list.php +++ b/public/admin/collection_regexes-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Regexes; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $regexes = new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'collection_regexes']); $page->title = 'Collections Regex List'; @@ -28,4 +29,4 @@ $page->smarty->assign( $page->smarty->assign('pager', $page->smarty->fetch('pager.tpl')); $page->content = $page->smarty->fetch('collection_regexes-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/collection_regexes-test.php b/public/admin/collection_regexes-test.php index b2d170937..2418db825 100644 --- a/public/admin/collection_regexes-test.php +++ b/public/admin/collection_regexes-test.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Regexes; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'Collections Regex Test'; $group = trim(request()->has('group') && ! empty(request()->input('group')) ? request()->input('group') : ''); @@ -18,4 +19,4 @@ if ($group && $regex) { } $page->content = $page->smarty->fetch('collection_regexes-test.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/comments-list.php b/public/admin/comments-list.php index fd8c27221..2f627055c 100644 --- a/public/admin/comments-list.php +++ b/public/admin/comments-list.php @@ -1,11 +1,12 @@ setAdminPrefs(); $page->title = 'Comments List'; @@ -24,4 +25,4 @@ $commentslist = ReleaseComment::getCommentsRange($offset, config('nntmux.items_p $page->smarty->assign('commentslist', $commentslist); $page->content = $page->smarty->fetch('comments-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/console-edit.php b/public/admin/console-edit.php index dc43bc769..960ef1566 100644 --- a/public/admin/console-edit.php +++ b/public/admin/console-edit.php @@ -4,10 +4,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Genres; use Blacklight\Console; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Carbon; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $console = new Console(['Settings' => $page->pdo]); $gen = new Genres(); $id = 0; @@ -54,4 +55,4 @@ if (request()->has('id')) { } $page->content = $page->smarty->fetch('console-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/console-list.php b/public/admin/console-list.php index a03556e8e..525b90098 100644 --- a/public/admin/console-list.php +++ b/public/admin/console-list.php @@ -3,10 +3,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Console; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Blacklight\utility\Utility; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $con = new Console(['Settings' => $page->pdo]); $page->title = 'Console List'; @@ -31,4 +32,4 @@ $consoleList = Utility::getRange('consoleinfo', $offset, config('nntmux.items_pe $page->smarty->assign('consolelist', $consoleList); $page->content = $page->smarty->fetch('console-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/content-add.php b/public/admin/content-add.php index cc72c4673..e17dd7b39 100644 --- a/public/admin/content-add.php +++ b/public/admin/content-add.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use App\Models\User; use Blacklight\Contents; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $contents = new Contents(); $id = 0; @@ -74,4 +75,4 @@ $rolelist = ['0' => 'Everyone', '1' => 'Logged in Users', '2' => 'Admins']; $page->smarty->assign('rolelist', $rolelist); $page->content = $page->smarty->fetch('content-add.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/content-list.php b/public/admin/content-list.php index 68f7d3e82..ab4f4353d 100644 --- a/public/admin/content-list.php +++ b/public/admin/content-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Contents; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $contents = new Contents(); $contentlist = $contents->getAll(); $page->smarty->assign('contentlist', $contentlist); @@ -13,4 +14,4 @@ $page->smarty->assign('contentlist', $contentlist); $page->title = 'Content List'; $page->content = $page->smarty->fetch('content-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/failrel-list.php b/public/admin/failrel-list.php index 4493aa07f..14fb90198 100644 --- a/public/admin/failrel-list.php +++ b/public/admin/failrel-list.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use App\Models\Release; use App\Models\DnzbFailure; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'Failed Releases List'; @@ -29,4 +30,4 @@ $frellist = Release::getFailedRange($offset, config('nntmux.items_per_page')); $page->smarty->assign('releaselist', $frellist); $page->content = $page->smarty->fetch('failrel-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/game-edit.php b/public/admin/game-edit.php index f501d5844..788beb6a6 100644 --- a/public/admin/game-edit.php +++ b/public/admin/game-edit.php @@ -4,10 +4,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Games; use Blacklight\Genres; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Carbon; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $games = new Games(['Settings' => $page->pdo]); $gen = new Genres(['Settings' => $page->pdo]); $id = 0; @@ -54,4 +55,4 @@ if (request()->has('id')) { } $page->content = $page->smarty->fetch('game-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/game-list.php b/public/admin/game-list.php index 0da51722d..74065198c 100644 --- a/public/admin/game-list.php +++ b/public/admin/game-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Games; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $game = new Games(['Settings' => $page->pdo]); $page->title = 'Game List'; @@ -30,4 +31,4 @@ $gamelist = $game->getRange($offset, config('nntmux.items_per_page')); $page->smarty->assign('gamelist', $gamelist); $page->content = $page->smarty->fetch('game-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/group-bulk.php b/public/admin/group-bulk.php index db44193bd..94aef87b8 100644 --- a/public/admin/group-bulk.php +++ b/public/admin/group-bulk.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Group; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); // set the current action $action = request()->input('action') ?? 'view'; @@ -27,4 +28,4 @@ $page->smarty->assign('yesno_names', ['Yes', 'No']); $page->title = 'Bulk Add Newsgroups'; $page->content = $page->smarty->fetch('group-bulk.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/group-edit.php b/public/admin/group-edit.php index 3e5c345a5..f721cd84f 100644 --- a/public/admin/group-edit.php +++ b/public/admin/group-edit.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Group; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $id = 0; @@ -58,4 +59,4 @@ $page->smarty->assign('yesno_names', ['Yes', 'No']); $page->smarty->assign('group', $group); $page->content = $page->smarty->fetch('group-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/group-list-active.php b/public/admin/group-list-active.php index 60b1efa8d..da4e7bed9 100644 --- a/public/admin/group-list-active.php +++ b/public/admin/group-list-active.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Group; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $gname = ''; if (! empty(request()->input('groupname'))) { $gname = request()->input('groupname'); @@ -34,4 +35,4 @@ $page->smarty->assign('grouplist', $grouplist); $page->title = 'Group List'; $page->content = $page->smarty->fetch('group-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/group-list-inactive.php b/public/admin/group-list-inactive.php index f23db56ea..a38608419 100644 --- a/public/admin/group-list-inactive.php +++ b/public/admin/group-list-inactive.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Group; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $gname = ''; if (! empty(request()->input('groupname'))) { @@ -35,4 +36,4 @@ $page->smarty->assign('grouplist', $grouplist); $page->title = 'Group List'; $page->content = $page->smarty->fetch('group-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/group-list.php b/public/admin/group-list.php index 130cc68c1..7deb770ea 100644 --- a/public/admin/group-list.php +++ b/public/admin/group-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Group; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $groupName = request()->input('groupname') ?? ''; $offset = request()->input('offset') ?? 0; @@ -25,4 +26,4 @@ $page->smarty->assign('pager', $page->smarty->fetch('pager.tpl')); $page->title = 'Group List'; $page->content = $page->smarty->fetch('group-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/index.php b/public/admin/index.php index 5746c58a3..446045bec 100644 --- a/public/admin/index.php +++ b/public/admin/index.php @@ -1,11 +1,13 @@ setAdminPrefs(); $page->title = 'Admin Hangout'; $page->content = $page->smarty->fetch('index.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/menu-edit.php b/public/admin/menu-edit.php index 6feada014..16a479219 100644 --- a/public/admin/menu-edit.php +++ b/public/admin/menu-edit.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use App\Models\Menu; use App\Models\UserRole; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $id = 0; @@ -53,4 +54,4 @@ $page->smarty->assign('role_ids', array_keys($roles)); $page->smarty->assign('role_names', $roles); $page->content = $page->smarty->fetch('menu-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/menu-list.php b/public/admin/menu-list.php index cf0f00028..a9e55f316 100644 --- a/public/admin/menu-list.php +++ b/public/admin/menu-list.php @@ -1,11 +1,12 @@ setAdminPrefs(); $page->title = 'Menu List'; @@ -13,4 +14,4 @@ $menulist = Menu::getAll(); $page->smarty->assign('menulist', $menulist); $page->content = $page->smarty->fetch('menu-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/movie-add.php b/public/admin/movie-add.php index c0e028dbc..3c6f95377 100644 --- a/public/admin/movie-add.php +++ b/public/admin/movie-add.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Movie; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $movie = new Movie(['Settings' => $page->pdo]); $id = 0; @@ -24,4 +25,4 @@ if (request()->has('id') && ctype_digit(request()->input('id')) && strlen(reques } $page->content = $page->smarty->fetch('movie-add.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/movie-edit.php b/public/admin/movie-edit.php index f22b84cc8..47dba7d9c 100644 --- a/public/admin/movie-edit.php +++ b/public/admin/movie-edit.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Movie; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $movie = new Movie(); $id = 0; @@ -72,4 +73,4 @@ if (request()->has('id')) { } $page->content = $page->smarty->fetch('movie-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/movie-list.php b/public/admin/movie-list.php index 4d63f36d6..6192bd4bc 100644 --- a/public/admin/movie-list.php +++ b/public/admin/movie-list.php @@ -3,10 +3,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Movie; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Blacklight\utility\Utility; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $movie = new Movie(['Settings' => $page->pdo]); @@ -30,4 +31,4 @@ $movieList = Utility::getRange('movieinfo', $offset, config('nntmux.items_per_pa $page->smarty->assign('movielist', $movieList); $page->content = $page->smarty->fetch('movie-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/music-edit.php b/public/admin/music-edit.php index 1cdcca4f0..64ae5e6f7 100644 --- a/public/admin/music-edit.php +++ b/public/admin/music-edit.php @@ -4,10 +4,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Music; use Blacklight\Genres; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Carbon; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $music = new Music(); $gen = new Genres(); $id = 0; @@ -54,4 +55,4 @@ if (request()->has('id')) { } $page->content = $page->smarty->fetch('music-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/music-list.php b/public/admin/music-list.php index e7edf9025..b232565aa 100644 --- a/public/admin/music-list.php +++ b/public/admin/music-list.php @@ -3,10 +3,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Music; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Blacklight\utility\Utility; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $music = new Music(); $page->title = 'Music List'; @@ -31,4 +32,4 @@ $musicList = Utility::getRange('musicinfo', $offset, config('nntmux.items_per_pa $page->smarty->assign('musiclist', $musicList); $page->content = $page->smarty->fetch('music-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/nzb-export.php b/public/admin/nzb-export.php index 60e51cade..0bb2a220f 100644 --- a/public/admin/nzb-export.php +++ b/public/admin/nzb-export.php @@ -4,14 +4,15 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Releases; use Blacklight\NZBExport; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; if (\Blacklight\utility\Utility::isCLI()) { exit('This script is only for exporting from the web, use the script in misc/testing'. PHP_EOL); } -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $rel = new Releases(['Settings' => $page->pdo]); if ($page->isPostBack()) { @@ -68,4 +69,4 @@ $page->smarty->assign( ] ); $page->content = $page->smarty->fetch('nzb-export.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/nzb-import.php b/public/admin/nzb-import.php index 03ba65dc6..3622a32fd 100644 --- a/public/admin/nzb-import.php +++ b/public/admin/nzb-import.php @@ -8,9 +8,10 @@ if (PHP_SAPI === 'cli') { require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\NZBImport; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $filesToProcess = []; if ($page->isPostBack()) { @@ -57,4 +58,4 @@ if ($page->isPostBack()) { $page->title = 'Import Nzbs'; $page->content = $page->smarty->fetch('nzb-import.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/opcachestats.php b/public/admin/opcachestats.php index b912174c5..927542cc7 100644 --- a/public/admin/opcachestats.php +++ b/public/admin/opcachestats.php @@ -3,11 +3,12 @@ /* #newznab-tmux */ -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $NNURL = $page->serverurl; diff --git a/public/admin/posters-edit.php b/public/admin/posters-edit.php index 98618274e..7d6ddcac8 100644 --- a/public/admin/posters-edit.php +++ b/public/admin/posters-edit.php @@ -2,11 +2,12 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use App\Models\MultigroupPoster; use Blacklight\processing\ProcessReleasesMultiGroup; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $relPosters = new ProcessReleasesMultiGroup(['Settings' => $page->pdo]); // Set the current action. @@ -39,4 +40,4 @@ switch ($action) { } $page->content = $page->smarty->fetch('posters-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/posters-list.php b/public/admin/posters-list.php index e1a3105c9..e1097fd33 100644 --- a/public/admin/posters-list.php +++ b/public/admin/posters-list.php @@ -2,10 +2,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use App\Models\MultigroupPoster; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $posters = MultigroupPoster::all('id', 'poster')->sortBy('poster'); @@ -23,4 +24,4 @@ $page->smarty->assign( $page->title = 'MultiGroup Posters List'; $page->content = $page->smarty->fetch('posters-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/predb.php b/public/admin/predb.php index 04a45ec48..a92c1c333 100644 --- a/public/admin/predb.php +++ b/public/admin/predb.php @@ -1,11 +1,12 @@ setAdminPrefs(); $offset = (request()->has('offset') && ctype_digit(request()->input('offset'))) ? request()->input('offset') : 0; @@ -33,4 +34,4 @@ $page->meta_keywords = 'view,predb,info,description,details'; $page->meta_description = 'View PreDb info'; $page->content = $page->smarty->fetch('predb.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/release-delete.php b/public/admin/release-delete.php index 96340c216..6a99bd59a 100644 --- a/public/admin/release-delete.php +++ b/public/admin/release-delete.php @@ -3,9 +3,9 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Releases; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); if (request()->has('id')) { $releases = new Releases(['Settings' => $page->pdo]); $releases->deleteMultiple(request()->input('id')); diff --git a/public/admin/release-edit.php b/public/admin/release-edit.php index 636fc2ebe..48b5be22b 100644 --- a/public/admin/release-edit.php +++ b/public/admin/release-edit.php @@ -5,9 +5,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use App\Models\Release; use App\Models\Category; use Blacklight\Releases; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $releases = new Releases(['Settings' => $page->pdo]); $id = 0; @@ -53,4 +54,4 @@ $page->smarty->assign('yesno_names', ['Yes', 'No']); $page->smarty->assign('catlist', Category::getForSelect(false)); $page->content = $page->smarty->fetch('release-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/release-files.php b/public/admin/release-files.php index b29db7278..7b7b1ec9c 100644 --- a/public/admin/release-files.php +++ b/public/admin/release-files.php @@ -6,9 +6,12 @@ use Blacklight\NZB; use Blacklight\db\DB; use App\Models\Release; use App\Models\Settings; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; + +$page = new BasePage(); +$page->setAdminPrefs(); + -$page = new AdminPage; $pdo = new DB(); $nzb = new NZB(); @@ -40,5 +43,5 @@ if (request()->has('id')) { $page->meta_description = 'View Nzb File List'; $page->content = $page->smarty->fetch('release-files.tpl'); - $page->render(); + $page->adminrender(); } diff --git a/public/admin/release-list.php b/public/admin/release-list.php index e32b074a6..3fe705902 100644 --- a/public/admin/release-list.php +++ b/public/admin/release-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Release; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'Release List'; @@ -28,4 +29,4 @@ $releaselist = Release::getReleasesRange($offset, config('nntmux.items_per_page' $page->smarty->assign('releaselist', $releaselist); $page->content = $page->smarty->fetch('release-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/release_naming_regexes-edit.php b/public/admin/release_naming_regexes-edit.php index 798840ce2..ad7a2c7f4 100644 --- a/public/admin/release_naming_regexes-edit.php +++ b/public/admin/release_naming_regexes-edit.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Regexes; use App\Models\Category; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $regexes = new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'release_naming_regexes']); // Set the current action. @@ -60,4 +61,4 @@ $page->smarty->assign('status_names', ['Yes', 'No']); $page->smarty->assign('regex', $regex); $page->content = $page->smarty->fetch('release_naming_regexes-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/release_naming_regexes-list.php b/public/admin/release_naming_regexes-list.php index b5e1bfa85..48cf5b032 100644 --- a/public/admin/release_naming_regexes-list.php +++ b/public/admin/release_naming_regexes-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Regexes; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $regexes = new Regexes(['Settings' => $page->pdo, 'Table_Name' => 'release_naming_regexes']); $page->title = 'Release Naming Regex List'; @@ -29,4 +30,4 @@ $page->smarty->assign('pagerquerybase', WWW_TOP.'/release_naming_regexes-list.ph $page->smarty->assign('pager', $page->smarty->fetch('pager.tpl')); $page->content = $page->smarty->fetch('release_naming_regexes-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/release_naming_regexes-test.php b/public/admin/release_naming_regexes-test.php index ba0c51617..b7f4938a3 100644 --- a/public/admin/release_naming_regexes-test.php +++ b/public/admin/release_naming_regexes-test.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\Regexes; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'Release Naming Regex Test'; $group = trim(request()->has('group') && ! empty(request()->input('group')) ? request()->input('group') : ''); @@ -19,4 +20,4 @@ if ($group && $regex) { } $page->content = $page->smarty->fetch('release_naming_regexes-test.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/role-edit.php b/public/admin/role-edit.php index 15f84f564..5820dc75c 100644 --- a/public/admin/role-edit.php +++ b/public/admin/role-edit.php @@ -4,10 +4,11 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use App\Models\Category; use App\Models\UserRole; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use App\Models\RoleExcludedCategory; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); // Get the user roles. $userRoles = UserRole::getRoles(); @@ -64,4 +65,4 @@ $page->smarty->assign('yesno_names', ['Yes', 'No']); $page->smarty->assign('catlist', Category::getForSelect(false)); $page->content = $page->smarty->fetch('role-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/role-list.php b/public/admin/role-list.php index 66ebba29a..ec9ca39f3 100644 --- a/public/admin/role-list.php +++ b/public/admin/role-list.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\UserRole; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'User Role List'; @@ -15,4 +16,4 @@ $userroles = UserRole::getRoles(); $page->smarty->assign('userroles', $userroles); $page->content = $page->smarty->fetch('role-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/sharing.php b/public/admin/sharing.php index ef503cf59..dc0fadc70 100644 --- a/public/admin/sharing.php +++ b/public/admin/sharing.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use Blacklight\db\DB; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'Sharing Settings'; @@ -68,4 +69,4 @@ $page->smarty->assign('pager', $pager); $page->smarty->assign(['local' => $ourSite, 'sites' => $allSites]); $page->content = $page->smarty->fetch('sharing.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/show-edit.php b/public/admin/show-edit.php index 9f519137a..87c8c990f 100755 --- a/public/admin/show-edit.php +++ b/public/admin/show-edit.php @@ -1,12 +1,13 @@ setAdminPrefs(); $tv = new smartyTV(['Settings' => $page->pdo]); switch (request()->input('action') ?? 'view') { @@ -35,4 +36,4 @@ $page->smarty->assign('show', $show); $page->title = 'Edit TV Show Data'; $page->content = $page->smarty->fetch('show-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/show-list.php b/public/admin/show-list.php index c3af70a98..e159d03a3 100755 --- a/public/admin/show-list.php +++ b/public/admin/show-list.php @@ -1,11 +1,12 @@ setAdminPrefs(); $page->title = 'TV Shows List'; @@ -27,4 +28,4 @@ $page->smarty->assign( $page->smarty->assign('pager', $page->smarty->fetch('pager.tpl')); $page->content = $page->smarty->fetch('show-list.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/show-remove.php b/public/admin/show-remove.php index 500522fcd..b458f0019 100755 --- a/public/admin/show-remove.php +++ b/public/admin/show-remove.php @@ -3,9 +3,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; use App\Models\Release; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $success = false; @@ -18,4 +19,4 @@ $page->smarty->assign('success', $success); $page->title = 'Remove Video and Episode IDs from Releases'; $page->content = $page->smarty->fetch('show-remove.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/site-edit.php b/public/admin/site-edit.php index 9691469f2..9c1a53820 100644 --- a/public/admin/site-edit.php +++ b/public/admin/site-edit.php @@ -6,10 +6,11 @@ use Blacklight\Sites; use Blacklight\SABnzbd; use App\Models\Category; use App\Models\Settings; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Blacklight\utility\Utility; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $sites = new Sites(); $id = 0; @@ -166,4 +167,4 @@ if (strpos(env('NNTP_SERVER'), 'astra') === false) { } $page->content = $page->smarty->fetch('site-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/site-stats.php b/public/admin/site-stats.php index a6e467a93..b4048a67c 100644 --- a/public/admin/site-stats.php +++ b/public/admin/site-stats.php @@ -6,9 +6,10 @@ use App\Models\User; use App\Models\Release; use App\Models\Category; use App\Models\UserRole; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'Site Stats'; @@ -33,4 +34,4 @@ $page->smarty->assign('totusers', 0); $page->smarty->assign('totrusers', 0); $page->content = $page->smarty->fetch('site-stats.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/tmux-edit.php b/public/admin/tmux-edit.php index c8cbe922a..4682fa7b4 100644 --- a/public/admin/tmux-edit.php +++ b/public/admin/tmux-edit.php @@ -4,9 +4,10 @@ require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/sma use Blacklight\Tmux; use App\Models\Settings; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $tmux = new Tmux(); $id = 0; @@ -59,4 +60,4 @@ $page->smarty->assign('predb_ids', [0, 1]); $page->smarty->assign('predb_names', ['Disabled', 'Enabled']); $page->content = $page->smarty->fetch('tmux-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/user-edit.php b/public/admin/user-edit.php index ea395ba75..d68577aca 100644 --- a/public/admin/user-edit.php +++ b/public/admin/user-edit.php @@ -6,10 +6,11 @@ use App\Models\User; use App\Models\UserRole; use App\Models\Invitation; use App\Mail\AccountChange; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Facades\Mail; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $user = [ 'id' => '', @@ -131,4 +132,4 @@ $page->smarty->assign('role_names', $roles); $page->smarty->assign('user', $user); $page->content = $page->smarty->fetch('user-edit.tpl'); -$page->render(); +$page->adminrender(); diff --git a/public/admin/user-list.php b/public/admin/user-list.php index 4a206fc2b..bbfa4d039 100644 --- a/public/admin/user-list.php +++ b/public/admin/user-list.php @@ -2,11 +2,12 @@ use App\Models\User; use App\Models\UserRole; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; require_once dirname(__DIR__, 2).DIRECTORY_SEPARATOR.'resources/views/themes/smarty.php'; -$page = new AdminPage(); +$page = new BasePage(); +$page->setAdminPrefs(); $page->title = 'User List'; @@ -58,7 +59,7 @@ foreach ($ordering as $orderType) { $page->smarty->assign('pager', $page->smarty->fetch('pager.tpl')); $page->content = $page->smarty->fetch('user-list.tpl'); -$page->render(); +$page->adminrender(); function checkREQUEST($param) { diff --git a/public/index.php b/public/index.php index 8d83f38cf..3439e63fd 100644 --- a/public/index.php +++ b/public/index.php @@ -1,10 +1,12 @@ setUserPrefs(); if ($app->isDownForMaintenance()) { $page->showMaintenance(); diff --git a/public/pages/.htaccess b/public/pages/.htaccess index 3418e55a6..14249c50b 100644 --- a/public/pages/.htaccess +++ b/public/pages/.htaccess @@ -1 +1 @@ -deny from all \ No newline at end of file +Deny from all \ No newline at end of file diff --git a/public/pages/ajax_release-admin.php b/public/pages/ajax_release-admin.php index ac437d48b..6601604ca 100644 --- a/public/pages/ajax_release-admin.php +++ b/public/pages/ajax_release-admin.php @@ -3,13 +3,13 @@ use App\Models\Release; use App\Models\Category; use Blacklight\Releases; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Facades\Auth; if (! Auth::check()) { $page->show403(); } -$page = new AdminPage(); +$page = new BasePage(); $releases = new Releases(['Settings' => $page->settings]); // Set the current action. diff --git a/public/pages/ajax_resetusergrabs-admin.php b/public/pages/ajax_resetusergrabs-admin.php index 4d74c30f2..e3d684d4e 100644 --- a/public/pages/ajax_resetusergrabs-admin.php +++ b/public/pages/ajax_resetusergrabs-admin.php @@ -2,14 +2,14 @@ use App\Models\UserRequest; use App\Models\UserDownload; -use Blacklight\http\AdminPage; +use Blacklight\http\BasePage; use Illuminate\Support\Facades\Auth; if (! Auth::check()) { $page->show403(); } -$page = new AdminPage(); +$page = new BasePage(); $action = request()->input('action') ?? ''; $id = request()->input('id') ?? ''; diff --git a/public/pages/anime.php b/public/pages/anime.php index bd12d124a..49678ee8a 100755 --- a/public/pages/anime.php +++ b/public/pages/anime.php @@ -53,7 +53,7 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { $page->meta_description = 'View '.$aniDbInfo['title'].' Anime'; } $page->content = $page->smarty->fetch('viewanime.tpl'); - $page->render(); + $page->pagerender(); } else { $letter = (request()->has('id') && preg_match('/^(0\-9|[A-Z])$/i', request()->input('id'))) ? request()->input('id') : @@ -92,5 +92,5 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { $page->smarty->assign('animetitle', $animeTitle); $page->content = $page->smarty->fetch('viewanimelist.tpl'); - $page->render(); + $page->pagerender(); } diff --git a/public/pages/apihelp.php b/public/pages/apihelp.php index bd53a79f2..5138c4029 100644 --- a/public/pages/apihelp.php +++ b/public/pages/apihelp.php @@ -12,4 +12,4 @@ $page->meta_keywords = 'view,nzb,api,details,help,json,rss,atom'; $page->meta_description = 'View description of the site Nzb Api.'; $page->content = $page->smarty->fetch('apidesc.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/bookmodal.php b/public/pages/bookmodal.php index 173c5eed3..863d93ddd 100644 --- a/public/pages/bookmodal.php +++ b/public/pages/bookmodal.php @@ -34,6 +34,6 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { if ($modal) { echo $page->content; } else { - $page->render(); + $page->pagerender(); } } diff --git a/public/pages/books.php b/public/pages/books.php index 6c5a82dd8..abaa1c25a 100644 --- a/public/pages/books.php +++ b/public/pages/books.php @@ -84,4 +84,4 @@ $page->meta_keywords = 'browse,nzb,books,description,details'; $page->meta_description = 'Browse for Books'; $page->content = $page->smarty->fetch('books.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/browse.php b/public/pages/browse.php index 8dc0fd822..9673c3a77 100644 --- a/public/pages/browse.php +++ b/public/pages/browse.php @@ -87,4 +87,4 @@ $page->meta_keywords = 'browse,nzb,description,details'; $page->meta_description = 'Browse for Nzbs'; $page->content = $page->smarty->fetch('browse.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/browsegroup.php b/public/pages/browsegroup.php index 5faab4e34..b56976595 100644 --- a/public/pages/browsegroup.php +++ b/public/pages/browsegroup.php @@ -15,4 +15,4 @@ $page->meta_keywords = 'browse,groups,description,details'; $page->meta_description = 'Browse groups'; $page->content = $page->smarty->fetch('browsegroup.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/btc_payment.php b/public/pages/btc_payment.php index 7e0599bf9..79e369c9f 100644 --- a/public/pages/btc_payment.php +++ b/public/pages/btc_payment.php @@ -52,4 +52,4 @@ $page->meta_title = 'Become a supporter'; $page->meta_description = 'Become a supporter'; $page->content = $page->smarty->fetch('btc_payment.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/cart.php b/public/pages/cart.php index 8b5e176e2..f49b5fe87 100644 --- a/public/pages/cart.php +++ b/public/pages/cart.php @@ -44,5 +44,5 @@ if (request()->has('add')) { $page->smarty->assign('results', $results); $page->content = $page->smarty->fetch('cart.tpl'); - $page->render(); + $page->pagerender(); } diff --git a/public/pages/console.php b/public/pages/console.php index 3a2031ea3..9ad1d8e53 100644 --- a/public/pages/console.php +++ b/public/pages/console.php @@ -95,4 +95,4 @@ $page->meta_keywords = 'browse,nzb,console,games,description,details'; $page->meta_description = 'Browse for Console Games'; $page->content = $page->smarty->fetch('console.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/consolemodal.php b/public/pages/consolemodal.php index 63ca1ebf1..468240fbe 100644 --- a/public/pages/consolemodal.php +++ b/public/pages/consolemodal.php @@ -33,6 +33,6 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { if ($modal) { echo $page->content; } else { - $page->render(); + $page->pagerender(); } } diff --git a/public/pages/contact-us.php b/public/pages/contact-us.php index 9f3bd7c26..9c9f5d996 100644 --- a/public/pages/contact-us.php +++ b/public/pages/contact-us.php @@ -33,4 +33,4 @@ $page->meta_description = 'Contact us at '.Settings::settingValue('site.main.tit $page->content = $page->smarty->fetch('contact.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/content.php b/public/pages/content.php index 1419685d3..946708130 100644 --- a/public/pages/content.php +++ b/public/pages/content.php @@ -63,4 +63,4 @@ if (empty($content)) { $page->smarty->assign('content', $content); $page->content = $page->smarty->fetch('content.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/details.php b/public/pages/details.php index 505249277..a56d96bd0 100644 --- a/public/pages/details.php +++ b/public/pages/details.php @@ -165,5 +165,5 @@ if (request()->has('id')) { $page->meta_description = 'View NZB for'.$data['searchname']; $page->content = $page->smarty->fetch('viewnzb.tpl'); - $page->render(); + $page->pagerender(); } diff --git a/public/pages/filelist.php b/public/pages/filelist.php index 8c8b33770..b10eeefa0 100644 --- a/public/pages/filelist.php +++ b/public/pages/filelist.php @@ -45,6 +45,6 @@ if (request()->has('id')) { if ($modal) { echo $page->content; } else { - $page->render(); + $page->pagerender(); } } diff --git a/public/pages/forgottenpassword.php b/public/pages/forgottenpassword.php index 55bf9c9f2..1895817ad 100644 --- a/public/pages/forgottenpassword.php +++ b/public/pages/forgottenpassword.php @@ -92,4 +92,4 @@ $page->meta_keywords = 'forgotten,password,signup,registration'; $page->meta_description = 'Forgotten Password'; $page->content = $page->smarty->fetch('forgottenpassword.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/forum.php b/public/pages/forum.php index 6e687c77a..00f16a271 100644 --- a/public/pages/forum.php +++ b/public/pages/forum.php @@ -57,4 +57,4 @@ $page->meta_keywords = 'forum,chat,posts'; $page->meta_description = 'Forum'; $page->content = $page->smarty->fetch('forum.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/forumpost.php b/public/pages/forumpost.php index f04c9e6b1..6269e81ec 100644 --- a/public/pages/forumpost.php +++ b/public/pages/forumpost.php @@ -28,4 +28,4 @@ $page->smarty->assign('results', $results); $page->smarty->assign('privateprofiles', (int) Settings::settingValue('..privateprofiles') === 1); $page->content = $page->smarty->fetch('forumpost.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/games.php b/public/pages/games.php index bb4990bc6..d684fdddb 100644 --- a/public/pages/games.php +++ b/public/pages/games.php @@ -103,4 +103,4 @@ $page->meta_keywords = 'browse,nzb,games,description,details'; $page->meta_description = 'Browse for Games'; $page->content = $page->smarty->fetch('games.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/login.php b/public/pages/login.php index c9049760f..896818d0e 100644 --- a/public/pages/login.php +++ b/public/pages/login.php @@ -6,4 +6,4 @@ $page->meta_title = 'Login'; $page->meta_keywords = 'Login'; $page->meta_description = 'Login'; $page->content = $page->smarty->fetch('login.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/movie.php b/public/pages/movie.php index 76289b5ae..1175fb28c 100644 --- a/public/pages/movie.php +++ b/public/pages/movie.php @@ -33,8 +33,8 @@ if (request()->has('modal') && request()->has('id') && ctype_digit(request()->in echo $page->content; } else { $page->content = $page->smarty->fetch('viewmoviefull.tpl'); - $page->render(); + $page->pagerender(); } } else { - $page->render(); + $page->pagerender(); } diff --git a/public/pages/movies.php b/public/pages/movies.php index b2cc3163a..cac94defb 100644 --- a/public/pages/movies.php +++ b/public/pages/movies.php @@ -114,4 +114,4 @@ if (request()->has('imdb')) { } else { $page->content = $page->smarty->fetch('movies.tpl'); } -$page->render(); +$page->pagerender(); diff --git a/public/pages/movietrailer.php b/public/pages/movietrailer.php index a1537e45a..6d410b11d 100644 --- a/public/pages/movietrailer.php +++ b/public/pages/movietrailer.php @@ -35,6 +35,6 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { if ($modal) { echo $page->content; } else { - $page->render(); + $page->pagerender(); } } diff --git a/public/pages/music.php b/public/pages/music.php index 5c9af6802..1542669b4 100644 --- a/public/pages/music.php +++ b/public/pages/music.php @@ -95,4 +95,4 @@ $page->meta_keywords = 'browse,nzb,albums,description,details'; $page->meta_description = 'Browse for Albums'; $page->content = $page->smarty->fetch('music.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/musicmodal.php b/public/pages/musicmodal.php index d16dd75dd..828d6abad 100644 --- a/public/pages/musicmodal.php +++ b/public/pages/musicmodal.php @@ -30,6 +30,6 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { if ($modal) { echo $page->content; } else { - $page->render(); + $page->pagerender(); } } diff --git a/public/pages/mymovies.php b/public/pages/mymovies.php index f8050d993..3962c321b 100755 --- a/public/pages/mymovies.php +++ b/public/pages/mymovies.php @@ -74,7 +74,7 @@ switch ($action) { $page->smarty->assign('imdbid', $imdbid); $page->smarty->assign('movie', $movie); $page->content = $page->smarty->fetch('mymovies-add.tpl'); - $page->render(); + $page->pagerender(); } break; case 'edit': @@ -107,7 +107,7 @@ switch ($action) { $page->smarty->assign('imdbid', $imdbid); $page->smarty->assign('movie', $movie); $page->content = $page->smarty->fetch('mymovies-add.tpl'); - $page->render(); + $page->pagerender(); } break; case 'browse': @@ -149,7 +149,7 @@ switch ($action) { $page->smarty->assign('movies', true); $page->content = $page->smarty->fetch('browse.tpl'); - $page->render(); + $page->pagerender(); break; default: @@ -185,6 +185,6 @@ switch ($action) { $page->smarty->assign('movies', $results); $page->content = $page->smarty->fetch('mymovies.tpl'); - $page->render(); + $page->pagerender(); break; } diff --git a/public/pages/myshows.php b/public/pages/myshows.php index f0da40e73..5a66da751 100755 --- a/public/pages/myshows.php +++ b/public/pages/myshows.php @@ -72,7 +72,7 @@ switch ($action) { $page->smarty->assign('video', $videoId); $page->smarty->assign('show', $show); $page->content = $page->smarty->fetch('myshows-add.tpl'); - $page->render(); + $page->pagerender(); } break; case 'edit': @@ -105,7 +105,7 @@ switch ($action) { $page->smarty->assign('video', $videoId); $page->smarty->assign('show', $show); $page->content = $page->smarty->fetch('myshows-add.tpl'); - $page->render(); + $page->pagerender(); } break; case 'browse': @@ -147,7 +147,7 @@ switch ($action) { $page->smarty->assign('shows', true); $page->content = $page->smarty->fetch('browse.tpl'); - $page->render(); + $page->pagerender(); break; default: @@ -183,6 +183,6 @@ switch ($action) { $page->smarty->assign('shows', $results); $page->content = $page->smarty->fetch('myshows.tpl'); - $page->render(); + $page->pagerender(); break; } diff --git a/public/pages/nfo.php b/public/pages/nfo.php index 20733545b..304983ef1 100644 --- a/public/pages/nfo.php +++ b/public/pages/nfo.php @@ -38,6 +38,6 @@ if (request()->has('id')) { if ($modal) { echo $page->content; } else { - $page->render(); + $page->pagerender(); } } diff --git a/public/pages/nzbvortex.php b/public/pages/nzbvortex.php index c57545c1a..9499e31f0 100644 --- a/public/pages/nzbvortex.php +++ b/public/pages/nzbvortex.php @@ -72,4 +72,4 @@ try { $page->title = 'NZBVortex'; $page->content = $page->smarty->fetch('nzbvortex.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/post_edit.php b/public/pages/post_edit.php index d5771e75e..04e2ed895 100644 --- a/public/pages/post_edit.php +++ b/public/pages/post_edit.php @@ -28,4 +28,4 @@ $page->meta_description = 'Edit forum post'; $page->smarty->assign('result', $result); $page->content = $page->smarty->fetch('post_edit.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/profile.php b/public/pages/profile.php index 7a7725378..3e45bc37f 100644 --- a/public/pages/profile.php +++ b/public/pages/profile.php @@ -99,4 +99,4 @@ $page->meta_keywords = 'view,profile,user,details'; $page->meta_description = 'View User Profile for '.$data['username']; $page->content = $page->smarty->fetch('profile.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/profileedit.php b/public/pages/profileedit.php index f7a3338a9..04370549f 100644 --- a/public/pages/profileedit.php +++ b/public/pages/profileedit.php @@ -158,4 +158,4 @@ $page->smarty->assign('cp_api_selected', $data['cp_api']); $page->smarty->assign('catlist', Category::getForSelect(false)); $page->content = $page->smarty->fetch('profileedit.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/queue.php b/public/pages/queue.php index f06a8ffc4..0080ed803 100644 --- a/public/pages/queue.php +++ b/public/pages/queue.php @@ -85,4 +85,4 @@ $page->meta_title = 'View'.$queueType.' Queue'; $page->meta_keywords = 'view,'.strtolower($queueType).',queue'; $page->meta_description = 'View'.$queueType.' Queue'; $page->content = $page->smarty->fetch('viewqueue.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/register.php b/public/pages/register.php index e70fceebf..733fd2458 100644 --- a/public/pages/register.php +++ b/public/pages/register.php @@ -126,4 +126,4 @@ $page->meta_keywords = 'register,signup,registration'; $page->meta_description = 'Register'; $page->content = $page->smarty->fetch('register.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/rss-info.php b/public/pages/rss-info.php index dd02402ed..0f851d961 100755 --- a/public/pages/rss-info.php +++ b/public/pages/rss-info.php @@ -25,4 +25,4 @@ if (isset($firstAni['anidbid'])) { } $page->content = $page->smarty->fetch('rssdesc.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/rss.php b/public/pages/rss.php index 3a3188295..56290083c 100755 --- a/public/pages/rss.php +++ b/public/pages/rss.php @@ -42,7 +42,7 @@ if (! request()->has('t') && ! request()->has('show') && ! request()->has('anidb ); $page->content = $page->smarty->fetch('rssdesc.tpl'); - $page->render(); + $page->pagerender(); } else { $rssToken = $uid = -1; // User requested a feed, ensure either logged in or passing a valid token. diff --git a/public/pages/search.php b/public/pages/search.php index f1b9e013f..2df54629c 100644 --- a/public/pages/search.php +++ b/public/pages/search.php @@ -189,4 +189,4 @@ $page->smarty->assign( ); $page->content = $page->smarty->fetch('search.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/series.php b/public/pages/series.php index 7e93e0df9..221dc0094 100644 --- a/public/pages/series.php +++ b/public/pages/series.php @@ -79,7 +79,7 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { $page->smarty->assign('nodata', ''); } $page->content = $page->smarty->fetch('viewseries.tpl'); - $page->render(); + $page->pagerender(); } else { $letter = (request()->has('id') && preg_match('/^(0\-9|[A-Z])$/i', request()->input('id'))) ? request()->input('id') : '0-9'; @@ -114,5 +114,5 @@ if (request()->has('id') && ctype_digit(request()->input('id'))) { $page->smarty->assign('showname', $showname); $page->content = $page->smarty->fetch('viewserieslist.tpl'); - $page->render(); + $page->pagerender(); } diff --git a/public/pages/sitemap.php b/public/pages/sitemap.php index 18a19c849..e24afa19f 100644 --- a/public/pages/sitemap.php +++ b/public/pages/sitemap.php @@ -76,7 +76,7 @@ if (request()->has('type') && request()->input('type') === 'xml') { $page->meta_keywords = 'sitemap,site,map'; $page->meta_description = Settings::settingValue('site.main.title').' site map shows all our pages.'; $page->content = $page->smarty->fetch('sitemap.tpl'); - $page->render(); + $page->pagerender(); } function buildURL($type, $name, $url, $freq = 'daily', $p = '1.0') diff --git a/public/pages/terms-and-conditions.php b/public/pages/terms-and-conditions.php index 1443bd94f..435158db8 100644 --- a/public/pages/terms-and-conditions.php +++ b/public/pages/terms-and-conditions.php @@ -9,4 +9,4 @@ $page->meta_description = 'Terms and Conditions for '.Settings::settingValue('si $page->content = $page->smarty->fetch('terms.tpl'); -$page->render(); +$page->pagerender(); diff --git a/public/pages/xxx.php b/public/pages/xxx.php index 18d089a40..7f7ef0db3 100644 --- a/public/pages/xxx.php +++ b/public/pages/xxx.php @@ -88,4 +88,4 @@ if (request()->has('id')) { } else { $page->content = $page->smarty->fetch('xxx.tpl'); } -$page->render(); +$page->pagerender(); diff --git a/public/pages/xxxmodal.php b/public/pages/xxxmodal.php index f92534d7d..32a82e4b2 100644 --- a/public/pages/xxxmodal.php +++ b/public/pages/xxxmodal.php @@ -33,8 +33,8 @@ if (request()->has('modal') && request()->has('id') && ctype_digit(request()->in echo $page->content; } else { $page->content = $page->smarty->fetch('viewxxxfull.tpl'); - $page->render(); + $page->pagerender(); } } else { - $page->render(); + $page->pagerender(); }