Migrate private variables to protected to allow to extend classes

This commit is contained in:
Diego Najar 2019-01-26 12:50:48 +01:00
parent 8ff877bf37
commit a1a7a7fd38
13 changed files with 28 additions and 22 deletions

View File

@ -285,3 +285,9 @@ $(document).ready(function() {
}); });
}); });
</script> </script>
<script>
// Open the tab defined in the URL
const anchor = window.location.hash;
$(`a[href="${anchor}"]`).tab('show');
</script>

View File

@ -2,7 +2,7 @@
class Block { class Block {
private $vars; protected $vars;
function __construct($key) function __construct($key)
{ {

View File

@ -3,7 +3,7 @@
class Blocks extends dbJSON class Blocks extends dbJSON
{ {
// Fields allowed for a row in the database // Fields allowed for a row in the database
private $dbFields = array( protected $dbFields = array(
'title'=>'', 'title'=>'',
'value'=>'', 'value'=>'',
'description'=>'' 'description'=>''

View File

@ -2,7 +2,7 @@
class Category { class Category {
private $vars; protected $vars;
function __construct($key) function __construct($key)
{ {

View File

@ -2,7 +2,7 @@
class Login { class Login {
private $users; protected $users;
function __construct() function __construct()
{ {

View File

@ -2,8 +2,8 @@
class Pages extends dbJSON { class Pages extends dbJSON {
private $parentKeyList = array(); protected $parentKeyList = array();
private $dbFields = array( protected $dbFields = array(
'title'=>'', 'title'=>'',
'description'=>'', 'description'=>'',
'username'=>'', 'username'=>'',

View File

@ -2,7 +2,7 @@
class Page { class Page {
private $vars; protected $vars;
function __construct($key) function __construct($key)
{ {

View File

@ -2,7 +2,7 @@
class Security extends dbJSON class Security extends dbJSON
{ {
private $dbFields = array( protected $dbFields = array(
'minutesBlocked'=>5, 'minutesBlocked'=>5,
'numberFailuresAllowed'=>10, 'numberFailuresAllowed'=>10,
'blackList'=>array() 'blackList'=>array()

View File

@ -2,7 +2,7 @@
class Syslog extends dbJSON { class Syslog extends dbJSON {
public $dbFields = array( protected $dbFields = array(
'date'=> array('inFile'=>false, 'value'=>''), 'date'=> array('inFile'=>false, 'value'=>''),
'dictionaryKey'=> array('inFile'=>false, 'value'=>''), 'dictionaryKey'=> array('inFile'=>false, 'value'=>''),
'notes'=> array('inFile'=>false, 'value'=>''), 'notes'=> array('inFile'=>false, 'value'=>''),

View File

@ -2,7 +2,7 @@
class Tag { class Tag {
private $vars; protected $vars;
function __construct($key) function __construct($key)
{ {

View File

@ -2,16 +2,16 @@
class Url class Url
{ {
private $uri; protected $uri;
private $uriStrlen; protected $uriStrlen;
private $whereAmI; protected $whereAmI;
private $slug; protected $slug;
private $filters; // Filters for the URI protected $filters; // Filters for the URI
private $notFound; protected $notFound;
private $parameters; protected $parameters;
private $activeFilter; protected $activeFilter;
private $httpCode; protected $httpCode;
private $httpMessage; protected $httpMessage;
function __construct() function __construct()
{ {

View File

@ -1,7 +1,7 @@
<?php defined('BLUDIT') or die('Bludit CMS.'); <?php defined('BLUDIT') or die('Bludit CMS.');
class User { class User {
private $vars; protected $vars;
function __construct($username) function __construct($username)
{ {

View File

@ -2,7 +2,7 @@
class Users extends dbJSON { class Users extends dbJSON {
public $dbFields = array( protected $dbFields = array(
'firstName'=>'', 'firstName'=>'',
'lastName'=>'', 'lastName'=>'',
'nickname'=>'', 'nickname'=>'',