diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php index 8a4d3e00..11c527d2 100644 --- a/lib/ds_ldap.php +++ b/lib/ds_ldap.php @@ -991,7 +991,7 @@ class ldap extends DS { $return = $dn; foreach ($this->getBaseDN() as $base) { - if (preg_match("/${base}$/i",$dn)) { + if (preg_match('/' . $base . '$/i',$dn)) { $return = $base; break; } diff --git a/lib/xmlTemplates.php b/lib/xmlTemplates.php index 4a40ba8d..7c495e14 100644 --- a/lib/xmlTemplates.php +++ b/lib/xmlTemplates.php @@ -79,7 +79,7 @@ abstract class xmlTemplates { # Ignore any files that are not the predefined custom files. if ($_SESSION[APPCONFIG]->getValue('appearance','custom_templates_only') - && ! preg_match("/^${custom_prefix}/",$file)) + && ! preg_match('/^'. $custom_prefix . '/',$file)) continue; $filename = sprintf('%s/%s',$dir,$file); @@ -122,7 +122,7 @@ abstract class xmlTemplates { # Ignore any files that are not the predefined custom files. if ($_SESSION[APPCONFIG]->getValue('appearance','custom_templates_only') - && ! preg_match("/^${custom_prefix}/",$file)) + && ! preg_match('/^'. $custom_prefix . '/',$file)) continue; $filename = sprintf('%s/%s',$dir,$file);