mirror of
https://github.com/e107inc/e107.git
synced 2025-03-14 01:19:44 +01:00
Clear out various obsolete prefs
This commit is contained in:
parent
a20520096c
commit
8588f13d2d
@ -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.17 $
|
||||
| $Date: 2008-01-11 22:13:43 $
|
||||
| $Revision: 1.18 $
|
||||
| $Date: 2008-01-12 16:51:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -28,8 +28,8 @@ require_once(e_HANDLER.'db_table_admin_class.php');
|
||||
|
||||
// To do - how do we handle multi-language tables?
|
||||
|
||||
//$update_debug = FALSE; // TRUE gives extra messages in places
|
||||
$update_debug = TRUE; // TRUE gives extra messages in places
|
||||
$update_debug = FALSE; // TRUE gives extra messages in places
|
||||
//$update_debug = TRUE; // TRUE gives extra messages in places
|
||||
|
||||
|
||||
if (!defined("LAN_UPDATE_8")) { define("LAN_UPDATE_8", ""); }
|
||||
@ -183,7 +183,8 @@ function update_706_to_800($type='')
|
||||
global $sql,$ns, $pref;
|
||||
|
||||
// List of unwanted $pref values which can go
|
||||
$obs_prefs = array('frontpage_type','rss_feeds', 'log_lvcount', 'zone', 'upload_allowedfiletype', 'real', 'forum_user_customtitle');
|
||||
$obs_prefs = array('frontpage_type','rss_feeds', 'log_lvcount', 'zone', 'upload_allowedfiletype', 'real', 'forum_user_customtitle',
|
||||
'utf-compatmode','frontpage_method','standards_mode','image_owner','im_quality');
|
||||
|
||||
// List of DB tables not required (includes a few from 0.6xx)
|
||||
$obs_tables = array('flood', 'headlines', 'stat_info', 'stat_counter', 'stat_last');
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_files/def_e107_prefs.php,v $
|
||||
| $Revision: 1.6 $
|
||||
| $Date: 2007-12-30 18:19:09 $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2008-01-12 16:51:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -55,7 +55,6 @@ City, State, Country
|
||||
'displayname_class' => 255,
|
||||
'displayname_maxlength' => 15,
|
||||
'loginname_maxlength' => 30,
|
||||
|
||||
'profanity_filter' => '0',
|
||||
'profanity_replace' => '[censored]',
|
||||
'smiley_activate' => '',
|
||||
@ -73,7 +72,6 @@ City, State, Country
|
||||
'cookie_name' => 'e107cookie',
|
||||
'resize_method' => 'gd2',
|
||||
'im_path' => '/usr/X11R6/bin/',
|
||||
'im_quality' => '80',
|
||||
'im_width' => '120',
|
||||
'im_height' => '100',
|
||||
'upload_enabled' => '0',
|
||||
|
@ -12,8 +12,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/comment_class.php,v $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2007-08-08 19:28:04 $
|
||||
| $Revision: 1.8 $
|
||||
| $Date: 2008-01-12 16:51:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -221,8 +221,9 @@ class comment {
|
||||
}
|
||||
if ($pref['nested_comments']) {
|
||||
$width2 = 100 - $width;
|
||||
$total_width = (isset($pref['standards_mode']) && $pref['standards_mode'] ? "98%" : "95%");
|
||||
if($width){
|
||||
$total_width = "95%";
|
||||
if($width)
|
||||
{
|
||||
$renderstyle = "
|
||||
<table style='width:".$total_width."' border='0'>
|
||||
<tr>
|
||||
@ -361,9 +362,7 @@ class comment {
|
||||
|
||||
if (!defined("emessage"))
|
||||
{
|
||||
$ip = $e107->getip();
|
||||
require_once(e_HANDLER."encrypt_handler.php");
|
||||
$ip = encode_ip($ip);
|
||||
$ip = $e107->getip(); // Store IP 'in the raw' - could be IPv4 or IPv6
|
||||
$_t = time();
|
||||
|
||||
if($editpid)
|
||||
|
@ -12,8 +12,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/login.php,v $
|
||||
| $Revision: 1.13 $
|
||||
| $Date: 2008-01-01 21:26:16 $
|
||||
| $Revision: 1.14 $
|
||||
| $Date: 2008-01-12 16:51:43 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@ -86,12 +86,6 @@ class userlogin
|
||||
$ouserpass = $userpass;
|
||||
$userpass = md5($ouserpass);
|
||||
|
||||
// This is only required for upgrades and only for those not using utf-8 to begin with..
|
||||
if(isset($pref['utf-compatmode']) && (CHARSET == "utf-8" || CHARSET == "UTF-8")){
|
||||
$username = utf8_decode($username);
|
||||
$userpass = md5(utf8_decode($ouserpass));
|
||||
}
|
||||
|
||||
if (!$sql->db_Select("user", "*", "user_loginname = '".$tp -> toDB($username)."'"))
|
||||
{ // Invalid user
|
||||
define("LOGINMESSAGE", LAN_LOGIN_21."<br /><br />");
|
||||
|
@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/resize_handler.php,v $
|
||||
| $Revision: 1.7 $
|
||||
| $Date: 2007-12-20 20:51:17 $
|
||||
| $Revision: 1.8 $
|
||||
| $Date: 2008-01-12 16:51:43 $
|
||||
| $Author: e107steved $
|
||||
|
|
||||
| Mod to give correct return code if source image already smaller than max size
|
||||
@ -56,7 +56,8 @@ function resize_image($source_file, $destination_file, $type = "upload", $model
|
||||
$new_height = varset($pref['im_height'], 100);
|
||||
}
|
||||
|
||||
$im_quality = varset($pref['im_quality'], 99);
|
||||
// $im_quality = varset($pref['im_quality'], 99);
|
||||
$im_quality = 99;
|
||||
|
||||
$image_stats = getimagesize($source_file);
|
||||
if ($image_stats == null)
|
||||
@ -208,10 +209,6 @@ function resize_image($source_file, $destination_file, $type = "upload", $model
|
||||
if ($destination_file == "stdout") return TRUE; // Can't do anything more if file sent to stdout - assume success
|
||||
|
||||
@chmod($destination_file, 0644);
|
||||
if ($pref['image_owner'])
|
||||
{
|
||||
@chown($destination_file, $pref['image_owner']);
|
||||
}
|
||||
|
||||
$image_stats = getimagesize($destination_file);
|
||||
if ($image_stats == null)
|
||||
|
52
index.php
52
index.php
@ -12,8 +12,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/index.php,v $
|
||||
| $Revision: 1.3 $
|
||||
| $Date: 2007-07-31 19:25:26 $
|
||||
| $Revision: 1.4 $
|
||||
| $Date: 2008-01-12 16:51:43 $
|
||||
| $Author: e107steved $
|
||||
|
||||
Mods for prioritised system
|
||||
@ -29,26 +29,6 @@ if (file_exists('index_include.php'))
|
||||
}
|
||||
|
||||
|
||||
// Legacy bit to handle 0.6xx values of prefs - simplify to a sensible option later
|
||||
if (!is_array($pref['frontpage']) && $pref['frontpage'] != 'Array') {
|
||||
if (!$pref['frontpage'] || $pref['frontpage'] == 'Array.php') {
|
||||
$up_pref = 'news.php';
|
||||
} else if ($pref['frontpage'] == 'links') {
|
||||
$up_pref = $PLUGINS_DIRECTORY.'links_page/links.php';
|
||||
} else if ($pref['frontpage'] == 'forum') {
|
||||
$up_pref = $PLUGINS_DIRECTORY.'forum/forum.php';
|
||||
} else if (is_numeric($pref['frontpage'])) {
|
||||
$up_pref = $PLUGINS_DIRECTORY.'content/content.php?content.'.$pref['frontpage'];
|
||||
} else if (substr($pref['frontpage'], -1) != '/' && strpos($pref['frontpage'], '.') === FALSE) {
|
||||
$up_pref = $pref['frontpage'].'.php';
|
||||
} else {
|
||||
$up_pref = $pref['frontpage'];
|
||||
}
|
||||
unset($pref['frontpage']);
|
||||
$pref['frontpage']['all'] = $up_pref;
|
||||
save_prefs();
|
||||
}
|
||||
|
||||
$query = (e_QUERY && e_QUERY != '' && !$_GET['elan']) ? '?'.e_QUERY : '';
|
||||
$location = '';
|
||||
|
||||
@ -63,7 +43,7 @@ $class_list = explode(',',USERCLASS_LIST);
|
||||
|
||||
|
||||
if (isset($pref['frontpage']['all']) && $pref['frontpage']['all'])
|
||||
{
|
||||
{ // 0.7 method
|
||||
$location = ((strpos($pref['frontpage']['all'], 'http') === FALSE) ? e_BASE : '').$pref['frontpage']['all'].$query;
|
||||
}
|
||||
else
|
||||
@ -109,30 +89,6 @@ if (!$location)
|
||||
if (!trim($location)) $location = 'news.php';
|
||||
|
||||
|
||||
// handle redirect and include front page methods ($pref['frontpage_method'] looks as if not used)
|
||||
if(isset($pref['frontpage_method']) && $pref['frontpage_method'] == "include")
|
||||
{
|
||||
if($location == "news.php")
|
||||
{
|
||||
require_once("news.php");
|
||||
}
|
||||
elseif ($location == PLUGINS_DIRECTORY."forum/forum.php")
|
||||
{
|
||||
require_once($PLUGINS_DIRECTORY."forum/forum.php");
|
||||
}
|
||||
elseif (preg_match('/^page\.php\?([0-9]*)$/', $location))
|
||||
{
|
||||
$e_QUERY = preg_match('/^page\.php\?([0-9]*)$/', $location);
|
||||
require_once("page.php");
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: {$location}");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list($page,$str) = explode("?",$location."?"); // required to prevent infinite looping when queries are used on index.php.
|
||||
if($page == "index.php") // Welcome Message is the front-page.
|
||||
{
|
||||
@ -145,6 +101,6 @@ else
|
||||
header("Location: {$location}");
|
||||
}
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user