mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 23:26:41 +02:00
And more notice removals.
Also some plugin GUI clean-up (rss, tagwords, trackback)
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* @package e107
|
||||
* @subpackage admin
|
||||
* @version $Id$;
|
||||
* @version $Id$;
|
||||
*
|
||||
* Update routines from older e107 versions to current.
|
||||
*
|
||||
@@ -306,8 +306,8 @@ function update_706_to_800($type='')
|
||||
// List of DB tables newly required (defined in core_sql.php) (The existing dblog table gets renamed)
|
||||
// No Longer required. - automatically checked against core_sql.php.
|
||||
// $new_tables = array('audit_log', 'dblog', 'news_rewrite', 'core_media', 'core_media_cat','cron', 'mail_recipients', 'mail_content');
|
||||
|
||||
// List of core prefs that need to be converted from serialized to e107ArrayStorage.
|
||||
|
||||
// List of core prefs that need to be converted from serialized to e107ArrayStorage.
|
||||
$serialized_prefs = array("'emote'", "'menu_pref'", "'search_prefs'", "'emote_default'");
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ function update_706_to_800($type='')
|
||||
// List of changed DB tables (defined in core_sql.php)
|
||||
// No Longer required. - automatically checked against core_sql.php.
|
||||
// (primarily those which have changed significantly; for the odd field write some explicit code - it'll run faster)
|
||||
// $changed_tables = array('user', 'dblog', 'admin_log', 'userclass_classes', 'banlist', 'menus',
|
||||
// $changed_tables = array('user', 'dblog', 'admin_log', 'userclass_classes', 'banlist', 'menus',
|
||||
// 'plugin', 'news', 'news_category', 'online', 'page', 'links', 'comments');
|
||||
|
||||
|
||||
@@ -332,7 +332,7 @@ function update_706_to_800($type='')
|
||||
// key = plugin directory name. Data = comma-separated list of tables to check
|
||||
// (primarily those which have changed significantly; for the odd field write some explicit code - it'll run faster)
|
||||
// No Longer required. - automatically checked by db-verify
|
||||
/* $pluginChangedTables = array('linkwords' => 'linkwords',
|
||||
/* $pluginChangedTables = array('linkwords' => 'linkwords',
|
||||
'featurebox' => 'featurebox',
|
||||
'links_page' => 'links_page',
|
||||
'poll' => 'polls',
|
||||
@@ -340,7 +340,7 @@ function update_706_to_800($type='')
|
||||
);
|
||||
|
||||
*/
|
||||
/*
|
||||
/*
|
||||
$setCorePrefs = array( //modified prefs during upgrade.
|
||||
'adminstyle' => 'infopanel',
|
||||
'admintheme' => 'bootstrap',
|
||||
@@ -357,16 +357,16 @@ function update_706_to_800($type='')
|
||||
|
||||
|
||||
$do_save = TRUE;
|
||||
|
||||
|
||||
// List of changed menu locations.
|
||||
|
||||
|
||||
// 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' => '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'),
|
||||
@@ -377,7 +377,7 @@ function update_706_to_800($type='')
|
||||
array('oldpath' => 'other_news_menu', 'newpath' => 'news', 'menu' => 'other_news_menu'),
|
||||
array('oldpath' => 'other_news_menu', 'newpath' => 'news', 'menu' => 'other_news2_menu')
|
||||
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
// List of DB tables (key) and field (value) which need changing to accommodate IPV6 addresses
|
||||
@@ -395,7 +395,7 @@ function update_706_to_800($type='')
|
||||
|
||||
if (!$just_check)
|
||||
{
|
||||
foreach($setCorePrefs as $k=>$v)
|
||||
foreach(vartrue($setCorePrefs) as $k=>$v)
|
||||
{
|
||||
$pref[$k] = $v;
|
||||
}
|
||||
@@ -615,32 +615,32 @@ function update_706_to_800($type='')
|
||||
|
||||
// Add index to download history
|
||||
// Deprecated by db-verify-class
|
||||
// if (FALSE !== ($temp = addIndexToTable('download_requests', 'download_request_datestamp', $just_check, $updateMessages)))
|
||||
// {
|
||||
// if ($just_check)
|
||||
// {
|
||||
// return update_needed($temp);
|
||||
// }
|
||||
// if (FALSE !== ($temp = addIndexToTable('download_requests', 'download_request_datestamp', $just_check, $updateMessages)))
|
||||
// {
|
||||
// if ($just_check)
|
||||
// {
|
||||
// return update_needed($temp);
|
||||
// }
|
||||
// }
|
||||
|
||||
// Extra index to tmp table
|
||||
// Deprecated by db-verify-class
|
||||
// if (FALSE !== ($temp = addIndexToTable('tmp', 'tmp_time', $just_check, $updateMessages)))
|
||||
// {
|
||||
// if ($just_check)
|
||||
// {
|
||||
// return update_needed($temp);
|
||||
// }
|
||||
// if (FALSE !== ($temp = addIndexToTable('tmp', 'tmp_time', $just_check, $updateMessages)))
|
||||
// {
|
||||
// if ($just_check)
|
||||
// {
|
||||
// return update_needed($temp);
|
||||
// }
|
||||
// }
|
||||
|
||||
// Extra index to rss table (if used)
|
||||
// Deprecated by db-verify-class
|
||||
// if (FALSE !== ($temp = addIndexToTable('rss', 'rss_name', $just_check, $updateMessages, TRUE)))
|
||||
// {
|
||||
// if ($just_check)
|
||||
// {
|
||||
// return update_needed($temp);
|
||||
// }
|
||||
// if (FALSE !== ($temp = addIndexToTable('rss', 'rss_name', $just_check, $updateMessages, TRUE)))
|
||||
// {
|
||||
// if ($just_check)
|
||||
// {
|
||||
// return update_needed($temp);
|
||||
// }
|
||||
// }
|
||||
|
||||
// Front page prefs (logic has changed)
|
||||
@@ -1070,8 +1070,8 @@ function update_706_to_800($type='')
|
||||
// $_pdateMessages[] = LAN_UPDATE_XX24;
|
||||
// catch_error($sql);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-- Media-manger import --------------------------------------------------
|
||||
|
||||
|
||||
@@ -1196,11 +1196,11 @@ function update_706_to_800($type='')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$count = $sql->db_Select_gen("SELECT * FROM `#core_media_cat` WHERE `media_cat_owner` = '_common' LIMIT 1 ");
|
||||
|
||||
if($count != 1)
|
||||
|
||||
if($count != 1)
|
||||
{
|
||||
if ($just_check) return update_needed('Add Media-Manager Categories and Import existing images.');
|
||||
|
||||
@@ -1220,9 +1220,9 @@ function update_706_to_800($type='')
|
||||
mysql_query("INSERT INTO `".MPREFIX."core_media_cat` VALUES(0, 'news', 'news_thumb', 'News Thumbnails (Legacy)', 'Legacy news thumbnails. ', 253, '', 1);");
|
||||
|
||||
$med->import('news_thumb', e_IMAGE.'newspost_images',"^thumb_");
|
||||
$med->import('news',e_IMAGE.'newspost_images');
|
||||
$med->import('page',e_IMAGE.'custom');
|
||||
|
||||
$med->import('news',e_IMAGE.'newspost_images');
|
||||
$med->import('page',e_IMAGE.'custom');
|
||||
|
||||
}
|
||||
|
||||
// Check for Legacy Download Images.
|
||||
@@ -1267,35 +1267,35 @@ function update_706_to_800($type='')
|
||||
|
||||
|
||||
|
||||
|
||||
$count = $sql->db_Select_gen("SELECT * FROM `#core_media_cat` WHERE media_cat_owner='_icon' ");
|
||||
|
||||
$count = $sql->db_Select_gen("SELECT * FROM `#core_media_cat` WHERE media_cat_owner='_icon' ");
|
||||
|
||||
if(!$count)
|
||||
{
|
||||
if ($just_check) return update_needed('Add icons to media-manager');
|
||||
if(!$count)
|
||||
{
|
||||
if ($just_check) return update_needed('Add icons to media-manager');
|
||||
|
||||
$query = "INSERT INTO `".MPREFIX."core_media_cat` (`media_cat_id`, `media_cat_owner`, `media_cat_category`, `media_cat_title`, `media_cat_diz`, `media_cat_class`, `media_cat_image`, `media_cat_order`) VALUES
|
||||
(0, '_icon', '_icon_16', 'Icons 16px', 'Available where icons are used in admin. ', 253, '', 0),
|
||||
(0, '_icon', '_icon_32', 'Icons 32px', 'Available where icons are used in admin. ', 253, '', 0),
|
||||
(0, '_icon', '_icon_48', 'Icons 48px', 'Available where icons are used in admin. ', 253, '', 0),
|
||||
(0, '_icon', '_icon_64', 'Icons 64px', 'Available where icons are used in admin. ', 253, '', 0);
|
||||
";
|
||||
";
|
||||
|
||||
if(!mysql_query($query))
|
||||
{
|
||||
// echo "mysyql error";
|
||||
// error or already exists.
|
||||
}
|
||||
if(!mysql_query($query))
|
||||
{
|
||||
// echo "mysyql error";
|
||||
// error or already exists.
|
||||
}
|
||||
|
||||
$med->importIcons(e_PLUGIN);
|
||||
$med->importIcons(e_PLUGIN);
|
||||
$med->importIcons(e_IMAGE."icons/");
|
||||
$med->importIcons(e_THEME.$pref['sitetheme']."/images/");
|
||||
e107::getMessage()->addDebug("Icon category added");
|
||||
}
|
||||
|
||||
|
||||
// Any other images should be imported manually via Media Manager batch-import.
|
||||
|
||||
$med->importIcons(e_THEME.$pref['sitetheme']."/images/");
|
||||
e107::getMessage()->addDebug("Icon category added");
|
||||
}
|
||||
|
||||
|
||||
// Any other images should be imported manually via Media Manager batch-import.
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -1561,7 +1561,7 @@ function catch_error(&$target)
|
||||
|
||||
function get_default_prefs()
|
||||
{
|
||||
$xmlArray = e107::getSingleton('xmlClass')->loadXMLfile(e_CORE."xml/default_install.xml",'advanced');
|
||||
$xmlArray = e107::getSingleton('xmlClass')->loadXMLfile(e_CORE."xml/default_install.xml",'advanced');
|
||||
$pref = e107::getSingleton('xmlClass')->e107ImportPrefs($xmlArray,'core');
|
||||
return $pref;
|
||||
}
|
||||
|
Reference in New Issue
Block a user