]> git.sur5r.net Git - contagged/blobdiff - inc/init.php
Upgrade smarty from 2.6.18 to 2.6.30
[contagged] / inc / init.php
index 72bea22c6a5ccc5a7733c66d90e75abc3c674c91..91554285d4ed2a0c8b69c4255a464395b68e0c7a 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');
   define('NL',"\n");
 
   //init session
+  @ini_set('arg_separator.output', '&amp;');
   session_name("ldapab");
   session_start();
 
-  //kill magic quotes
-  if (get_magic_quotes_gpc()) {
-    if (!empty($_GET))    remove_magic_quotes($_GET);
-    if (!empty($_POST))   remove_magic_quotes($_POST);
-    if (!empty($_COOKIE)) remove_magic_quotes($_COOKIE);
-    if (!empty($_REQUEST)) remove_magic_quotes($_REQUEST);
-    if (!empty($_SESSION)) remove_magic_quotes($_SESSION);
-    ini_set('magic_quotes_gpc', 0);
-  }
-  set_magic_quotes_runtime(0);
-
-  function remove_magic_quotes(&$array) {
-    foreach (array_keys($array) as $key) {
-      if (is_array($array[$key])) {
-        remove_magic_quotes($array[$key]);
-      }else {
-        $array[$key] = stripslashes($array[$key]);
-      }
-    }
-  }
-
   //prepare SMARTY object
   $smarty = new Smarty;
   $smarty->compile_dir   = dirname(__FILE__).'/../cache';