mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-01 13:17:52 +02:00
Merge PR #545 branch 'brunoais/ticket/10601' into develop
* brunoais/ticket/10601: [ticket/10601] The ORDER BY is only taking space there [ticket/10601] New approach in the update algorithm [ticket/10601] Comment to help understanding the code [ticket/10601] Requested code changes [ticket/10601] Cosmetic code changes [ticket/10601] Database updating code v2 [ticket/10601] Database updating code [ticket/10601] Comment explaning the basename applied to categories [ticket/10601] Correctly access class property [ticket/10601]Move Inbox the default in private messages module
This commit is contained in:
commit
21caf6db6f
phpBB
@ -759,7 +759,26 @@ class p_master
|
||||
}
|
||||
}
|
||||
|
||||
$u_title = $module_url . $delim . 'i=' . (($item_ary['cat']) ? $item_ary['id'] : $item_ary['name'] . (($item_ary['is_duplicate']) ? '&icat=' . $current_id : '') . '&mode=' . $item_ary['mode']);
|
||||
$u_title = $module_url . $delim . 'i=';
|
||||
// if the item has a name use it, else use its id
|
||||
if (empty($item_ary['name']))
|
||||
{
|
||||
$u_title .= $item_ary['id'];
|
||||
}
|
||||
else
|
||||
{
|
||||
// if the category has a name, then use it.
|
||||
$u_title .= $item_ary['name'];
|
||||
}
|
||||
// If the item is not a category append the mode
|
||||
if (!$item_ary['cat'])
|
||||
{
|
||||
if ($item_ary['is_duplicate'])
|
||||
{
|
||||
$u_title .= '&icat=' . $current_id;
|
||||
}
|
||||
$u_title .= '&mode=' . $item_ary['mode'];
|
||||
}
|
||||
|
||||
// Was not allowed in categories before - /*!$item_ary['cat'] && */
|
||||
$u_title .= (isset($item_ary['url_extra'])) ? $item_ary['url_extra'] : '';
|
||||
|
@ -2770,6 +2770,28 @@ function change_database_data(&$no_updates, $version)
|
||||
$config->set('site_home_text', '');
|
||||
}
|
||||
|
||||
// PHPBB3-10601: Make inbox default. Add basename to ucp's pm category
|
||||
|
||||
// Get the category wanted while checking, at the same time, if this has already been applied
|
||||
$sql = 'SELECT module_id, module_basename
|
||||
FROM ' . MODULES_TABLE . "
|
||||
WHERE module_basename <> 'ucp_pm' AND
|
||||
module_langname='UCP_PM'
|
||||
";
|
||||
$result = $db->sql_query_limit($sql, 1);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
// This update is still not applied. Applying it
|
||||
|
||||
$sql = 'UPDATE ' . MODULES_TABLE . "
|
||||
SET module_basename = 'ucp_pm'
|
||||
WHERE module_id = " . (int) $row['module_id'];
|
||||
|
||||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1478,8 +1478,14 @@ class install_install extends module
|
||||
|
||||
foreach ($this->module_categories[$module_class] as $cat_name => $subs)
|
||||
{
|
||||
$basename = '';
|
||||
// Check if this sub-category has a basename. If it has, use it.
|
||||
if (isset($this->module_categories_basenames[$cat_name]))
|
||||
{
|
||||
$basename = $this->module_categories_basenames[$cat_name];
|
||||
}
|
||||
$module_data = array(
|
||||
'module_basename' => '',
|
||||
'module_basename' => $basename,
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => 0,
|
||||
@ -1507,8 +1513,14 @@ class install_install extends module
|
||||
{
|
||||
foreach ($subs as $level2_name)
|
||||
{
|
||||
$basename = '';
|
||||
// Check if this sub-category has a basename. If it has, use it.
|
||||
if (isset($this->module_categories_basenames[$level2_name]))
|
||||
{
|
||||
$basename = $this->module_categories_basenames[$level2_name];
|
||||
}
|
||||
$module_data = array(
|
||||
'module_basename' => '',
|
||||
'module_basename' => $basename,
|
||||
'module_enabled' => 1,
|
||||
'module_display' => 1,
|
||||
'parent_id' => (int) $categories[$cat_name]['id'],
|
||||
@ -2116,6 +2128,9 @@ class install_install extends module
|
||||
'UCP_ZEBRA' => null,
|
||||
),
|
||||
);
|
||||
var $module_categories_basenames = array(
|
||||
'UCP_PM' => 'ucp_pm',
|
||||
);
|
||||
|
||||
var $module_extras = array(
|
||||
'acp' => array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user