mirror of
https://github.com/e107inc/e107.git
synced 2025-08-08 23:56:58 +02:00
Make the comments-menu caption support multiple languages.
This commit is contained in:
@@ -133,13 +133,18 @@ if (!$dont_check_update)
|
||||
$LAN_UPDATE_5 = deftrue('LAN_UPDATE_5', "Core database structure");
|
||||
|
||||
|
||||
// $dbupdate['212_to_213'] = array('master'=>false, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('2.1.2','2.1.3')), 'message'=> null, 'hide_when_complete'=>true);
|
||||
|
||||
$dbupdate['706_to_800'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('1.x','2.0')), 'message'=> LAN_UPDATE_29, 'hide_when_complete'=>false);
|
||||
|
||||
$dbupdate['706_to_800'] = array('master'=>true, 'title'=> e107::getParser()->lanVars($LAN_UPDATE_4, array('1.x','2.0')), 'message'=> LAN_UPDATE_29, 'hide_when_complete'=>true);
|
||||
|
||||
|
||||
// always run these last.
|
||||
$dbupdate['core_database'] = array('master'=>false, 'title'=> $LAN_UPDATE_5);
|
||||
$dbupdate['core_prefs'] = array('master'=>true, 'title'=> LAN_UPDATE_13); // Prefs check
|
||||
|
||||
|
||||
|
||||
// $dbupdate['70x_to_706'] = LAN_UPDATE_8.' .70x '.LAN_UPDATE_9.' .706';
|
||||
} // End if (!$dont_check_update)
|
||||
|
||||
@@ -542,7 +547,43 @@ function update_core_database($type = '')
|
||||
return $just_check;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @return bool true = no update required, and false if update required.
|
||||
*/
|
||||
function update_212_to_213($type='')
|
||||
{
|
||||
|
||||
$sql = e107::getDb();
|
||||
$log = e107::getLog();
|
||||
$just_check = ($type == 'do') ? false : true;
|
||||
|
||||
// List of changed menu locations.
|
||||
/*
|
||||
$changeMenuPaths = array(
|
||||
|
||||
array('oldpath' => 'comment_menu', 'newpath' => 'comment', 'menu' => 'comment_menu'),
|
||||
);
|
||||
|
||||
if(!empty($changeMenuPaths))
|
||||
{
|
||||
foreach($changeMenuPaths as $val)
|
||||
{
|
||||
$qry = "SELECT menu_path FROM `#menus` WHERE menu_name = '".$val['menu']."' AND (menu_path='".$val['oldpath']."' || menu_path='".$val['oldpath']."/' ) LIMIT 1";
|
||||
if($sql->gen($qry))
|
||||
{
|
||||
if ($just_check) return update_needed('Menu path changed required: '.$val['menu'].' ');
|
||||
$updqry = "menu_path='".$val['newpath']."/' WHERE menu_name = '".$val['menu']."' AND (menu_path='".$val['oldpath']."' || menu_path='".$val['oldpath']."/' ) ";
|
||||
$status = $sql->update('menus', $updqry) ? E_MESSAGE_DEBUG : E_MESSAGE_ERROR;
|
||||
$log->logMessage(LAN_UPDATE_23.'<b>'.$val['menu'].'</b> : '.$val['oldpath'].' => '.$val['newpath'], $status); // LAN_UPDATE_25;
|
||||
// catch_error($sql);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------
|
||||
|
Reference in New Issue
Block a user