From 2e4a3c95b55f92ba7da85063208a80e49883ad04 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Thu, 4 Jul 2013 21:12:34 +0200 Subject: [PATCH] Merge with default --- code/ryzom/tools/server/admin/common.php | 11 +++++++---- code/ryzom/tools/server/admin/config.php | 4 ++-- code/ryzom/tools/server/admin/functions_mysql.php | 2 +- code/ryzom/tools/server/admin/functions_tool_main.php | 4 ++-- code/ryzom/tools/server/admin/tool_preferences.php | 2 +- code/ryzom/tools/server/www/login/config.php | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/code/ryzom/tools/server/admin/common.php b/code/ryzom/tools/server/admin/common.php index de49cfe4a..644ebba32 100644 --- a/code/ryzom/tools/server/admin/common.php +++ b/code/ryzom/tools/server/admin/common.php @@ -69,7 +69,7 @@ { $nel_user = null; nt_auth_stop_session(); - nt_common_redirect('index.php'); + nt_common_redirect(''); exit(); } elseif (isset($NELTOOL['SESSION_VARS']['nelid']) && !empty($NELTOOL['SESSION_VARS']['nelid'])) @@ -138,9 +138,12 @@ if (isset($nel_user['new_login'])) { $default_user_application_id = 0; - if ($nel_user['user_default_application_id'] > 0) $default_user_application_id = $nel_user['user_default_application_id']; - elseif ($nel_user['group_default_application_id'] > 0) $default_user_application_id = $nel_user['group_default_application_id']; - + if (isset( $nel_user['user_default_application_id']) &&($nel_user['user_default_application_id'] > 0)) { + $default_user_application_id = $nel_user['user_default_application_id']; + }elseif (isset( $nel_user['group_default_application_id']) &&($nel_user['group_default_application_id'] > 0)) { + $default_user_application_id = $nel_user['group_default_application_id']; + } + if ($default_user_application_id > 0) { nt_common_add_debug("default application : user:". $nel_user['user_default_application_id'] ." group:". $nel_user['group_default_application_id']); diff --git a/code/ryzom/tools/server/admin/config.php b/code/ryzom/tools/server/admin/config.php index 4d4c223a4..530adcb43 100644 --- a/code/ryzom/tools/server/admin/config.php +++ b/code/ryzom/tools/server/admin/config.php @@ -9,8 +9,8 @@ define('NELTOOL_DBNAME','nel_tool'); // site paths definitions - define('NELTOOL_SITEBASE','http://open.ryzom.com/'); - define('NELTOOL_SYSTEMBASE','/home/nevrax/hg/code/ryzom/tools/server/admin/'); + define('NELTOOL_SITEBASE',$_SERVER['PHP_SELF']); + define('NELTOOL_SYSTEMBASE',dirname( dirname(__FILE__) ) . '/admin/'); define('NELTOOL_LOGBASE', NELTOOL_SYSTEMBASE .'/logs/'); define('NELTOOL_IMGBASE', NELTOOL_SYSTEMBASE .'/imgs/'); diff --git a/code/ryzom/tools/server/admin/functions_mysql.php b/code/ryzom/tools/server/admin/functions_mysql.php index 9ce5ec3de..6778bbeff 100644 --- a/code/ryzom/tools/server/admin/functions_mysql.php +++ b/code/ryzom/tools/server/admin/functions_mysql.php @@ -114,7 +114,7 @@ class sql_db } else { - return ( $transaction == END_TRANSACTION ) ? true : false; + return ( $transaction == 'END_TRANSACTION' ) ? true : false; } } diff --git a/code/ryzom/tools/server/admin/functions_tool_main.php b/code/ryzom/tools/server/admin/functions_tool_main.php index 9ab2a5b9e..cb541a83e 100644 --- a/code/ryzom/tools/server/admin/functions_tool_main.php +++ b/code/ryzom/tools/server/admin/functions_tool_main.php @@ -1,12 +1,12 @@ 'Every 5 secs', 'secs' => 5, ), array('desc' => 'Every 30 secs', 'secs' => 30, - ),*/ + ), array('desc' => 'Every 1 min.', 'secs' => 60, ), diff --git a/code/ryzom/tools/server/admin/tool_preferences.php b/code/ryzom/tools/server/admin/tool_preferences.php index 88e8d289c..045034067 100644 --- a/code/ryzom/tools/server/admin/tool_preferences.php +++ b/code/ryzom/tools/server/admin/tool_preferences.php @@ -9,7 +9,7 @@ $tpl->assign("tool_v_login", $nel_user['user_name']); $tpl->assign("tool_v_user_id", $nel_user['user_id']); $tpl->assign("tool_v_menu", $nel_user['user_menu_style']); - $tpl->assign("tool_v_application", $nel_user['user_default_application_id']); + $tpl->assign("tool_v_application", isset($nel_user['user_default_application_id']) ? $nel_user['user_default_application_id']:'') ; if (isset($NELTOOL['POST_VARS']['tool_form_user_id'])) { diff --git a/code/ryzom/tools/server/www/login/config.php b/code/ryzom/tools/server/www/login/config.php index 50cdcc748..80f89f32b 100644 --- a/code/ryzom/tools/server/www/login/config.php +++ b/code/ryzom/tools/server/www/login/config.php @@ -2,7 +2,7 @@ // This file contains all variables needed by other php scripts -$LogRelativePath = './'; +$LogRelativePath = 'logs/'; // ---------------------------------------------------------------------------------------- // Variables for nel database access