~ubuntu-branches/ubuntu/saucy/horde3/saucy

« back to all changes in this revision

Viewing changes to services/language.php

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-05-04 23:08:08 UTC
  • Revision ID: james.westby@ubuntu.com-20050504230808-p4hf3hk28o3v7wir
Tags: upstream-3.0.4
ImportĀ upstreamĀ versionĀ 3.0.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * Script to set the new language.
 
4
 *
 
5
 * $Horde: horde/services/language.php,v 1.5.12.1 2005/01/03 12:25:45 jan Exp $
 
6
 *
 
7
 * Copyright 2003-2005 Marko Djukic <marko@oblo.com>
 
8
 *
 
9
 * See the enclosed file COPYING for license information (LGPL). If you did not
 
10
 * receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 
11
 */
 
12
 
 
13
@define('HORDE_BASE', dirname(__FILE__) . '/..');
 
14
require_once HORDE_BASE . '/lib/base.php';
 
15
 
 
16
/* Set the language. */
 
17
$_SESSION['horde_language'] = NLS::select();
 
18
$prefs->setValue('language', $_SESSION['horde_language']);
 
19
 
 
20
/* Redirect to the url or login page if none given. */
 
21
$url = Util::getFormData('url');
 
22
if (empty($url)) {
 
23
    $url = Horde::applicationUrl('index.php', true);
 
24
}
 
25
header('Location: ' . $url);