mirror of
https://github.com/tim-krehan/shopping-list.git
synced 2024-11-27 15:40:00 +01:00
fix PHP 8 error requiring construct keyword
This commit is contained in:
parent
b5cebdadfb
commit
871b3e169e
2 changed files with 8 additions and 7 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
class item {
|
||||
public $ID, $Anzahl, $Einheit, $Name, $Erledigt;
|
||||
function item($ID, $Anzahl, $Einheit, $Name, $Erledigt){
|
||||
function __construct($ID, $Anzahl, $Einheit, $Name, $Erledigt){
|
||||
$this->ID = $ID;
|
||||
$this->Anzahl = $Anzahl;
|
||||
$this->Einheit = $Einheit;
|
||||
|
@ -16,7 +16,7 @@
|
|||
array_push($this->list, $current);
|
||||
}
|
||||
|
||||
function shopping(){
|
||||
function __construct(){
|
||||
include $_SESSION["docroot"].'/config/config.php';
|
||||
include $_SESSION["docroot"].'/php/connect.php';
|
||||
$result = $mysqli->query("SELECT * FROM `ViewEinkauf` ORDER BY `ViewEinkauf`.`Name` ASC;");
|
||||
|
@ -132,7 +132,7 @@
|
|||
|
||||
class unit {
|
||||
public $ID, $Name, $Standard;
|
||||
function unit($ID, $Name, $Standard){
|
||||
function __construct($ID, $Name, $Standard){
|
||||
$this->ID = $ID;
|
||||
$this->Name = $Name;
|
||||
$this->Standard = $Standard;
|
||||
|
@ -145,7 +145,7 @@
|
|||
array_push($this->list, $current);
|
||||
}
|
||||
|
||||
function units(){
|
||||
function __construct(){
|
||||
include $_SESSION["docroot"].'/config/config.php';
|
||||
include $_SESSION["docroot"].'/php/connect.php';
|
||||
$result = $mysqli->query("SELECT * FROM `Einheit`;");
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
class unit {
|
||||
public $ID, $Name, $Standard;
|
||||
function __construct(){}
|
||||
}
|
||||
class unitList {
|
||||
public $units = array();
|
||||
|
@ -12,7 +13,7 @@
|
|||
$unit->Standard = $Standard;
|
||||
array_push($this->units, $unit);
|
||||
}
|
||||
function unitList(){
|
||||
function __construct(){
|
||||
include $_SESSION["docroot"].'/php/connect.php';
|
||||
$result = $mysqli->query("SELECT * FROM `Einheit`;");
|
||||
while($item = $result->fetch_assoc()){
|
||||
|
@ -33,7 +34,7 @@
|
|||
|
||||
class ingredient {
|
||||
public $ID, $Menge, $Einheit, $Name;
|
||||
function ingredient($ID, $Menge, $Einheit, $Name){
|
||||
function __construct($ID, $Menge, $Einheit, $Name){
|
||||
$this->ID = $ID;
|
||||
$this->Menge = $Menge;
|
||||
$this->Einheit = $Einheit;
|
||||
|
@ -44,7 +45,7 @@
|
|||
class recipe {
|
||||
public $ID, $Name, $Dauer, $Beschreibung;
|
||||
public $Zutaten = array();
|
||||
function recipe($ID, $Name, $Dauer, $Beschreibung){
|
||||
function __construct($ID, $Name, $Dauer, $Beschreibung){
|
||||
$this->ID = $ID;
|
||||
$this->Name = $Name;
|
||||
$this->Dauer = $Dauer;
|
||||
|
|
Loading…
Reference in a new issue