From 55eb3e53b705d0603b52d9fa4cada53b1ba2422f Mon Sep 17 00:00:00 2001 From: cajus Date: Tue, 5 Jan 2010 15:37:27 +0000 Subject: [PATCH] Only do time intensive things if needed git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15059 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_listing.inc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/gosa-core/include/class_listing.inc b/gosa-core/include/class_listing.inc index 31a1b3dc1..749bc30d1 100644 --- a/gosa-core/include/class_listing.inc +++ b/gosa-core/include/class_listing.inc @@ -704,41 +704,44 @@ class listing { // Row is replaced by the row number if ($param == "row") { $params[]= $row; + continue; } // pid is replaced by the current PID if ($param == "pid") { $params[]= $this->pid; + continue; } // base is replaced by the current base if ($param == "base") { $params[]= $this->getBase(); + continue; } // Fixie with "" is passed directly if (preg_match('/^".*"$/', $param)){ $params[]= preg_replace('/"/', '', $param); + continue; + } + + // Move dn if needed + if ($param == "dn") { + $params[]= LDAP::fix($config["dn"]); + continue; } // LDAP variables get replaced by their objects for ($i= 0; $i<$config['count']; $i++) { - if ($config[$i] == 'dn') { - continue; - } if ($param == $config[$i]) { $values= $config[$config[$i]]; if (is_array($values)){ unset($values['count']); } $params[]= $values; + break; } } - - // Move dn if needed - if ($param == "dn") { - $params[]= LDAP::fix($config["dn"]); - } } // Replace information -- 2.30.2