mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Correct menu-path upgrade issues.
This commit is contained in:
parent
a5ed4c87de
commit
ffdef7ec71
@ -10,9 +10,9 @@
|
||||
* With code from Izydor and Lolo.
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/lancheck.php,v $
|
||||
* $Revision: 1.17 $
|
||||
* $Date: 2009-08-28 16:11:00 $
|
||||
* $Author: marj_nl_fr $
|
||||
* $Revision: 1.18 $
|
||||
* $Date: 2009-10-24 07:52:32 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
require_once("../class2.php");
|
||||
@ -191,7 +191,7 @@ $core_plugins = array(
|
||||
"clock_menu", "comment_menu", "content", 'download', "featurebox", "forum",
|
||||
"gsitemap", "links_page", "linkwords", "list_new", "log", "login_menu",
|
||||
"newforumposts_main", "newsfeed", "newsletter", "online", "other_news_menu",
|
||||
"pdf", "pm", "poll", "rss_menu", "search_menu", "siteinfo_menu", "trackback",
|
||||
"pdf", "pm", "poll", "rss_menu", "search_menu", "siteinfo", "trackback",
|
||||
"tree_menu", "user_menu"
|
||||
);
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
* Administration Area - Languages
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_admin/language.php,v $
|
||||
* $Revision: 1.21 $
|
||||
* $Date: 2009-09-12 17:10:17 $
|
||||
* $Revision: 1.22 $
|
||||
* $Date: 2009-10-24 07:52:32 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
@ -687,7 +687,7 @@ function zip_up_lang($language)
|
||||
"links_page","linkwords","list_new","log","login_menu",
|
||||
"newforumposts_main","newsfeed","newsletter","online",
|
||||
"other_news_menu","pdf","pm","poll","rss_menu",
|
||||
"search_menu","siteinfo_menu","trackback","tree_menu","user_menu","userlanguage_menu",
|
||||
"search_menu","siteinfo","trackback","tree_menu","user_menu","userlanguage_menu",
|
||||
"usertheme_menu"
|
||||
);
|
||||
$core_themes = array("crahan","e107v4a","human_condition","interfectus","jayya",
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_admin/update_routines.php,v $
|
||||
| $Revision: 1.55 $
|
||||
| $Date: 2009-10-22 14:31:28 $
|
||||
| $Revision: 1.56 $
|
||||
| $Date: 2009-10-24 07:52:32 $
|
||||
| $Author: e107coders $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -240,6 +240,7 @@ if (defined('TEST_UPDATE'))
|
||||
function update_706_to_800($type='')
|
||||
{
|
||||
global $sql,$ns, $pref, $admin_log, $e107info;
|
||||
$mes = e107::getMessage();
|
||||
|
||||
// List of unwanted $pref values which can go
|
||||
$obs_prefs = array('frontpage_type','rss_feeds', 'log_lvcount', 'zone', 'upload_allowedfiletype', 'real', 'forum_user_customtitle',
|
||||
@ -272,6 +273,23 @@ function update_706_to_800($type='')
|
||||
'poll' => 'polls'
|
||||
);
|
||||
|
||||
// List of changed menu locations.
|
||||
$changeMenuPaths = array(
|
||||
array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'),
|
||||
array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'compliance_menu'),
|
||||
array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'powered_by_menu'),
|
||||
array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'),
|
||||
array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'counter_menu'),
|
||||
array('oldpath' => 'siteinfo_menu', 'newpath' => 'siteinfo', 'menu' => 'latestnews_menu'),
|
||||
array('oldpath' => 'compliance_menu', 'newpath' => 'siteinfo', 'menu' => 'compliance_menu'),
|
||||
array('oldpath' => 'powered_by_menu', 'newpath' => 'siteinfo', 'menu' => 'powered_by_menu'),
|
||||
array('oldpath' => 'sitebutton_menu', 'newpath' => 'siteinfo', 'menu' => 'sitebutton_menu'),
|
||||
array('oldpath' => 'counter_menu', 'newpath' => 'siteinfo', 'menu' => 'counter_menu'),
|
||||
array('oldpath' => 'usertheme_menu', 'newpath' => 'user_menu', 'menu' => 'usertheme_menu'),
|
||||
array('oldpath' => 'userlanguage_menu', 'newpath' => 'user_menu', 'menu' => 'userlanguage_menu'),
|
||||
array('oldpath' => 'lastseen_menu', 'newpath' => 'online', 'menu' => 'lastseen_menu')
|
||||
);
|
||||
|
||||
|
||||
// List of DB tables (key) and field (value) which need changing to accommodate IPV6 addresses
|
||||
$ip_upgrade = array('comments' => 'comment_ip',
|
||||
@ -362,69 +380,24 @@ function update_706_to_800($type='')
|
||||
|
||||
//TODO de-serialize the user_prefs also.
|
||||
|
||||
//change menu_path for usertheme_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='usertheme_menu' || menu_path='usertheme_menu/'"))
|
||||
// ++++++++ Modify Menu Paths +++++++.
|
||||
if(varset($changeMenuPaths))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='user_menu/' WHERE menu_path='usertheme_menu' || menu_path='usertheme_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_23;
|
||||
catch_error();
|
||||
}
|
||||
|
||||
//change menu_path for userlanguage_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='userlanguage_menu' || menu_path='userlanguage_menu/'"))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='user_menu/' WHERE menu_path='userlanguage_menu' || menu_path='userlanguage_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_24;
|
||||
catch_error();
|
||||
}
|
||||
|
||||
//change menu_path for compliance_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='compliance_menu' || menu_path='compliance_menu/'"))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='siteinfo_menu/' WHERE menu_path='compliance_menu' || menu_path='compliance_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_25;
|
||||
catch_error();
|
||||
}
|
||||
|
||||
//change menu_path for powered_by_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='powered_by_menu' || menu_path='powered_by_menu/'"))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='siteinfo_menu/' WHERE menu_path='powered_by_menu' || menu_path='powered_by_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_26;
|
||||
catch_error();
|
||||
}
|
||||
|
||||
//change menu_path for sitebutton_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='sitebutton_menu' || menu_path='sitebutton_menu/'"))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='siteinfo_menu/' WHERE menu_path='sitebutton_menu' || menu_path='sitebutton_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_27;
|
||||
catch_error();
|
||||
}
|
||||
|
||||
//change menu_path for counter_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='counter_menu' || menu_path='counter_menu/'"))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='siteinfo_menu/' WHERE menu_path='counter_menu' || menu_path='counter_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_28;
|
||||
catch_error();
|
||||
}
|
||||
|
||||
//change menu_path for lastseen_menu
|
||||
if($sql->db_Select("menus", "menu_path", "menu_path='lastseen_menu' || menu_path='lastseen_menu/'"))
|
||||
{
|
||||
if ($just_check) return update_needed();
|
||||
$sql->db_Update("menus", "menu_path='online/' WHERE menu_path='lastseen_menu' || menu_path='lastseen_menu/' ");
|
||||
$updateMessages[] = LAN_UPDATE_29;
|
||||
catch_error();
|
||||
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->db_Select_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']."/' ) ";
|
||||
$sql->db_Update("menus", $updqry);
|
||||
$mes->add('Updating Menu Path for <b>'.$val['menu'].'</b> from '.$val['oldpath'].' => '.$val['newpath'], E_MESSAGE_DEBUG); // LAN_UPDATE_25;
|
||||
// catch_error();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Leave this one here.. just in case..
|
||||
//delete record for online_extended_menu (now only using one online menu)
|
||||
if($sql->db_Select("menus", "*", "menu_path='online_extended_menu' || menu_path='online_extended_menu/'"))
|
||||
{
|
||||
@ -927,8 +900,8 @@ function copy_user_timezone()
|
||||
function update_needed($message='')
|
||||
{
|
||||
global $ns, $update_debug;
|
||||
require_once (e_HANDLER."message_handler.php");
|
||||
$emessage = &eMessage::getInstance();
|
||||
|
||||
$emessage = e107::getMessage();
|
||||
|
||||
if ($update_debug) $emessage->add("Update: ".$message, E_MESSAGE_DEBUG);
|
||||
if(E107_DEBUG_LEVEL)
|
||||
|
@ -635,7 +635,7 @@ City, State, Country
|
||||
<field name='menu_order'>0</field>
|
||||
<field name='menu_class'>0</field>
|
||||
<field name='menu_pages'></field>
|
||||
<field name='menu_path'>siteinfo_menu/</field>
|
||||
<field name='menu_path'>siteinfo/</field>
|
||||
<field name='menu_layout'></field>
|
||||
<field name='menu_parms'></field>
|
||||
</item>
|
||||
@ -657,7 +657,7 @@ City, State, Country
|
||||
<field name='menu_order'>2</field>
|
||||
<field name='menu_class'>0</field>
|
||||
<field name='menu_pages'></field>
|
||||
<field name='menu_path'>siteinfo_menu/</field>
|
||||
<field name='menu_path'>siteinfo/</field>
|
||||
<field name='menu_layout'></field>
|
||||
<field name='menu_parms'></field>
|
||||
</item>
|
||||
@ -690,7 +690,7 @@ City, State, Country
|
||||
<field name='menu_order'>0</field>
|
||||
<field name='menu_class'>0</field>
|
||||
<field name='menu_pages'></field>
|
||||
<field name='menu_path'>siteinfo_menu/</field>
|
||||
<field name='menu_path'>siteinfo/</field>
|
||||
<field name='menu_layout'></field>
|
||||
<field name='menu_parms'></field>
|
||||
</item>
|
||||
@ -767,7 +767,7 @@ City, State, Country
|
||||
<field name='menu_order'>0</field>
|
||||
<field name='menu_class'>0</field>
|
||||
<field name='menu_pages'></field>
|
||||
<field name='menu_path'>siteinfo_menu/</field>
|
||||
<field name='menu_path'>siteinfo/</field>
|
||||
<field name='menu_layout'></field>
|
||||
<field name='menu_parms'></field>
|
||||
</item>
|
||||
@ -778,7 +778,7 @@ City, State, Country
|
||||
<field name='menu_order'>0</field>
|
||||
<field name='menu_class'>0</field>
|
||||
<field name='menu_pages'></field>
|
||||
<field name='menu_path'>siteinfo_menu/</field>
|
||||
<field name='menu_path'>siteinfo/</field>
|
||||
<field name='menu_layout'></field>
|
||||
<field name='menu_parms'></field>
|
||||
</item>
|
||||
|
@ -9,9 +9,9 @@
|
||||
* Form Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/form_handler.php,v $
|
||||
* $Revision: 1.55 $
|
||||
* $Date: 2009-10-23 18:08:01 $
|
||||
* $Author: secretr $
|
||||
* $Revision: 1.56 $
|
||||
* $Date: 2009-10-24 07:53:25 $
|
||||
* $Author: e107coders $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -1047,7 +1047,7 @@ class e_form
|
||||
$text .= "
|
||||
".$this->select_close()."
|
||||
".$this->admin_button('trigger_execute_batch', 'trigger_execute_batch', 'submit multi e-hide-if-js', 'Go')."
|
||||
</div>
|
||||
</div><span class='clear'></span>
|
||||
";
|
||||
|
||||
return $text;
|
||||
|
@ -9,8 +9,8 @@
|
||||
* e107 Menu Class
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/menu_class.php,v $
|
||||
* $Revision: 1.14 $
|
||||
* $Date: 2009-09-10 15:24:57 $
|
||||
* $Revision: 1.15 $
|
||||
* $Date: 2009-10-24 07:53:25 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@ -252,7 +252,11 @@ class e_menu
|
||||
//include once is not an option anymore
|
||||
//e107_include will break many old menus (evel globals), so we'll wait for a while...
|
||||
//e107_include(e_PLUGIN.$mpath."/".$mname.".php");
|
||||
$e107_debug ? include(e_PLUGIN.$mpath.'/'.$mname.'.php') : @include(e_PLUGIN.$mpath.'/'.$mname.'.php');
|
||||
if(substr($mpath,-1)!='/')
|
||||
{
|
||||
$mpath .= '/';
|
||||
}
|
||||
$e107_debug ? include(e_PLUGIN.$mpath.$mname.'.php') : @include(e_PLUGIN.$mpath.$mname.'.php');
|
||||
|
||||
/*if(file_exists(e_PLUGIN.$mpath."/".$mname.".php"))
|
||||
{
|
||||
|
@ -9,8 +9,8 @@
|
||||
* e107 Admin Theme Handler
|
||||
*
|
||||
* $Source: /cvs_backup/e107_0.8/e107_handlers/theme_handler.php,v $
|
||||
* $Revision: 1.54 $
|
||||
* $Date: 2009-09-21 21:53:37 $
|
||||
* $Revision: 1.55 $
|
||||
* $Date: 2009-10-24 07:53:25 $
|
||||
* $Author: e107coders $
|
||||
*/
|
||||
|
||||
@ -839,6 +839,34 @@ class themeHandler{
|
||||
|
||||
// $itext .= !$mode ? "<tr><td style='vertical-align:top;width:24%'><b>".TPVLAN_8."</b>:</td><td style='vertical-align:top'>".$previewbutton.$selectmainbutton.$selectadminbutton."</td></tr>" : "";
|
||||
|
||||
if($mode == 2)
|
||||
{
|
||||
|
||||
$astext = "";
|
||||
$file = e107::getFile();
|
||||
|
||||
$adminstyles = $file -> get_files(e_ADMIN."includes");
|
||||
|
||||
$astext = "\n<select id='mode2' name='adminstyle' class='tbox'>\n";
|
||||
|
||||
foreach($adminstyles as $as)
|
||||
{
|
||||
$style = str_replace(".php", "", $as['fname']);
|
||||
$astext .= "<option value='{$style}'".($pref['adminstyle'] == $style ? " selected='selected'" : "").">".$style."</option>\n";
|
||||
}
|
||||
$astext .= "</select>";
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><b>".TPVLAN_41.":</b></td>
|
||||
<td colspan='2'>".$astext."</td>
|
||||
</tr>
|
||||
\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$text .= $itext;
|
||||
|
||||
@ -898,30 +926,7 @@ class themeHandler{
|
||||
|
||||
|
||||
|
||||
if($mode == 2)
|
||||
{
|
||||
|
||||
$astext = "";
|
||||
$file = e107::getFile();
|
||||
|
||||
$adminstyles = $file -> get_files(e_ADMIN."includes");
|
||||
|
||||
$astext = "\n<select id='mode2' name='adminstyle' class='tbox'>\n";
|
||||
|
||||
foreach($adminstyles as $as)
|
||||
{
|
||||
$style = str_replace(".php", "", $as['fname']);
|
||||
$astext .= "<option value='{$style}'".($pref['adminstyle'] == $style ? " selected='selected'" : "").">".$style."</option>\n";
|
||||
}
|
||||
$astext .= "</select>";
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><b>".TPVLAN_41.":</b></td>
|
||||
<td colspan='2'>".$astext."</td>
|
||||
</tr>
|
||||
\n";
|
||||
}
|
||||
|
||||
|
||||
if($mode == 1)
|
||||
|
@ -3,8 +3,8 @@
|
||||
if (!defined('e107_INIT')) { exit; }
|
||||
|
||||
$text = "<div style='text-align:center'>
|
||||
<a href='http://validator.w3.org/check?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo_menu/images/valid-xhtml11.png' alt='Valid XHTML 1.1!' height='31' width='88' /></a><br />
|
||||
<a href='http://jigsaw.w3.org/css-validator/validator?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo_menu/images/vcss.png' alt='Valid CSS!' height='31' width='88' /></a>
|
||||
<a href='http://validator.w3.org/check?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo/images/valid-xhtml11.png' alt='Valid XHTML 1.1!' height='31' width='88' /></a><br />
|
||||
<a href='http://jigsaw.w3.org/css-validator/validator?uri=".e_SELF.(e_QUERY ? '?'.e_QUERY : '')."'><img src='".e_PLUGIN_ABS."siteinfo/images/vcss.png' alt='Valid CSS!' height='31' width='88' /></a>
|
||||
</div>";
|
||||
$caption = (file_exists(THEME."images/compliance_menu.png") ? "<img src='".THEME_ABS."images/compliance_menu.png' alt='' /> ".COMPLIANCE_L1 : COMPLIANCE_L1);
|
||||
$ns->tablerender($caption, $text, 'compliance');
|
||||
|
Loading…
x
Reference in New Issue
Block a user