mirror of
https://github.com/e107inc/e107.git
synced 2025-07-29 19:00:26 +02:00
Merge pull request #3210 from Deltik/fix-3198
Fixes #3198 - Legacy prefs, missing forums
This commit is contained in:
@@ -3934,7 +3934,7 @@ class e_admin_controller_ui extends e_admin_controller
|
|||||||
$keys = array();
|
$keys = array();
|
||||||
foreach($matches[1] AS $k=>$v)
|
foreach($matches[1] AS $k=>$v)
|
||||||
{
|
{
|
||||||
if(varset($matches[3][$k]))
|
if(varset($matches[3][$k]) && !array_key_exists($v, $this->joinAlias))
|
||||||
{
|
{
|
||||||
$this->joinAlias[$v] = $matches[3][$k]; // array. eg $this->joinAlias['core_media'] = 'm';
|
$this->joinAlias[$v] = $matches[3][$k]; // array. eg $this->joinAlias['core_media'] = 'm';
|
||||||
}
|
}
|
||||||
|
@@ -3456,10 +3456,7 @@ class e_tree_model extends e_front_model
|
|||||||
$rowParentID = (int) $row[$sort_parent];
|
$rowParentID = (int) $row[$sort_parent];
|
||||||
|
|
||||||
// Note: This optimization only works if the SQL query executed was ordered by the sort parent.
|
// Note: This optimization only works if the SQL query executed was ordered by the sort parent.
|
||||||
if($nodeID !== $rowParentID)
|
if($rowParentID > $nodeID) break;
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
$node['_children'][] = &$row;
|
$node['_children'][] = &$row;
|
||||||
unset($rows[$key]);
|
unset($rows[$key]);
|
||||||
@@ -3620,7 +3617,7 @@ class e_tree_model extends e_front_model
|
|||||||
return "";
|
return "";
|
||||||
}, $db_query)
|
}, $db_query)
|
||||||
// Optimization goes with e_tree_model::moveRowsToTreeNodes()
|
// Optimization goes with e_tree_model::moveRowsToTreeNodes()
|
||||||
. " ORDER BY " . $this->getParam('sort_parent');
|
. " ORDER BY " . $this->getParam('sort_parent') . "," . $this->getParam('primary_field');
|
||||||
$this->setParam('db_query', $db_query);
|
$this->setParam('db_query', $db_query);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2430,8 +2430,6 @@ class e107forum
|
|||||||
public function upgradeLegacyPrefs()
|
public function upgradeLegacyPrefs()
|
||||||
{
|
{
|
||||||
|
|
||||||
e107::getMessage()->addDebug("Legacy Forum Menu Pref Detected. Upgrading..");
|
|
||||||
|
|
||||||
$legacyMenuPrefs = array(
|
$legacyMenuPrefs = array(
|
||||||
'newforumposts_caption' => 'caption',
|
'newforumposts_caption' => 'caption',
|
||||||
'newforumposts_display' => 'display',
|
'newforumposts_display' => 'display',
|
||||||
@@ -2445,11 +2443,11 @@ class e107forum
|
|||||||
{
|
{
|
||||||
if(e107::getMenu()->setParms('forum','newforumposts_menu', $newPrefs) !== false)
|
if(e107::getMenu()->setParms('forum','newforumposts_menu', $newPrefs) !== false)
|
||||||
{
|
{
|
||||||
e107::getMessage()->addDebug("Sucessfully Migrated newforumposts prefs from core to menu table. ");
|
e107::getMessage()->addDebug("Successfully migrated newforumposts prefs from core to menu table.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
e107::getMessage()->addDebug("Legacy Forum Menu Pref Detected. Upgrading..");
|
e107::getMessage()->addDebug("Legacy Forum menu pref detected. Upgrading...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user