-
-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
197 changed files
with
2,800 additions
and
1,389 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,65 @@ | ||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | ||
|
||
class Debug extends CI_Controller { | ||
function __construct() | ||
{ | ||
parent::__construct(); | ||
function __construct() | ||
{ | ||
parent::__construct(); | ||
|
||
$this->load->model('user_model'); | ||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } | ||
} | ||
/* User Facing Links to Backup URLs */ | ||
public function index() | ||
{ | ||
if(!$this->user_model->authorize(2)) { $this->session->set_flashdata('notice', 'You\'re not allowed to do that!'); redirect('dashboard'); } | ||
} | ||
|
||
/* User Facing Links to Backup URLs */ | ||
public function index() | ||
{ | ||
$this->load->helper('file'); | ||
|
||
$this->load->model('MigrationVersion'); | ||
|
||
$data['migration_version'] = $this->MigrationVersion->getMigrationVersion(); | ||
|
||
// Test writing to backup folder | ||
if ( ! write_file('backup/myfile.txt', "dummydata")) | ||
{ | ||
$data['backup_folder'] = false; | ||
} | ||
else | ||
{ | ||
if(unlink(realpath('backup/myfile.txt'))) { | ||
$data['backup_folder'] = true; | ||
} else { | ||
$data['backup_folder'] = false; | ||
} | ||
} | ||
$backup_folder = $this->is_really_writable('backup'); | ||
$data['backup_folder'] = $backup_folder; | ||
|
||
// Test writing to updates folder | ||
if ( ! write_file('updates/myfile.txt', "dummydata")) | ||
{ | ||
$data['updates_folder'] = false; | ||
} | ||
else | ||
{ | ||
if(unlink(realpath('updates/myfile.txt'))) { | ||
$data['updates_folder'] = true; | ||
} else { | ||
$data['updates_folder'] = false; | ||
} | ||
} | ||
$updates_folder = $this->is_really_writable('updates'); | ||
$data['updates_folder'] = $updates_folder; | ||
|
||
// Test writing to uploads folder | ||
if ( ! write_file('uploads/myfile.txt', "dummydata")) | ||
{ | ||
$data['uploads_folder'] = false; | ||
} | ||
else | ||
{ | ||
if(unlink(realpath('uploads/myfile.txt'))) { | ||
$data['uploads_folder'] = true; | ||
} else { | ||
$data['uploads_folder'] = false; | ||
} | ||
} | ||
$uploads_folder = $this->is_really_writable('uploads'); | ||
$data['uploads_folder'] = $uploads_folder; | ||
|
||
$data['page_title'] = "Debug"; | ||
|
||
$this->load->view('interface_assets/header', $data); | ||
$this->load->view('debug/main'); | ||
$this->load->view('interface_assets/footer'); | ||
} | ||
|
||
$data['page_title'] = "Debug"; | ||
private function is_really_writable($folder) | ||
{ | ||
// Get the absolute path to the folder | ||
$path = FCPATH . $folder; | ||
|
||
$this->load->view('interface_assets/header', $data); | ||
$this->load->view('debug/main'); | ||
$this->load->view('interface_assets/footer'); | ||
} | ||
// Check if the folder exists | ||
if (!file_exists($path)) { | ||
return false; | ||
} | ||
|
||
// Check if the folder is writable | ||
if (is_writable($path)) { | ||
// Check if the subdirectories are writable (recursive check) | ||
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)); | ||
foreach ($iterator as $item) { | ||
if (!is_writable($item->getPathname())) { | ||
return false; | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
|
||
} | ||
return false; | ||
} | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?php | ||
|
||
defined('BASEPATH') OR exit('No direct script access allowed'); | ||
|
||
$lang['gridsquares_gridsquare_map'] = 'Gridsquare Map'; | ||
$lang['gridsquares_activated_gridsquare_map'] = "Activated Gridsquare Map"; | ||
$lang['gridsquares_gridsquare_activators'] = "Gridsquare Activators"; | ||
|
||
$lang['gridsquares_confirmed_is_green'] = 'Confirmed is Green'; | ||
$lang['gridsquares_worked_but_not_confirmed_is_red'] = 'Worked but not confirmed is Red'; | ||
$lang['gridsquares_activated_but_not_confirmed_is_red'] = 'Activated but not confirmed is Red'; | ||
|
||
$lang['gridsquares_this_map_does_not_include_satellite_internet_or_repeater_qsos'] = 'This map does not include satellite, internet or repeater QSOs'; | ||
|
||
$lang['gridsquares_grid_squares'] = 'grid square'; | ||
$lang['gridsquares_total_count'] = 'Total count'; | ||
|
||
$lang['gridsquares_minimum_count'] = "Minimum Count"; | ||
$lang['gridsquares_show_qsos'] = "Show QSO's"; | ||
$lang['gridsquares_show_map'] = "Show Map"; | ||
$lang['gridsquares_band'] = 'Band'; | ||
$lang['gridsquares_mode'] = 'Mode'; | ||
$lang['gridsquares_sat'] = 'Satellite'; | ||
$lang['gridsquares_confirmation'] = 'Confirmation'; | ||
|
||
$lang['gridsquares_button_plot'] = 'Plot'; | ||
$lang['gridsquares_button_clear_markers'] = "Clear Markers"; | ||
|
||
$lang['gridsquares_gridsquares'] = 'Gridsquares'; | ||
$lang['gridsquares_gridsquares_worked'] = 'Gridsquares worked'; | ||
$lang['gridsquares_gridsquares_confirmed'] = 'Gridsquares confirmed'; | ||
$lang['gridsquares_gridsquares_lotw'] = 'Gridsquares confirmed on LoTW'; | ||
$lang['gridsquares_gridsquares_paper'] = 'Gridsquares confirmed by paper QSL'; | ||
$lang['gridsquares_gridsquares_not_confirmed'] = 'Gridsquares not confirmed'; | ||
$lang['gridsquares_gridsquares_total_worked'] = 'Total gridsquares worked'; | ||
$lang['gridsquares_gridsquares_total_activated'] = 'Total gridsquares activated'; |
Oops, something went wrong.