mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
when migration to 1.7, if url is empty, shortcut type change to 'Y'
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12148 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
e63d71738b
commit
e8b7ba2711
3 changed files with 43 additions and 0 deletions
|
|
@ -38,6 +38,11 @@
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute update
|
||||
* @return Object
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute update
|
||||
* @return Object
|
||||
|
|
@ -57,6 +62,32 @@
|
|||
if(!$oDB->isColumnExists('menu_item', 'is_shortcut'))
|
||||
{
|
||||
$oDB->addColumn('menu_item', 'is_shortcut', 'char', 1, 'N');
|
||||
|
||||
// check empty url and change shortcut type
|
||||
$oMenuAdminModel = &getAdminModel('menu');
|
||||
$output = $oMenuAdminModel->getMenus();
|
||||
|
||||
if(is_array($output))
|
||||
{
|
||||
foreach($output AS $key=>$value)
|
||||
{
|
||||
unset($args);
|
||||
$args->menu_srl = $value->menu_srl;
|
||||
$output2 = executeQueryArray('menu.getMenuItems', $args);
|
||||
if(is_array($output2->data))
|
||||
{
|
||||
foreach($output2->data AS $key2=>$value2)
|
||||
{
|
||||
if($value2->is_shortcut == 'N' && !$value2->url)
|
||||
{
|
||||
$value2->is_shortcut = 'Y';
|
||||
|
||||
$output3 = executeQuery('menu.updateMenuItem', $value2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Object(0, 'success_updated');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue