This is a comment on Admin menu v6.2.0, posted by WikiAdmin at 11/25/2025 23:37
View source for Re: Admin menu v6.2.0
It was always possible to set your own bookmarks, new is that the installer pre-sets bookmarks for the admin.
((source:master/src/setup/insert_pages.php setup/insert_pages.php))
%%(php)
<?php
$admin_menu_item =
"INSERT INTO " . $prefix . "menu (
user_id,
page_id,
menu_lang,
menu_title,
menu_position
)
VALUES (
(" . $q_admin_id . "),
(" . $q_page_id . "),
'" . _q($lang) . "',
'" . _q($menu_title) . "',
'" . (int) $menu_position . "'
)" .
(in_array($config_global['db_driver'], ['sqlite', 'sqlite_pdo'])
? "ON CONFLICT(user_id, page_id, menu_lang) DO UPDATE SET
menu_title = excluded.menu_title;"
: "ON DUPLICATE KEY UPDATE
menu_title = '" . _q($menu_title) . "'"
);
if ($set_menu)
{
$insert_data[] = [$admin_menu_item, _t('ErrorInsertDefaultMenuItem')];
}
%%
In the ##set_menu()## function in the Wacko class it does the following:
%%(php)
<?php
if (isset($user['user_id']) && $set != MENU_DEFAULT)
{
$menu = $this->get_user_menu($user['user_id']);
$this->sess->menu_default = false;
}
if (!$menu)
{
$menu = $this->get_default_menu();
$this->sess->menu_default = true;
}
%%