|
From: <var...@us...> - 2021-07-29 15:46:38
|
Revision: 10394
http://sourceforge.net/p/phpwiki/code/10394
Author: vargenau
Date: 2021-07-29 15:46:37 +0000 (Thu, 29 Jul 2021)
Log Message:
-----------
configurator.php: use __construct
Modified Paths:
--------------
trunk/configurator.php
Modified: trunk/configurator.php
===================================================================
--- trunk/configurator.php 2021-07-29 15:01:20 UTC (rev 10393)
+++ trunk/configurator.php 2021-07-29 15:46:37 UTC (rev 10394)
@@ -1651,7 +1651,6 @@
*/
class _variable
{
-
var $config_item_name;
var $default_value;
var $description;
@@ -1658,7 +1657,7 @@
var $prefix;
var $jscheck;
- function _variable($config_item_name, $default_value = '', $description = '', $jscheck = '')
+ function __construct($config_item_name, $default_value = '', $description = '', $jscheck = '')
{
$this->config_item_name = $config_item_name;
if (!$description)
@@ -1682,7 +1681,7 @@
function _define($config_item_name, $default_value = '', $description = '', $jscheck = '')
{
- $this->_variable($config_item_name, $default_value, $description, $jscheck);
+ _variable::__construct($config_item_name, $default_value, $description, $jscheck);
}
function value()
@@ -1953,9 +1952,9 @@
extends _define
{
- function numeric_define($config_item_name, $default_value = '', $description = '', $jscheck = '')
+ function __construct($config_item_name, $default_value = '', $description = '', $jscheck = '')
{
- $this->_define($config_item_name, $default_value, $description, $jscheck);
+ parent::__construct($config_item_name, $default_value, $description, $jscheck);
if (!$jscheck)
$this->jscheck = "onchange=\"validate_ereg('Sorry, \'%s\' is not an integer.', '^[-+]?[0-9]+$', '" . $this->get_config_item_name() . "', this);\"";
}
@@ -2044,11 +2043,10 @@
class _define_password
extends _define
{
-
- function _define_password($config_item_name, $default_value = '', $description = '', $jscheck = '')
+ function __construct($config_item_name, $default_value = '', $description = '', $jscheck = '')
{
if ($config_item_name == $default_value) $default_value = '';
- $this->_define($config_item_name, $default_value, $description, $jscheck);
+ parent::__construct($config_item_name, $default_value, $description, $jscheck);
if (!$jscheck)
$this->jscheck = "onchange=\"validate_ereg('Sorry, \'%s\' cannot be empty.', '^.+$', '"
. $this->get_config_item_name() . "', this);\"";
@@ -2087,11 +2085,11 @@
extends _define_password
{
- function _define_password_optional($config_item_name, $default_value = '', $description = '', $jscheck = '')
+ function __construct($config_item_name, $default_value = '', $description = '', $jscheck = '')
{
if ($config_item_name == $default_value) $default_value = '';
if (!$jscheck) $this->jscheck = " ";
- $this->_define($config_item_name, $default_value, $description, $jscheck);
+ parent::__construct($config_item_name, $default_value, $description, $jscheck);
}
function _get_config_line($posted_value)
@@ -2128,10 +2126,10 @@
class _variable_password
extends _variable
{
- function _variable_password($config_item_name, $default_value = '', $description = '', $jscheck = '')
+ function __construct($config_item_name, $default_value = '', $description = '', $jscheck = '')
{
if ($config_item_name == $default_value) $default_value = '';
- $this->_define($config_item_name, $default_value, $description, $jscheck);
+ parent::__construct($config_item_name, $default_value, $description, $jscheck);
if (!$jscheck)
$this->jscheck = "onchange=\"validate_ereg('Sorry, \'%s\' cannot be empty.', '^.+$', '" . $this->get_config_item_name() . "', this);\"";
}
@@ -2314,7 +2312,7 @@
extends _define
{
// adds ->values property, instead of ->default_value
- function boolean_define($config_item_name, $values = false, $description = '', $jscheck = '')
+ function __construct($config_item_name, $values = false, $description = '', $jscheck = '')
{
$this->config_item_name = $config_item_name;
if (!$description)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|