mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 05:37:32 +02:00
Code cleanup
This commit is contained in:
@@ -1348,7 +1348,7 @@ if($_POST)
|
||||
$text .= $men->menuVisibilityOptions();
|
||||
$text .= $men->menuInstanceParameters();
|
||||
$text .= $men->menuRenderIframe();
|
||||
$ns -> tablerender(ADLAN_6.SEP.LAN_MENULAYOUT, $text, 'menus_config');
|
||||
$ns -> tablerender(ADLAN_6.SEP.LAN_MENULAYOUT, e107::getMessage()->render(). $text, 'menus_config');
|
||||
}
|
||||
else // Within the IFrame.
|
||||
{
|
||||
@@ -1407,7 +1407,7 @@ require_once("footer.php");
|
||||
function menus_adminmenu()
|
||||
{
|
||||
|
||||
// See admin_shortcodes_class.php - get_admin_menumanager()
|
||||
// See admin_shortcodes.php - sc_admin_menumanager()
|
||||
// required there so it can be shared by plugins.
|
||||
|
||||
}
|
||||
|
@@ -1594,37 +1594,51 @@ class e_menuManager {
|
||||
|
||||
function menuSetConfigList()
|
||||
{
|
||||
e107::getMessage()->addDebug("Scanning for Menu config files");
|
||||
|
||||
$sql = e107::getDb();
|
||||
$pref = e107::getPref();
|
||||
$prev_name = '';
|
||||
$search = array('_menu','_');
|
||||
|
||||
$sql -> select("menus", "*", "menu_location != 0 ORDER BY menu_path,menu_name");
|
||||
while($row = $sql-> fetch())
|
||||
{
|
||||
$link = "";
|
||||
|
||||
extract($row);
|
||||
$id = substr($menu_path,0,-1);
|
||||
$id = substr($row['menu_path'],0,-1);
|
||||
|
||||
if (file_exists(e_PLUGIN."{$menu_path}{$menu_name}_menu_config.php"))
|
||||
if (file_exists(e_PLUGIN."{$row['menu_path']}{$row['menu_name']}_menu_config.php"))
|
||||
{
|
||||
$link = "{$menu_path}{$menu_name}_menu_config.php";
|
||||
$link = $row['menu_path'].$row['menu_name']."_menu_config.php";
|
||||
}
|
||||
|
||||
if(file_exists(e_PLUGIN."{$menu_path}config.php"))
|
||||
if($row['menu_path'] == 'news/')
|
||||
{
|
||||
$link = "{$menu_path}config.php";
|
||||
$row['menu_path'] = "blogcalendar_menu/";
|
||||
}
|
||||
|
||||
if(file_exists(e_PLUGIN.$row['menu_path']."config.php"))
|
||||
{
|
||||
$link = $row['menu_path']."config.php";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($link)
|
||||
{
|
||||
$tmp[$id]['name'] = ucwords(str_replace("_menu","",$menu_name));
|
||||
if(vartrue($prev) == $id && ($tmp[$id]['name']!=$prev_name))
|
||||
|
||||
|
||||
$tmp[$id]['name'] = ucwords(str_replace($search,"",$row['menu_name'])); // remove _
|
||||
|
||||
if(vartrue($prev) == $id && ($tmp[$id]['name'] != $prev_name))
|
||||
{
|
||||
$tmp[$id]['name'] .= ":".$prev_name;
|
||||
}
|
||||
|
||||
$tmp[$id]['link'] = $link;
|
||||
$prev = $id;
|
||||
|
||||
$prev_name = $tmp[$id]['name'];
|
||||
}
|
||||
}
|
||||
@@ -1632,6 +1646,6 @@ class e_menuManager {
|
||||
$pref['menuconfig_list'] = vartrue($tmp);
|
||||
|
||||
e107::getConfig()->setPref($pref)->save(false,true,false);
|
||||
// save_prefs();
|
||||
|
||||
}
|
||||
} // end of Class.
|
||||
|
@@ -35,8 +35,8 @@ $marray = e107::getDate()->terms('month');
|
||||
|
||||
|
||||
// if nr of rows per month is not set, default to 3
|
||||
$months_per_row = $pref['blogcal_mpr']?$pref['blogcal_mpr']:
|
||||
"3";
|
||||
$months_per_row = (!empty($pref['blogcal_mpr'])) ? $pref['blogcal_mpr']: "3";
|
||||
|
||||
$pref['blogcal_ws'] = "monday";
|
||||
|
||||
// -------------------------------------
|
||||
|
@@ -24,20 +24,13 @@ require_once(e_ADMIN."auth.php");
|
||||
$frm = e107::getForm();
|
||||
$mes = e107::getMessage();
|
||||
|
||||
if (isset($_POST['update_menu']))
|
||||
if(!empty($_POST['update_menu']))
|
||||
{
|
||||
$temp = array();
|
||||
while (list($key, $value) = each($_POST))
|
||||
{
|
||||
if ($value != LAN_UPDATE) // ???
|
||||
{
|
||||
$temp[$key] = $value;
|
||||
}
|
||||
}
|
||||
if ($admin_log->logArrayDiffs($temp,$pref,'MISC_06'))
|
||||
{
|
||||
save_prefs();
|
||||
}
|
||||
$cfg = e107::getConfig();
|
||||
$cfg->set('blogcal_mpr', intval($_POST['blogcal_mpr']));
|
||||
$cfg->set('blogcal_padding', intval($_POST['blogcal_padding']));
|
||||
$cfg->save(true,true,true);
|
||||
|
||||
}
|
||||
|
||||
$ns->tablerender($caption, $mes->render() . $text);
|
||||
|
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
|
||||
require_once('../../class2.php');
|
||||
|
||||
if (!getperms('P') || !e107::isInstalled('log'))
|
||||
{
|
||||
header('Location: '.e_BASE.'index.php');
|
||||
@@ -19,6 +20,7 @@ if (!getperms('P') || !e107::isInstalled('log'))
|
||||
|
||||
|
||||
require_once(e_ADMIN.'auth.php');
|
||||
|
||||
require_once(e_HANDLER.'userclass_class.php');
|
||||
$frm = e107::getForm();
|
||||
$mes = e107::getMessage();
|
||||
@@ -240,7 +242,7 @@ if (isset($_POST['updatesettings']))
|
||||
e107::getLog()->add('STAT_02',ADSTAT_L82.$logStr,'');
|
||||
}
|
||||
|
||||
$ns->tablerender($caption, $mes->render() . $text);
|
||||
echo $mes->render() ;
|
||||
|
||||
function gen_select($prompt,$name,$value)
|
||||
{
|
||||
@@ -337,6 +339,7 @@ switch ($action)
|
||||
</div>
|
||||
</form>";
|
||||
|
||||
|
||||
$ns->tablerender(ADSTAT_L16, $text);
|
||||
break; // case config
|
||||
|
||||
|
Reference in New Issue
Block a user