mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
update
This commit is contained in:
parent
7f31a842c8
commit
b79bb1980a
3 changed files with 8 additions and 4 deletions
|
@ -79,6 +79,9 @@ class Menu extends ObjectYPT {
|
|||
|
||||
static function getAllActive($type=false) {
|
||||
global $global;
|
||||
if(empty($global)){
|
||||
$global = [];
|
||||
}
|
||||
$sql = "SELECT * FROM ".static::getTableName()." WHERE status = 'active' ";
|
||||
if(!empty($type)){
|
||||
$sql .= " AND type = $type ";
|
||||
|
|
|
@ -18,6 +18,9 @@ class MenuItem extends ObjectYPT {
|
|||
|
||||
static function getAllFromMenu($menu_id, $activeOnly = false, $sort = true) {
|
||||
global $global;
|
||||
if(empty($global)){
|
||||
$global = [];
|
||||
}
|
||||
$menu_id = intval($menu_id);
|
||||
if (empty($menu_id)) {
|
||||
return false;
|
||||
|
@ -54,9 +57,7 @@ class MenuItem extends ObjectYPT {
|
|||
}
|
||||
$rows[] = $row;
|
||||
}
|
||||
} else {
|
||||
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
}
|
||||
return $rows;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue