1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 11:27:18 +00:00

Modify server version updates

This commit is contained in:
zhengxie
2014-04-18 12:13:43 +08:00
parent 63c77335bc
commit 672e93476e
3 changed files with 10 additions and 3 deletions

View File

@@ -45,7 +45,7 @@
$(function(){
// check if server version is the latest one
$.ajax({
url: 'http://seafile.com/ajax/check_server_version/?v=' + e('{{seafile_version}}') + '&p=' + e('{{platform}}'),
url: 'http://seafile.com/ajax/check_server_version/?v=' + e('{{seafile_version}}') + '&p=' + e('{{platform}}') + '&id=' + '{{server_id}}',
dataType: 'jsonp',
jsonpCallback: 'xx',
crossDomain: true,

View File

@@ -582,6 +582,11 @@ def get_service_url():
"""
return SERVICE_URL
def get_server_id():
"""Get server id from seaserv.
"""
return getattr(seaserv, 'SERVER_ID', '-')
def get_site_scheme_and_netloc():
"""Return a string contains site scheme and network location part from
service url.

View File

@@ -31,7 +31,8 @@ from seahub.share.models import FileShare
import seahub.settings as settings
from seahub.settings import INIT_PASSWD, SITE_NAME, \
SEND_EMAIL_ON_ADDING_SYSTEM_MEMBER, SEND_EMAIL_ON_RESETTING_USER_PASSWD
from seahub.utils import send_html_email, get_user_traffic_list
from seahub.utils import send_html_email, get_user_traffic_list, get_server_id
from seahub.utils.sysinfo import get_platform_name
logger = logging.getLogger(__name__)
@@ -185,8 +186,8 @@ def sys_user_admin(request):
have_ldap = True if len(get_emailusers('LDAP', 0, 1)) > 0 else False
from seahub.utils.sysinfo import get_platform_name
platform = get_platform_name()
server_id = get_server_id()
return render_to_response(
'sysadmin/sys_useradmin.html', {
@@ -199,6 +200,7 @@ def sys_user_admin(request):
'CALC_SHARE_USAGE': CALC_SHARE_USAGE,
'have_ldap': have_ldap,
'platform': platform,
'server_id': server_id,
},
context_instance=RequestContext(request))