summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0e1fa37)
raw | patch | inline | side by side (parent: 0e1fa37)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 Nov 2008 11:28:10 +0000 (11:28 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 3 Nov 2008 11:28:10 +0000 (11:28 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12868 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/functions.inc | patch | blob | history |
index 7d97d0117a934214f97b812d546bcfdfab67ba74..964af5d13ece60f8964672e30f78a41d6bd19325 100644 (file)
global $REWRITE;
foreach ($REWRITE as $key => $val){
- $s= preg_replace("/$key/", "$val", $s);
+ $s= str_replace("$key", "$val", $s);
}
return ($s);
unset ($variables[$key]);
foreach($val as $possibility){
- $nrule= preg_replace("/\{$key\}/", $possibility, $rule);
+ $nrule= str_replace("{$key}", $possibility, $rule);
$result= array_merge($result, recurse($nrule, $variables));
}
/* Check for clean attribute */
if (preg_match('/^%[a-zA-Z0-9]+$/', $rule)){
$rule= preg_replace('/^%/', '', $rule);
- $val= rewrite(preg_replace('/ /', '', strtolower($attributes[$rule])));
+ $val= rewrite(str_replace(' ', '', strtolower($attributes[$rule])));
return (array($val));
}
if (preg_match('/^%[a-zA-Z0-9]+\[[0-9-]+\]$/', $rule)){
$param= preg_replace('/^[^[]+\[([^]]+)]$/', '\\1', $rule);
$part= preg_replace('/^%/', '', preg_replace('/\[.*$/', '', $rule));
- $val= rewrite(preg_replace('/ /', '', strtolower($attributes[$part])));
+ $val= rewrite(str_replace(' ', '', strtolower($attributes[$part])));
$start= preg_replace ('/-.*$/', '', $param);
$stop = preg_replace ('/^[^-]+-/', '', $param);
function validate($string)
{
- return (strip_tags(preg_replace('/\0/', '', $string)));
+ return (strip_tags(str_replace('\0', '', $string)));
}