mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 20:30:39 +02:00
Menu Layouts working correctly.
This commit is contained in:
14
class2.php
14
class2.php
@@ -9,8 +9,8 @@
|
|||||||
* General purpose file
|
* General purpose file
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
* $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||||
* $Revision: 1.102 $
|
* $Revision: 1.103 $
|
||||||
* $Date: 2009-07-07 22:56:10 $
|
* $Date: 2009-07-08 01:28:55 $
|
||||||
* $Author: e107coders $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -965,14 +965,17 @@ if(!defined("THEME_LAYOUT"))
|
|||||||
$sql->db_Mark_Time('Start: Get menus');
|
$sql->db_Mark_Time('Start: Get menus');
|
||||||
if(!isset($_E107['no_menus']))
|
if(!isset($_E107['no_menus']))
|
||||||
{
|
{
|
||||||
$menu_data = $e107cache->retrieve_sys("menus_".USERCLASS_LIST."_".md5(e_LANGUAGE));
|
$menu_layout_field = (THEME_LAYOUT != $pref['sitetheme_deflayout']) ? THEME_LAYOUT : "";
|
||||||
|
$menu_data = $e107cache->retrieve_sys("menus_".USERCLASS_LIST."_".md5(e_LANGUAGE.$menu_layout_field));
|
||||||
$menu_data = $eArrayStorage->ReadArray($menu_data);
|
$menu_data = $eArrayStorage->ReadArray($menu_data);
|
||||||
$eMenuList = array();
|
$eMenuList = array();
|
||||||
$eMenuActive = array();
|
$eMenuActive = array();
|
||||||
$eMenuArea = array();
|
$eMenuArea = array();
|
||||||
if(!is_array($menu_data))
|
if(!is_array($menu_data))
|
||||||
{
|
{
|
||||||
if ($sql->db_Select('menus', '*', 'menu_location > 0 AND menu_class IN ('.USERCLASS_LIST.') ORDER BY menu_order'))
|
|
||||||
|
$menu_qry = 'SELECT * FROM #menus WHERE menu_location > 0 AND menu_class IN ('.USERCLASS_LIST.') AND menu_layout = "'.$menu_layout_field.'" ORDER BY menu_order';
|
||||||
|
if ($sql->db_Select_gen($menu_qry))
|
||||||
{
|
{
|
||||||
while ($row = $sql->db_Fetch())
|
while ($row = $sql->db_Fetch())
|
||||||
{
|
{
|
||||||
@@ -987,7 +990,7 @@ if(!isset($_E107['no_menus']))
|
|||||||
$menu_data = $eArrayStorage->WriteArray($menu_data, false);
|
$menu_data = $eArrayStorage->WriteArray($menu_data, false);
|
||||||
$e107cache->set_sys('menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE), $menu_data);
|
$e107cache->set_sys('menus_'.USERCLASS_LIST.'_'.md5(e_LANGUAGE), $menu_data);
|
||||||
|
|
||||||
unset($menu_data);
|
unset($menu_data,$menu_layout_field,$menu_qry);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -996,6 +999,7 @@ if(!isset($_E107['no_menus']))
|
|||||||
$eMenuActive = $menu_data['menu_active'];
|
$eMenuActive = $menu_data['menu_active'];
|
||||||
unset($menu_data);
|
unset($menu_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$sql->db_Mark_Time('(Start: Find/Load Theme)');
|
$sql->db_Mark_Time('(Start: Find/Load Theme)');
|
||||||
|
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/menus.php,v $
|
||||||
| $Revision: 1.19 $
|
| $Revision: 1.20 $
|
||||||
| $Date: 2009-07-07 22:56:11 $
|
| $Date: 2009-07-08 01:28:55 $
|
||||||
| $Author: e107coders $
|
| $Author: e107coders $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -160,7 +160,7 @@ function menuActivate()
|
|||||||
$row=$sql->db_Fetch();
|
$row=$sql->db_Fetch();
|
||||||
//If menu is not already activated in that area, add the record.
|
//If menu is not already activated in that area, add the record.
|
||||||
|
|
||||||
if(!$sql->db_Update('menus', "menu_order='{$menu_count}', menu_location = ".$location." WHERE menu_name='".$row['menu_name']."' AND menu_layout = '$layout' LIMIT 1 "))
|
if(!$sql->db_Select('menus', 'menu_name,menu_path', " menu_name='".$row['menu_name']."' AND menu_layout = '$layout' AND menu_location = ".$location." LIMIT 1 "))
|
||||||
{
|
{
|
||||||
$qry = "
|
$qry = "
|
||||||
INSERT into #menus
|
INSERT into #menus
|
||||||
|
@@ -9,9 +9,9 @@
|
|||||||
* User signup
|
* User signup
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/signup.php,v $
|
* $Source: /cvs_backup/e107_0.8/signup.php,v $
|
||||||
* $Revision: 1.36 $
|
* $Revision: 1.37 $
|
||||||
* $Date: 2009-06-12 20:41:35 $
|
* $Date: 2009-07-08 01:28:55 $
|
||||||
* $Author: e107steved $
|
* $Author: e107coders $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -868,7 +868,8 @@ function render_after_signup($error_message)
|
|||||||
|
|
||||||
if (isset($pref['signup_text_after']) && (strlen($pref['signup_text_after']) > 2))
|
if (isset($pref['signup_text_after']) && (strlen($pref['signup_text_after']) > 2))
|
||||||
{
|
{
|
||||||
$text = $tp->toHTML(str_replace($srch, $repl, $pref['signup_text_after']), TRUE, 'parse_sc,defs')."<br />";
|
$text = str_replace($srch, $repl, $tp->toHTML($pref['signup_text_after'], TRUE, 'parse_sc,defs'))."<br />";
|
||||||
|
// keep str_replace() outside of toHTML to allow for search/replace of dynamic terms within 'defs'.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user