mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 17:51:40 +09:00
Also apply #2192 fix to document and comment modules; defend null
This commit is contained in:
parent
ce3f5e98d2
commit
433103bf92
3 changed files with 7 additions and 10 deletions
|
|
@ -119,12 +119,10 @@ class CommentModel extends Comment
|
||||||
}
|
}
|
||||||
|
|
||||||
// Changing a language of pop-up menu
|
// Changing a language of pop-up menu
|
||||||
$menus = Context::get('comment_popup_menu_list');
|
$menus = Context::get('comment_popup_menu_list') ?: [];
|
||||||
$menus_count = count($menus);
|
foreach ($menus as $menu)
|
||||||
|
|
||||||
for($i = 0; $i < $menus_count; $i++)
|
|
||||||
{
|
{
|
||||||
$menus[$i]->str = lang($menus[$i]->str);
|
$menu->str = lang($menu->str ?? '');
|
||||||
}
|
}
|
||||||
|
|
||||||
// get a list of final organized pop-up menus
|
// get a list of final organized pop-up menus
|
||||||
|
|
|
||||||
|
|
@ -592,11 +592,10 @@ class DocumentModel extends Document
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Changing the language of pop-up menu
|
// Changing the language of pop-up menu
|
||||||
$menus = Context::get('document_popup_menu_list');
|
$menus = Context::get('document_popup_menu_list') ?: [];
|
||||||
$menus_count = count($menus);
|
foreach ($menus as $menu)
|
||||||
for($i=0;$i<$menus_count;$i++)
|
|
||||||
{
|
{
|
||||||
$menus[$i]->str = lang($menus[$i]->str);
|
$menu->str = lang($menu->str ?? '');
|
||||||
}
|
}
|
||||||
// Wanted to finally clean pop-up menu list
|
// Wanted to finally clean pop-up menu list
|
||||||
$this->add('menus', $menus);
|
$this->add('menus', $menus);
|
||||||
|
|
|
||||||
|
|
@ -336,7 +336,7 @@ class MemberModel extends Member
|
||||||
$menus = Context::get('member_popup_menu_list') ?: [];
|
$menus = Context::get('member_popup_menu_list') ?: [];
|
||||||
foreach ($menus as $menu)
|
foreach ($menus as $menu)
|
||||||
{
|
{
|
||||||
$menu->str = lang($menu->str);
|
$menu->str = lang($menu->str ?? '');
|
||||||
}
|
}
|
||||||
// Get a list of finalized pop-up menu
|
// Get a list of finalized pop-up menu
|
||||||
$this->add('menus', $menus);
|
$this->add('menus', $menus);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue