Skip to content

Commit

Permalink
Apply autoloader support for status messages
Browse files Browse the repository at this point in the history
  • Loading branch information
billz committed Sep 16, 2023
1 parent 07b950c commit 33c5961
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 535 deletions.
5 changes: 5 additions & 0 deletions app/css/all.css
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,8 @@ button > i.fas {
pointer-events: none;
}

.close {
font-weight: 400;
font-size: 1.3rem;
}

3 changes: 1 addition & 2 deletions includes/adblock.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

require_once 'includes/status_messages.php';
require_once 'config.php';

/**
Expand All @@ -9,7 +8,7 @@
*/
function DisplayAdBlockConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$enabled = false;
$custom_enabled = false;

Expand Down
4 changes: 1 addition & 3 deletions includes/admin.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?php

require_once 'includes/status_messages.php';

function DisplayAuthConfig($username)
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$auth = new \RaspAP\Auth\HTTPAuth;
$config = $auth->getAuthConfig();
$password = $config['admin_pass'];
Expand Down
3 changes: 1 addition & 2 deletions includes/configure_client.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

require_once 'includes/status_messages.php';
require_once 'includes/wifi_functions.php';

/**
Expand All @@ -9,7 +8,7 @@
*/
function DisplayWPAConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
$networks = [];

getWifiInterface();
Expand Down
2 changes: 1 addition & 1 deletion includes/dashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
function DisplayDashboard(&$extraFooterScripts)
{
getWifiInterface();
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
// Need this check interface name for proper shell execution.
if (!preg_match('/^([a-zA-Z0-9]+)$/', $_SESSION['wifi_client_interface'])) {
$status->addMessage(_('Interface name invalid.'), 'danger');
Expand Down
3 changes: 1 addition & 2 deletions includes/dhcp.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<?php

require_once 'includes/status_messages.php';
require_once 'config.php';

/**
* Manage DHCP configuration
*/
function DisplayDHCPConfig()
{
$status = new StatusMessages();
$status = new \RaspAP\Messages\StatusMessage;
if (!RASPI_MONITOR_ENABLED) {
if (isset($_POST['savedhcpdsettings'])) {
saveDHCPConfig($status);
Expand Down
Loading

0 comments on commit 33c5961

Please sign in to comment.