]> git.sur5r.net Git - contagged/blobdiff - inc/init.php
Merge pull request #14 from araname/master
[contagged] / inc / init.php
index ad5c90014d7ecb18f1bd869d478c3a0a1d65b872..be47441e0504d370deed0cbabbd4530a7d88b016 100644 (file)
@@ -1,6 +1,13 @@
-<?
+<?php
+  if(defined('E_DEPRECATED')){ // since php 5.3
+    error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
+  }else{
+    error_reporting(E_ALL ^ E_NOTICE);
+  }
+
   require_once(dirname(__FILE__).'/config.php');
   require_once(dirname(__FILE__).'/fields.php');
+  require_once(dirname(__FILE__).'/lang/en.php');
   require_once(dirname(__FILE__).'/lang/'.$conf['lang'].'.php');
   require_once(dirname(__FILE__).'/functions.php');
   require_once(dirname(__FILE__).'/template.php');
@@ -9,6 +16,7 @@
   define('NL',"\n");
 
   //init session
+  @ini_set('arg_separator.output', '&amp;');
   session_name("ldapab");
   session_start();
 
@@ -21,7 +29,7 @@
     if (!empty($_SESSION)) remove_magic_quotes($_SESSION);
     ini_set('magic_quotes_gpc', 0);
   }
-  set_magic_quotes_runtime(0);
+  @set_magic_quotes_runtime(0);
 
   function remove_magic_quotes(&$array) {
     foreach (array_keys($array) as $key) {
@@ -39,4 +47,8 @@
   $smarty->use_sub_dirs  = 0;
   $smarty->template_dir  = dirname(__FILE__).'/../templates';
   $smarty->force_compile = $conf['smartycompile'];
+
+  // select the correct google api key
+  $conf['gmapkey'] = $conf['gmaps'][$_SERVER['HTTP_HOST']];
+
 ?>