Code

Added dependency to libnet-pcap-perl.
[gosa.git] / gosa-core / html / getvcard.php
index a1c68bc829a5259d3484a875d46bf5836700250a..ebc751143371682a4c3778756768db819e48794a 100644 (file)
 @require_once ("../include/php_setup.inc");
 @require_once ("functions.inc");
 error_reporting (0);
-session_start ();
+session::start();
 
 /* Logged in? Simple security check */
-if (!isset($_SESSION['ui'])){
+if (!session::is_set('ui')){
   new log("security","all/all","",array(),"Error: getvcard.php called without session") ;
   header ("Location: index.php");
   exit;
@@ -33,8 +33,8 @@ if (!isset($_SESSION['ui'])){
 
 /* Uid parameter set? */
 if (!isset($_GET['dn']) || $_GET['dn'] == ""){
-  print_red (_("Error: getcvard.php needs a parameter to export a vcard!"));
-  exit;
+  msg_dialog::display(_("Internal error"), _("Missing parameters!"), ERROR_DIALOG);
+  display_error_page();
 }
 
 header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
@@ -53,7 +53,7 @@ if (preg_match('/MSIE 5.5/', $HTTP_USER_AGENT) ||
 }
 
 /* Get entry */
-$config= $_SESSION['config'];
+$config= session::get('config');
 $ldap= $config->get_ldap_link();
 $ldap->cat(base64_decode(validate($_GET['dn'])));