Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moves themes entry point logic to the ThemesController and removes the themes.php entry point file. Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
- Loading branch information
1 parent
2bae3aa
commit be95d29
Showing
4 changed files
with
49 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
/** | ||
* @package PhpMyAdmin\Controllers | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace PhpMyAdmin\Controllers; | ||
|
||
use PhpMyAdmin\ThemeManager; | ||
|
||
/** | ||
* Displays list of themes. | ||
* @package PhpMyAdmin\Controllers | ||
*/ | ||
class ThemesController extends AbstractController | ||
{ | ||
/** | ||
* @return string | ||
*/ | ||
public function index(): string | ||
{ | ||
$this->response->getFooter()->setMinimal(); | ||
$header = $this->response->getHeader(); | ||
$header->setBodyId('bodythemes'); | ||
$header->setTitle('phpMyAdmin - ' . __('Theme')); | ||
$header->disableMenuAndConsole(); | ||
|
||
return $this->template->render('themes', [ | ||
'version' => preg_replace( | ||
'/([0-9]*)\.([0-9]*)\..*/', | ||
'\1_\2', | ||
PMA_VERSION | ||
), | ||
'previews' => ThemeManager::getInstance()->getPrintPreviews(), | ||
]); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters