mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
More php8 compat fixes
This commit is contained in:
@@ -94,7 +94,7 @@ if (isset($_POST['import_file']))
|
||||
}
|
||||
}
|
||||
|
||||
$do = implode($do,",");
|
||||
$do = implode(",",$do);
|
||||
|
||||
//** - end
|
||||
|
||||
|
||||
@@ -272,8 +272,8 @@ if (isset($_GET['delete_sample'])){
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
if (mysql_errno() == 0){echo "<div class='alert alert-warning'>", T_("Sample $sample_import_id was deleted."), "</div>"; }
|
||||
else {echo "<div class='alert alert-warning'>ERROR ".mysql_errno()." ".mysql_error()."\n</div>";}
|
||||
if (mysqli_errno() == 0){echo "<div class='alert alert-warning'>", T_("Sample $sample_import_id was deleted."), "</div>"; }
|
||||
else {echo "<div class='alert alert-warning'>ERROR ".mysqli_errno()." ".mysqli_error()."\n</div>";}
|
||||
}
|
||||
|
||||
unset($_GET['delete_sample']);
|
||||
|
||||
@@ -60,7 +60,7 @@ if (isset($_POST['default']) && isset($_POST['save'])){
|
||||
{
|
||||
$sel[] = $val;
|
||||
}
|
||||
$sel=implode($sel,",");
|
||||
$sel=implode(",",$sel);
|
||||
|
||||
$sql = "UPDATE `outcome` as o
|
||||
SET `default` = 1
|
||||
@@ -108,7 +108,7 @@ if (isset($_POST['qid']) && $_POST['qid'] > 0 && isset($_POST['save'])){
|
||||
}
|
||||
}
|
||||
|
||||
$sel=implode($sel,",");
|
||||
$sel=implode(",",$sel);
|
||||
|
||||
$qid = intval($_POST['qid']);
|
||||
$sql = "UPDATE questionnaire
|
||||
@@ -225,7 +225,7 @@ if (isset($_GET['qid'])) {
|
||||
$do[] = $val;
|
||||
}
|
||||
}
|
||||
$qoutc = implode($do,",");
|
||||
$qoutc = implode(",",$do);
|
||||
|
||||
$sql = "UPDATE questionnaire
|
||||
SET outcomes = '$qoutc'
|
||||
|
||||
@@ -203,7 +203,7 @@ class Calendar
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function Calendar($y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0)
|
||||
function __construct($y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0)
|
||||
{
|
||||
static $cE = null;
|
||||
if (!isset($cE)) {
|
||||
@@ -392,6 +392,19 @@ class Calendar
|
||||
return false;
|
||||
}
|
||||
|
||||
function legacy_each($array){
|
||||
$key = key($array);
|
||||
$value = current($array);
|
||||
$each = is_null($key) ? false : [
|
||||
1 => $value,
|
||||
'value' => $value,
|
||||
0 => $key,
|
||||
'key' => $key,
|
||||
];
|
||||
next($array);
|
||||
return $each;
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterator method for fetching child Calendar subclass objects
|
||||
* (e.g. a minute from an hour object). On reaching the end of
|
||||
@@ -403,7 +416,7 @@ class Calendar
|
||||
*/
|
||||
function fetch()
|
||||
{
|
||||
$child = each($this->children);
|
||||
$child = $this->legacy_each($this->children);
|
||||
if ($child) {
|
||||
return $child['value'];
|
||||
} else {
|
||||
|
||||
@@ -100,9 +100,9 @@ class Calendar_Day extends Calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Day($y, $m, $d)
|
||||
function __construct($y, $m, $d)
|
||||
{
|
||||
parent::Calendar($y, $m, $d);
|
||||
parent::__construct($y, $m, $d);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -229,4 +229,4 @@ class Calendar_Day extends Calendar
|
||||
return $this->empty;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -76,7 +76,7 @@ class Calendar_Decorator
|
||||
*
|
||||
* @param object &$calendar subclass to Calendar to decorate
|
||||
*/
|
||||
function Calendar_Decorator(&$calendar)
|
||||
function __construct(&$calendar)
|
||||
{
|
||||
$this->calendar = & $calendar;
|
||||
}
|
||||
@@ -647,4 +647,4 @@ class Calendar_Decorator
|
||||
return $this->calendar->nextSecond($format);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -79,9 +79,9 @@ class Calendar_Decorator_Textual extends Calendar_Decorator
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Decorator_Textual(&$Calendar)
|
||||
function __construct(&$Calendar)
|
||||
{
|
||||
parent::Calendar_Decorator($Calendar);
|
||||
parent::__construct($Calendar);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -205,4 +205,4 @@ class Calendar_Decorator_Textual extends Calendar_Decorator
|
||||
return Calendar_Util_Textual::orderedWeekdays($this->calendar, $format);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -92,9 +92,9 @@ class Calendar_Decorator_Uri extends Calendar_Decorator
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Decorator_Uri(&$Calendar)
|
||||
function __construct(&$Calendar)
|
||||
{
|
||||
parent::Calendar_Decorator($Calendar);
|
||||
parent::__construct($Calendar);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,4 +180,4 @@ class Calendar_Decorator_Uri extends Calendar_Decorator
|
||||
return $this->Uri->next($this, $method);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -88,9 +88,9 @@ class Calendar_Decorator_Weekday extends Calendar_Decorator
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Decorator_Weekday(&$Calendar)
|
||||
function __construct(&$Calendar)
|
||||
{
|
||||
parent::Calendar_Decorator($Calendar);
|
||||
parent::__construct($Calendar);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -192,4 +192,4 @@ class Calendar_Decorator_Weekday extends Calendar_Decorator
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -71,9 +71,9 @@ class Calendar_Decorator_Wrapper extends Calendar_Decorator
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Decorator_Wrapper(&$Calendar)
|
||||
function __construct(&$Calendar)
|
||||
{
|
||||
parent::Calendar_Decorator($Calendar);
|
||||
parent::__construct($Calendar);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,4 +112,4 @@ class Calendar_Decorator_Wrapper extends Calendar_Decorator
|
||||
return $children;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -80,9 +80,9 @@ class Calendar_Hour extends Calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Hour($y, $m, $d, $h)
|
||||
function __construct($y, $m, $d, $h)
|
||||
{
|
||||
parent::Calendar($y, $m, $d, $h);
|
||||
parent::__construct($y, $m, $d, $h);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,4 +134,4 @@ class Calendar_Hour extends Calendar
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -81,9 +81,9 @@ class Calendar_Minute extends Calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Minute($y, $m, $d, $h, $i)
|
||||
function __construct($y, $m, $d, $h, $i)
|
||||
{
|
||||
parent::Calendar($y, $m, $d, $h, $i);
|
||||
parent::__construct($y, $m, $d, $h, $i);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -135,4 +135,4 @@ class Calendar_Minute extends Calendar
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -79,9 +79,9 @@ class Calendar_Month extends Calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Month($y, $m, $firstDay=null)
|
||||
function __construct($y, $m, $firstDay=null)
|
||||
{
|
||||
parent::Calendar($y, $m);
|
||||
parent::__construct($y, $m);
|
||||
$this->firstDay = $this->defineFirstDayOfWeek($firstDay);
|
||||
}
|
||||
|
||||
@@ -135,4 +135,4 @@ class Calendar_Month extends Calendar
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -108,9 +108,9 @@ class Calendar_Month_Weekdays extends Calendar_Month
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Month_Weekdays($y, $m, $firstDay=null)
|
||||
function __construct($y, $m, $firstDay=null)
|
||||
{
|
||||
parent::Calendar_Month($y, $m, $firstDay);
|
||||
parent::__construct($y, $m, $firstDay);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,4 +212,4 @@ class Calendar_Month_Weekdays extends Calendar_Month
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -100,9 +100,9 @@ class Calendar_Month_Weeks extends Calendar_Month
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Month_Weeks($y, $m, $firstDay=null)
|
||||
function __construct($y, $m, $firstDay=null)
|
||||
{
|
||||
parent::Calendar_Month($y, $m, $firstDay);
|
||||
parent::__construct($y, $m, $firstDay);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -163,4 +163,4 @@ class Calendar_Month_Weeks extends Calendar_Month
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -74,9 +74,9 @@ class Calendar_Second extends Calendar
|
||||
* @param int $i minute e.g. 31
|
||||
* @param int $s second e.g. 45
|
||||
*/
|
||||
function Calendar_Second($y, $m, $d, $h, $i, $s)
|
||||
function __construct($y, $m, $d, $h, $i, $s)
|
||||
{
|
||||
parent::Calendar($y, $m, $d, $h, $i, $s);
|
||||
parent::__construct($y, $m, $d, $h, $i, $s);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -119,4 +119,4 @@ class Calendar_Second extends Calendar
|
||||
return null;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -114,7 +114,7 @@ class Calendar_Table_Helper
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function Calendar_Table_Helper(& $calendar, $firstDay=null)
|
||||
function __construct(& $calendar, $firstDay=null)
|
||||
{
|
||||
$this->calendar = & $calendar;
|
||||
$this->cE = & $calendar->getEngine();
|
||||
@@ -313,4 +313,4 @@ class Calendar_Table_Helper
|
||||
return $this->cE->dateToStamp($y, $m, $d);
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -98,7 +98,7 @@ class Calendar_Util_Uri
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Util_Uri($y, $m=null, $d=null, $h=null, $i=null, $s=null)
|
||||
function __construct($y, $m=null, $d=null, $h=null, $i=null, $s=null)
|
||||
{
|
||||
$this->setFragments($y, $m, $d, $h, $i, $s);
|
||||
}
|
||||
@@ -201,4 +201,4 @@ class Calendar_Util_Uri
|
||||
return $uriString;
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -89,7 +89,7 @@ class Calendar_Validator
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Validator(&$calendar)
|
||||
function __construct(&$calendar)
|
||||
{
|
||||
$this->calendar = & $calendar;
|
||||
$this->cE = & $calendar->getEngine();
|
||||
@@ -261,6 +261,19 @@ class Calendar_Validator
|
||||
return true;
|
||||
}
|
||||
|
||||
function legacy_each($array){
|
||||
$key = key($array);
|
||||
$value = current($array);
|
||||
$each = is_null($key) ? false : [
|
||||
1 => $value,
|
||||
'value' => $value,
|
||||
0 => $key,
|
||||
'key' => $key,
|
||||
];
|
||||
next($array);
|
||||
return $each;
|
||||
}
|
||||
|
||||
/**
|
||||
* Iterates over any validation errors
|
||||
*
|
||||
@@ -269,7 +282,7 @@ class Calendar_Validator
|
||||
*/
|
||||
function fetch()
|
||||
{
|
||||
$error = each($this->errors);
|
||||
$error = $this->legacy_each($this->errors);
|
||||
if ($error) {
|
||||
return $error['value'];
|
||||
} else {
|
||||
@@ -323,7 +336,7 @@ class Calendar_Validation_Error
|
||||
*
|
||||
* @access protected
|
||||
*/
|
||||
function Calendar_Validation_Error($unit, $value, $message)
|
||||
function __construct($unit, $value, $message)
|
||||
{
|
||||
$this->unit = $unit;
|
||||
$this->value = $value;
|
||||
@@ -374,4 +387,4 @@ class Calendar_Validation_Error
|
||||
return $this->unit.' = '.$this->value.' ['.$this->message.']';
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -135,7 +135,7 @@ class Calendar_Week extends Calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Week($y, $m, $d, $firstDay = null)
|
||||
function __construct($y, $m, $d, $firstDay = null)
|
||||
{
|
||||
include_once CALENDAR_ROOT.'Table/Helper.php';
|
||||
parent::Calendar($y, $m, $d);
|
||||
@@ -467,4 +467,4 @@ class Calendar_Week extends Calendar
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -77,9 +77,9 @@ class Calendar_Year extends Calendar
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function Calendar_Year($y)
|
||||
function __construct($y)
|
||||
{
|
||||
parent::Calendar($y);
|
||||
parent::__construct($y);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -137,4 +137,4 @@ class Calendar_Year extends Calendar
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -196,7 +196,7 @@ class Date
|
||||
* @param mixed $date optional - date/time to initialize
|
||||
* @return object Date the new Date object
|
||||
*/
|
||||
function Date($date = null)
|
||||
function __construct($date = null)
|
||||
{
|
||||
$this->tz = Date_TimeZone::getDefault();
|
||||
if (is_null($date)) {
|
||||
@@ -1462,4 +1462,4 @@ class Date
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -150,7 +150,7 @@ class Date_Span
|
||||
* @see set()
|
||||
* @access public
|
||||
*/
|
||||
function Date_Span($time = 0, $format = null)
|
||||
function __construct($time = 0, $format = null)
|
||||
{
|
||||
$this->set($time, $format);
|
||||
}
|
||||
@@ -1080,4 +1080,4 @@ class Date_Span
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
?>
|
||||
?>
|
||||
|
||||
@@ -133,7 +133,7 @@ class Date_TimeZone
|
||||
* @param string $id the time zone id
|
||||
* @return object Date_TimeZone the new Date_TimeZone object
|
||||
*/
|
||||
function Date_TimeZone($id)
|
||||
function __construct($id)
|
||||
{
|
||||
$_DATE_TIMEZONE_DATA =& $GLOBALS['_DATE_TIMEZONE_DATA'];
|
||||
if(Date_TimeZone::isValidID($id)) {
|
||||
@@ -4728,4 +4728,4 @@ if(isset($GLOBALS['_DATE_TIMEZONE_DEFAULT'])
|
||||
* c-hanging-comment-ender-p: nil
|
||||
* End:
|
||||
*/
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user