Code

Fixed multi query editor
[gosa.git] / gosa-core / include / functions.inc
index 447e9a1aa75f1fa089127b8b46fd0bb27f037b26..df32e69ea857864c9cb278cefa02afef3b14d365 100644 (file)
@@ -528,6 +528,7 @@ function ldap_login_user_htaccess ($username)
   /* Bail out if we have login restrictions set, for security reasons
      the message is the same than failed user/pw */
   if (!$ui->loginAllowed()){
+    new log("security","login","",array(),"Login restriction for user \"$username\", login not permitted");
     return (NULL);
   }
 
@@ -624,6 +625,7 @@ function ldap_login_user ($username, $password)
   /* Bail out if we have login restrictions set, for security reasons
      the message is the same than failed user/pw */
   if (!$ui->loginAllowed()){
+    new log("security","login","",array(),"Login restriction for user \"$username\", login not permitted");
     return (NULL);
   }
 
@@ -3546,9 +3548,8 @@ function image($path, $action= "", $title= "", $align= "middle")
   $styles= session::global_get('img-styles');
 
   /* Extract labels from path */
-  if (preg_match("/(-[a-z0-9]+)\.png$/", $path, $matches)) {
-    print_a($matches);
-    exit;
+  if (preg_match("/\.png\[(.*)\]$/", $path, $matches)) {
+    $label= $matches[1];
   }
 
   $lbl= "";
@@ -3558,6 +3559,8 @@ function image($path, $action= "", $title= "", $align= "middle")
     } else {
       die("Invalid label specified: $label\n");
     }
+
+    $path= preg_replace("/\[.*\]$/", "", $path);
   }
 
   // Non middle layout?