Subversion Repositories ALCASAR

Rev

Rev 2389 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2389 Rev 2450
Line 2... Line 2...
2
/**
2
/**
3
 * Translations of users tickets
3
 * Translations of users tickets
4
 *
4
 *
5
 * @copyright Copyright (C) ALCASAR (http://www.alcasar.net)
5
 * @copyright Copyright (C) ALCASAR (http://www.alcasar.net)
6
 * @license   GPL-3.0
6
 * @license   GPL-3.0
7
 * @version   $Id: langues_imp.php 2389 2017-08-23 22:58:43Z tom.houdayer $
7
 * @version   $Id: langues_imp.php 2450 2017-12-05 21:53:42Z tom.houdayer $
8
 */
8
 */
9
 
9
 
10
// Read conf file
10
// Read conf file
11
$CONF_FILE = '/usr/local/etc/alcasar.conf';
11
$CONF_FILE = '/usr/local/etc/alcasar.conf';
12
if (!file_exists($CONF_FILE)) {
12
if (!file_exists($CONF_FILE)) {
Line 16... Line 16...
16
	exit("Can't read the file $CONF_FILE");
16
	exit("Can't read the file $CONF_FILE");
17
}
17
}
18
$ouvre = fopen($CONF_FILE, 'r');
18
$ouvre = fopen($CONF_FILE, 'r');
19
if ($ouvre) {
19
if ($ouvre) {
20
	while (!feof($ouvre)) {
20
	while (!feof($ouvre)) {
21
		$tampon = fgets($ouvre, 4096);
21
		$buffer = fgets($ouvre, 4096);
22
		if (strpos($tampon, '=') !== false) {
22
		if (strpos($buffer, '=') !== false) {
23
			$tmp = explode('=', $tampon);
23
			$tmp = explode('=', $buffer, 2);
24
			$conf[$tmp[0]] = $tmp[1];
24
			$conf[trim($tmp[0])] = trim($tmp[1]);
25
		}
25
		}
26
	}
26
	}
27
	fclose($ouvre);
27
	fclose($ouvre);
28
}
28
}
29
 
29